How daanyaal5/flowstate works
FlowState is a Chrome extension for digital wellness. Chrome tab and alarm events feed background monitoring, which records activity and can open an overload overlay or send reminders. Users can review stats in the popup, explore history and charts in the dashboard, adjust settings, and complete a sunset reflection; the dashboard persists reflection answers and can suggest tab cleanup. The README documents additional notification and chart capabilities not fully visible in the excerpts. Some service-worker handlers and UI wiring are unsampled, so those links are shown only where documented or directly evidenced.
Main entry points: background.js Background Guardian · dashboard.js Analytics Dashboard · popup.js Quick Stats Popup · overlay.js Intervention Overlay
Components 10
Wellness Monitoring
- Background Guardian
backend/background.js - Wellness Records
backend/background.js
Gentle Interventions
- Intervention Overlay
frontend/overlay/overlay.js - Wellness Notifications
backend/background.js
Sunset Reflection
- Reflection Journal
frontend/dashboard/dashboard.js
Insights And Controls
- Quick Stats Popup
frontend/popup/popup.js - Wellness Settings
frontend/popup/popup.js - Analytics Dashboard
frontend/dashboard/dashboard.js
Other components
- User
- Chrome APIs
Connections 20
- Chrome APIs → Background Guardian: sends events
backend/background.js - Background Guardian → Wellness Records: reads and writes
backend/background.js - Background Guardian → Chrome APIs: checks tabs
backend/background.js - Background Guardian → Intervention Overlay: opens on overload
backend/background.js - Background Guardian → Wellness Notifications: creates nudges
backend/background.js - Wellness Notifications → User: offers actions
README.md - User → Quick Stats Popup: opens extension
README.md - Quick Stats Popup → Background Guardian: requests stats
frontend/popup/popup.js - Quick Stats Popup → Chrome APIs: opens views
frontend/popup/popup.js - Quick Stats Popup → Wellness Settings: edits controls
frontend/popup/popup.js - Wellness Settings → Wellness Records: stores preferences
frontend/popup/popup.js - User → Intervention Overlay: chooses intervention
README.md - Intervention Overlay → Background Guardian: requests tab trim
frontend/overlay/overlay.js - Intervention Overlay → Chrome APIs: sets cooldown
frontend/overlay/overlay.js - User → Analytics Dashboard: opens dashboard
README.md - Analytics Dashboard → Wellness Records: loads analytics
frontend/dashboard/dashboard.js - Analytics Dashboard → Reflection Journal: creates reflection
frontend/dashboard/dashboard.js - Reflection Journal → Wellness Records: saves journal
frontend/dashboard/dashboard.js - Analytics Dashboard → Background Guardian: reports reflection
frontend/dashboard/dashboard.js - Analytics Dashboard → Chrome APIs: suggests tab cleanup
README.md