Study Buddy is a study companion that helps you stay focused and understand your study habits. Using your webcam, it tracks focus, fatigue, and phone usage during study sessions, providing real-time feedback and post-session analytics. Customize your study and break intervals, and use the built-in chatbot to play background music, all without leaving your workspace!
- Real-time computer vision detects:
- Distraction
- Tiredness
- Phone Usage
- Fidgeting
- Instant notifications are displayed to guide you back on task
- Set your own study/break intervals (e.g. Pomodoro 25/5)
- Configure session duration
- Pause/resume anytime
- After every session, receive a summary including:
- Focus score
- Distraction timeline
- Breakdown of distraction types and counts of occurrences for each
- Review past sessions to track productivity over time
- Plays a requested background video from Youtube using Google's Gemini AI
- Frontend: React & Typescript
- Backend: Python, FastAPI, Uvicorn, WebSockets
- Computer Vision: OpenCV + MediaPipe
- Database & Auth: Supabase
- Background Music Integration: YouTube API & Gemini API
python 3.11
Node.js
Supabase account- Clone the repository:
git clone [your-repo-url]
cd CODEJAM25- Create and activate virtual environment:
# For Mac/Linux
python -m venv .venv
source .venv/bin/activate
# For Windows
python -m venv venv
source venv/Scripts/activate- Install dependencies:
# Backend
cd backend # from root
pip install -r requirements.txt
# Frontend
cd frontend # from root
npm install- Set up API keys:
Create a
.envfile in frontend and backend directories with:
# Frontend
VITE_SUPABASE_URL="your-supabase-url"
VITE_SUPABASE_ANON_KEY="your-supabase-key"
# Backend
YOUTUBE_API_KEY="your-youtube-api-key"
GEMINI_API_KEY="your-gemini-api-key"Open a split-terminal to run both the backend and frontend:
# Backend
cd backend # from root
python -m uvicorn app.main:app --port 8000
# Frontend
cd frontend # from root
npm run dev