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! π