An AI-powered browser extension for focus tracking and productivity enhancement. Monitor your browsing habits, get smart interventions, and optimize your work sessions.
-
Install dependencies
npm install
-
Create icons (optional, see ICONS.md)
- Create PNG icons: icon16.png, icon48.png, icon128.png
- Place them in the
public/folder - Or skip for now and use default browser icons
-
Build the extension
npm run build:extension
-
Load in your browser
Chrome:
- Go to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked"
- Select the
dist-extensionfolder
Edge:
- Go to
edge://extensions/ - Enable "Developer mode"
- Click "Load unpacked"
- Select the
dist-extensionfolder
Firefox:
- Go to
about:debugging#/runtime/this-firefox - Click "Load Temporary Add-on"
- Select any file in the
dist-extensionfolder
- Go to
-
Start using it!
- Click the extension icon to open the dashboard
- Start a focus session
- Watch it track your activity automatically
npm install
npm run devOpen http://localhost:3000 in your browser.
- QUICK_START.md - 5-minute setup guide
- EXTENSION.md - Complete extension documentation
- API.md - Backend API reference (for web app mode)
- ICONS.md - How to create extension icons
- ⏱️ Real-time focus tracking - Monitor your concentration levels
- 🔄 Tab switch detection - Track and limit context switching
- 🎯 Focus sessions - Timed deep work periods
- 💤 Idle detection - Automatic break tracking
- 📊 Activity logging - Complete history of focus events
- 🔔 Break reminders - Every 50 minutes (customizable)
- 🌬️ Breathing exercises - Automatic stress relief
- 🚫 Distraction detection - Alerts for time-wasting sites
- 🌙 Digital sunset - Wind-down time reminders
- 🔥 Burnout prevention - Early warning system
- 📈 Focus score (0-100) - Real-time productivity metric
- ⏰ Time tracking - Active vs idle time
- 📊 Statistics - Comprehensive insights
- 📉 Burnout trends - 8-point trend analysis
- 🎨 Visual charts - Easy-to-read graphs
┌─────────────┐
│ Web Pages │ ← content.js monitors activity
└──────┬──────┘
│
┌──────▼──────────────┐
│ Background Worker │ ← background.js tracks state
│ (Service Worker) │
└──────┬──────────────┘
│
┌──────▼──────────────┐
│ Chrome Storage │ ← Local storage API
└──────┬──────────────┘
│
┌──────▼──────────────┐
│ React UI (Popup) │ ← App.tsx + storage.js
└─────────────────────┘
┌─────────────────┐
│ React Frontend │ ← App.tsx
└────────┬────────┘
│
┌────────▼────────┐
│ Express API │ ← server.js
└────────┬────────┘
│
┌────────▼────────┐
│ SQLite DB │ ← focus.db
└─────────────────┘
# Start dev server with hot reload
npm run dev:extension
# Build for production
npm run build:extension
# Clean build artifacts
npm run clean# Start server (JavaScript)
npm run dev
# Start server (TypeScript)
npm run dev:ts
# Build frontend
npm run build
# Production mode
npm startCloud-Yug/
├── public/
│ ├── manifest.json # Extension manifest (MV3)
│ ├── background.js # Service worker
│ ├── content.js # Content script
│ └── icon*.png # Extension icons (create these)
├── src/
│ ├── App.tsx # Main React component
│ ├── main.tsx # React entry point
│ ├── storage.js # Chrome storage wrapper
│ └── index.css # Styles
├── server.js # Express backend (for web mode)
├── vite.config.ts # Vite config (web app)
├── vite.config.extension.ts # Vite config (extension)
└── package.json
- ✅ 100% local - All data stays in your browser
- ✅ No tracking - Zero analytics or telemetry
- ✅ No servers - No data sent anywhere
- ✅ Open source - You can audit the code
- ✅ You own your data - Export/delete anytime
| Browser | Status | Version |
|---|---|---|
| Chrome | ✅ Supported | 88+ |
| Edge | ✅ Supported | 88+ |
| Firefox | ✅ Supported | 109+ |
| Brave | ✅ Supported | Latest |
| Opera | ✅ Supported | 74+ |
| Safari | - |
Edit src/App.tsx and modify Tailwind classes:
className = "bg-blue-600"; // Change to your color
className = "text-purple-500"; // Change to your colorEdit public/background.js:
chrome.alarms.create("breakReminder", {
periodInMinutes: 50, // Change to your preference
});Edit public/background.js, find isDistractingSite():
const distractingSites = [
"facebook.com",
"twitter.com",
// Add your own...
];Edit public/background.js, find updateStats() function.
- Ensure you ran
npm run build:extension - Check Chrome DevTools console for errors
- Verify all files are in
dist-extension/
- Right-click extension → Inspect popup
- Check console for errors
- Verify React app compiled successfully
- Check browser storage permissions
- Open chrome://extensions and verify permissions
- Try reloading the extension
- Check background service worker is running
- Go to chrome://extensions → Click "service worker"
- Look for errors in console
| Script | Description |
|---|---|
npm run dev |
Run web app with backend server |
npm run dev:extension |
Dev server for extension development |
npm run build |
Build web app for production |
npm run build:extension |
Build browser extension |
npm run clean |
Remove all build artifacts |
npm run lint |
TypeScript type checking |
npm start |
Production server (JavaScript) |
npm run start:ts |
Production server (TypeScript) |
- Build:
npm run build:extension - Zip
dist-extension/folder - Upload to Chrome Web Store Developer Dashboard
- $5 one-time developer fee
- Build:
npm run build:extension - Zip
dist-extension/folder - Upload to addons.mozilla.org
- Free submission
- Build:
npm run build:extension - Zip
dist-extension/folder - Upload to Edge Add-ons
- Free submission
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Apache 2.0 - See LICENSE file for details
- Built with React, Vite, and Tailwind CSS
- Icons by Lucide React
- Animations by Motion/Framer Motion
- Issues: Report bugs on GitHub Issues
- Discussions: Ask questions in GitHub Discussions
- Email: [Your email here]
- Website blocking during focus mode
- Pomodoro timer integration
- Weekly/monthly reports
- Cloud sync across devices
- Custom productivity goals
- Team/workspace features
- AI-powered insights
- Mobile companion app
Made with ❤️ for focused productivity
Start your journey to better focus today! 🚀