How ritesh3280/hackumbc25 works
This is a focus-session timer and analytics app with EEG-based focus monitoring. The main workflow runs from the browser’s timer and session store, through live EEG data and focus classification, back to the interface; saved sessions feed history, calendar, and insight views. The README documents starting a FastAPI backend, and the source index shows it imports EEG inference. Several EEG training and collection modules are present, but their runtime wiring is not established by the excerpts, so they are shown without speculative connections.
Main entry points: app/page.js Focus Dashboard · history/page.js History Page · sessionStore.js Session Store · eeg_websocket.py EEG WebSocket
Components 23
Focus App
- Focus Dashboard
frontend/src/app/page.js - Timer Controls
frontend/src/app/components/Timer.jsx - Task List
frontend/src/app/components/TaskList.jsx - Focus Alarm UI
frontend/src/app/components/FocusAlarm.jsx - EEG Displays
frontend/src/app/components/EEGGraphs.jsx
Session Data
- Session Store
frontend/src/app/store/sessionStore.js - Session Database
frontend/src/app/db/indexeddb.js - Task Classifier
frontend/src/app/utils/taskClassifier.js
EEG Monitoring
- EEG Client Hook
frontend/src/app/hooks/useRealEEG.js
EEG Services
- EEG WebSocket
eeg/eeg_websocket.py - FastAPI Backend
backend.py - EEG Mood Detector
eeg/inference.py - Random Forest Detector
eeg/randomforestinference.py - Signal Processing
eeg/signal_processing.py - Alarm Smoothing
alarm.py
History & Insights
- History Page
frontend/src/app/history/page.js - Session Analytics
frontend/src/app/utils/sessionAnalytics.js - Session Visualizations
frontend/src/app/components/SessionVisualization.jsx - Calendar Views
frontend/src/app/components/CalendarView.jsx - Focus Insights
frontend/src/app/utils/geminiInsights.js
Other components
- User
- EEG Device
- Remote Model Host
Connections 24
- User → Focus Dashboard: uses
frontend/src/app/page.js - Focus Dashboard → Timer Controls: renders
frontend/src/app/page.js - Focus Dashboard → Task List: renders
frontend/src/app/page.js - Focus Dashboard → Focus Alarm UI: renders
frontend/src/app/page.js - Focus Dashboard → EEG Displays: renders
frontend/src/app/page.js - Focus Dashboard → Session Store: uses
frontend/src/app/page.js - Focus Dashboard → EEG Client Hook: reads live data
frontend/src/app/page.js - Timer Controls → Session Store: updates sessions
- Session Store → Session Database: saves sessions
frontend/src/app/store/sessionStore.js - Session Store → Task Classifier: classifies tasks
frontend/src/app/store/sessionStore.js - EEG Client Hook → EEG WebSocket: opens WebSocket
frontend/src/app/hooks/useRealEEG.js - EEG Device → EEG WebSocket: streams EEG
- EEG WebSocket → Random Forest Detector: uses detector
eeg/eeg_websocket.py - FastAPI Backend → EEG Mood Detector: imports inference
backend.py - EEG Mood Detector → Signal Processing: uses processing
eeg/inference.py - Random Forest Detector → Signal Processing: uses processing
eeg/randomforestinference.py - Task Classifier → Remote Model Host: fetches model
frontend/src/app/utils/taskClassifier.js - History Page → Session Analytics: calculates metrics
frontend/src/app/history/page.js - History Page → Session Visualizations: renders charts
frontend/src/app/history/page.js - History Page → Calendar Views: renders calendar
frontend/src/app/history/page.js - History Page → Focus Insights: requests insights
frontend/src/app/history/page.js - Calendar Views → Session Analytics: uses analytics
frontend/src/app/components/CalendarView.jsx - Session Visualizations → Session Analytics: formats metrics
frontend/src/app/components/SessionVisualization.jsx - History Page → Session Database: loads sessions