AI-powered flow state detection and distraction blocker with comprehensive analytics dashboard.
- โ Fixed Stats Reset: Stats now properly reset when you click "Reset Stats" - no more persistent data on blocked pages
- ๐ฏ Enhanced Focus Detection: More accurate focus percentage using:
- Mouse movement tracking (high movement = distracted)
- Keystroke frequency (more typing = focused)
- Tab switching patterns (frequent switches = distracted)
- Improved typing cadence analysis
- ๐ฌ Smart Focus Messages: Real-time contextual messages based on your focus level
- โก Faster Updates: Dashboard updates every 1 second for immediate feedback
- ๐ Full Analytics Dashboard: New comprehensive dashboard with visual charts and insights
- ๐ฅ Report Downloads: Export your analytics as JSON or CSV files
- Multi-factor flow state analysis:
- Tab switching frequency (25% weight)
- Typing cadence consistency (20% weight)
- Keystroke frequency (20% weight)
- Time on task (15% weight)
- Mouse movement patterns (10% weight)
- Site categorization (10% weight)
- Real-time flow state classification (Deep Flow, Focused, Neutral, Distracted)
- Contextual focus messages with color-coded alerts
- Visual flow state timeline with 200+ data points
- Real-time session statistics
- Event logging and tracking
- Detailed activity log
- Export reports as JSON or CSV
- Session performance metrics
- Blocks distracting websites (social media, streaming, etc.)
- Customizable blocked sites list
- Motivational blocked page with real-time stats
- "Allow Once" feature for temporary access (10 minutes)
- Modern gradient design
- Real-time visualizations
- Focus score tracking with progress bars
- Color-coded focus messages
- Smooth animations and transitions
-
Download all files to a folder:
- background.js
- content.js
- popup.html
- popup.js
- blocked.html
- dashboard.html
- manifest.json
-
Create an
iconsfolder and add placeholder icon files (or use any PNG images):icons/icon16.png(16x16)icons/icon48.png(48x48)icons/icon128.png(128x128)
-
Open Chrome and go to
chrome://extensions/ -
Enable "Developer mode" (top right toggle)
-
Click "Load unpacked"
-
Select the folder containing the extension files
flow-monitor/
โโโ manifest.json โ
Updated with new resources
โโโ background.js โ
Already working
โโโ content.js โ
Already working
โโโ popup.html โ
Already working
โโโ popup.js โ
Fixed "Add Site" functionality
โโโ blocked.html โ
Removed inline scripts
โโโ blocked.js โ
NEW - External scripts
โโโ dashboard.html โ
Removed inline scripts
โโโ dashboard.js โ
NEW - External scripts
โโโ icons/
โโโ icon16.png
โโโ icon48.png
โโโ icon128.png
The extension uses a sophisticated multi-factor approach:
-
Feature Extraction:
- Tab switch frequency (25%): Lower = better focus
- Typing cadence (20%): More consistent = better focus
- Keystroke frequency (20%): More keystrokes = more engaged
- Time on task (15%): Longer sessions = deeper focus
- Mouse movement (10%): Less erratic movement = better focus
- Site category (10%): Productive sites = better focus
-
Flow State Classification:
- Deep Flow (75%+): "Excellent focus! You're in deep flow! ๐ฅ"
- Focused (55-75%): "Great focus! Keep up the good work! ๐ฏ"
- Neutral (35-55%): "Moderate focus. Try minimizing distractions. ๐ก"
- Distracted (<35%): "Low focus detected. Time to refocus!
โ ๏ธ "
-
Real-Time Monitoring:
- Updates every 10 seconds for accurate tracking
- UI updates every 1 second for immediate feedback
- Stores last 1000 flow state entries
- Tracks up to 5000 analytics events
The focus percentage is calculated using:
- โ More keystrokes = Higher score
- โ High tab switching = Lower score
- โ Erratic mouse movements = Lower score
- โ Consistent typing rhythm = Higher score
- โ Time spent on productive sites = Higher score
- Click the extension icon to view current state
- See real-time focus score and session stats
- View flow state timeline chart
- Toggle site blocking on/off
- Add/remove blocked sites
- Export analytics reports
- Click "View Dashboard" button in popup
- Opens comprehensive analytics page
- View detailed flow timeline (200+ points)
- See complete session statistics
- Review recent activity log
- Download JSON or CSV reports
- Shows when you visit a blocked site
- Displays current focus score
- Shows tab switches and session time
- "Back to Work" returns to previous page
- "Allow Once" temporarily disables blocking (10 min)
- Social Media: facebook.com, instagram.com, twitter.com, x.com
- Entertainment: reddit.com, tiktok.com, youtube.com, netflix.com
- Streaming: twitch.tv
- Other: pinterest.com, snapchat.com, linkedin.com
Type domain in popup โ click "Add"
Click "Remove" next to any site
Use the switch in popup or temporarily allow with "Allow Once"
Click "Reset Stats" to clear all session data and start fresh
Click "Export JSON" or "Export CSV" to download your analytics
- Tab activations and switches
- Navigation events
- Keystroke patterns
- Mouse movements
- Flow state changes
- Site blocking events
- Settings changes
- Session ID and duration
- Total events logged
- Event type breakdown
- Timestamped activity log
- Flow state history
- Performance metrics
- No external dependencies (pure JavaScript)
- Lightweight: Minimal memory footprint (~5MB)
- Privacy-focused: All data stored locally
- No API calls: Completely offline
- Manifest V3: Latest Chrome extension standard
- Real-time updates: 1-second UI refresh rate
- ๐ Monitor study sessions automatically
- ๐ซ Block social media during focus time
- ๐ Track productivity patterns over time
- ๐ฎ Gamifies focus with flow states
- ๐ Analyze detailed performance reports
- โก Get instant feedback on focus level
- ๐ฏ Improve concentration habits
- The extension now properly resets all session data
- Click "Reset Stats" to clear everything
- Refresh blocked pages to see updated stats
- Make sure you're actively typing (not just reading)
- Avoid excessive tab switching
- Minimize mouse movements
- Stay on productive sites
- Give it a few minutes to collect data
- Make sure you're browsing with the extension enabled
- Check that site blocking is active
Report issues or suggest features by providing feedback!
MIT License - Feel free to modify and distribute!
Version 2.0 | Built with โค๏ธ for productivity enthusiasts