Stay focused, stay productive. Clearo uses AI-powered object detection to keep you accountable during your Pomodoro sessions.
Clearo is a gamified productivity app that combines the Pomodoro Technique with real-time AI object detection to help you stay focused while studying or working. Using your webcam and machine learning, Clearo detects distractions (like smartphones) and tracks your productivity with a points and streak system.
- Pomodoro Timer - Customizable focus sessions
- Real-time Object Detection - Distraction monitoring using TensorFlow.js
- Gamification - Points, streaks, and leaderboard
- Session History - Track your productivity over time
- Secure Authentication - JWT-based auth with PostgreSQL
- Responsive Design - Works on desktop and mobile
- React 18 with Vite
- TensorFlow.js + COCO-SSD for object detection
- React Router for navigation
- CSS3 for styling
- Node.js + Express
- PostgreSQL with Sequelize ORM
- JWT for authentication
- bcrypt for password hashing
- Frontend: Vercel
- Backend: Railway
- Database: Railway PostgreSQL
- Node.js 16+ and npm
- PostgreSQL 15+
- Webcam (for object detection)
git clone https://github.com/ethj0r/Clearo.git
cd Clearo# Navigate to backend
cd backend
# Install dependencies
npm install
# Create .env file
cp .env.example .env
# Edit .env with your database credentials
# Start backend
npm run dev
# Backend runs on http://localhost:5001# Navigate to frontend (in new terminal)
cd frontend
# Install dependencies
npm install
# Create .env file
cp .env.example .env
# Make sure VITE_API_URL=http://localhost:5001/api
# Start frontend
npm run dev
# Frontend runs on http://localhost:5173- Open browser:
http://localhost:5173 - Register a new account
- Allow webcam access
- Start your first Pomodoro session!
clearo/
├── frontend/ # React frontend
│ ├── src/
│ │ ├── context/ # AuthContext
│ │ ├── hooks/ # usePomodoro, useObjectDetection
│ │ ├── pages/ # Login, Register, Dashboard
│ │ ├── services/ # API client
│ │ └── App.jsx
│ └── package.json
│
├── backend/ # Node.js backend
│ ├── src/
│ │ ├── config/ # Database config
│ │ ├── controllers/# Auth & Session controllers
│ │ ├── models/ # User & Session models
│ │ ├── routes/ # API routes
│ │ ├── middleware/ # Auth middleware
│ │ └── server.js
│ └── package.json
│
└── README.md
- Start Session: Click "Start Pomodoro" to begin a 60-minute focus session
- AI Monitoring: Your webcam feeds video to TensorFlow.js COCO-SSD model
- Distraction Detection:
- Smartphone detected → Distracted
- Person not visible → Distracted (you left)
- Focused → Earning points!
- Points & Streaks:
- Complete Pomodoro: +10 points
- No distractions: +5 bonus
- Daily streak: +5 to +50 bonus
- Each distraction: -2 points
- End Session: Get your score and compete on the leaderboard!
POST /api/auth/register # Register new user
POST /api/auth/login # Login user
GET /api/auth/me # Get current user (protected)
POST /api/session/start # Start Pomodoro session
PUT /api/session/:id # Update session (report distraction)
POST /api/session/:id/end # End session and calculate points
GET /api/session/history # Get user's session history
GET /api/session/leaderboard # Get top users
- Push code to GitHub
- Create new project on Railway
- Connect GitHub repository
- Add PostgreSQL database
- Set environment variables
- Deploy!
- Push code to GitHub
- Import project on Vercel
- Set
VITE_API_URLto Railway backend URL - Deploy!
Detailed deployment guide: See Deployment Guide artifact
# Backend tests
cd backend
npm test
# Frontend tests
cd frontend
npm test
# E2E tests
npm run test:e2e- Basic Pomodoro timer
- User authentication
- Object detection with TensorFlow.js
- Points and streak system
- Leaderboard page
- Session history visualization (charts)
- Custom Pomodoro durations
- Break timer
- Sound alerts
- Dark/light theme toggle
- Social features (friends, challenges)
- Mobile app (React Native)
Contributions are welcome!
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Project Developer: Jordhy Branenda
- GitHub: @ethj0r
- Email: charlesinlotte@gmail.com ethgalleryin@gmail.com 13524026@mahasiswa.itb.ac.id
- Website: Clearo