Skip to content

osammotg/focusBuddy

Repository files navigation

LockIn

LockIn is a privacy-first, AI-powered focus tracking application designed to help students maintain concentration while studying. It uses real-time computer vision running entirely in your browser to detect focus, distractions, phone usage, and absence.

✨ Features

  • 🎯 Real-time Focus Detection: Uses AI to track your gaze and head pose
  • 📱 Phone Detection: Alerts when you pick up your phone
  • 🚶 Absence Detection: Tracks when you leave your desk
  • Quick Nudge: Gentle 3-second warning before the main alert
  • 📊 Session Timeline: Visual history of your entire study session
  • 📈 Detailed Stats: Focus time, distractions, phone time, and absent time
  • 🔒 100% Private: All processing happens on your device - no data leaves your browser
  • 📱 PWA Support: Install as a standalone app and use offline

🚀 Quick Start

# Install dependencies
npm install

# Run development server
npm run dev

# Build for production
npm run build

🛠️ Technology Stack

  • Vite - Fast build tool
  • TensorFlow.js - Machine learning in the browser
  • MediaPipe Face Mesh - High-fidelity face landmark detection
  • COCO-SSD - Object detection for phone identification
  • PWA - Progressive Web App capabilities

📖 How It Works

  1. Face Detection: Uses MediaPipe to detect 468 facial landmarks
  2. Gaze Analysis: Calculates head pose to determine if you're looking at the screen
  3. Phone Detection: COCO-SSD model identifies cell phones in the frame
  4. State Tracking: Monitors your state (Focused, Distracted, Phone, Absent)
  5. Visual Feedback: Color-coded ambient glow and timeline visualization

🎨 Visual States

  • 🟢 Green - Focused
  • 🔴 Red - Distracted
  • 🟡 Yellow - Phone detected
  • Grey - Absent

⚙️ Settings

  • Face Mesh: Toggle the wireframe overlay
  • Timeline Duration: Choose view range (1h, 2h, 4h, 8h, 24h)

🔐 Privacy

All video processing happens locally in your browser. No video data is ever sent to any server. Your study sessions remain completely private.

📄 License

MIT

focusBuddy

About

focusBuddy the app to fix adhd

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors