How kajamaqbool/steady-gaze-buddy-main works
DysLex Shield is a child-friendly reading adventure that captures browser-based gaze data and presents screening signals to adults, not a diagnosis. Its main journey runs from authenticated profile selection through camera setup, five-point calibration, the reading adventure and mini-games, then local analysis and export. A separate optional branch streams session data to an authenticated STOMP backend and displays returned results. The graph combines README-documented capabilities with sampled source references; several implementation details, including individual adventure stages and export internals, were not sampled.
Main entry points: Index.tsx Adventure flow · wsClient.ts STOMP client · AuthGuard.tsx Auth boundary · SteadyReaderGame.tsx Reading adventure
Components 29
App and access
- Routes and providers
src/App.tsx - Auth boundary
src/components/AuthGuard.tsx - Auth state
src/context/AuthContext.tsx - Auth requests
src/api/authService.ts
Reading adventure
- Adventure flow
src/pages/Index.tsx - Explorer profiles
src/components/ChildProfileSelect.tsx - Local profile store
src/adventure/profileStore.ts - Adventure welcome
src/components/AdventureWelcome.tsx - Gaze calibration
src/components/CalibrationScreen.tsx - Reading adventure
src/components/SteadyReaderGame.tsx - Mini-game stages
src/components/WordHuntStage.tsx - Lumi mascot
src/components/Mascot.tsx - Completion and export
src/components/EndScreen.tsx
Gaze capture
- Camera and Face Mesh
src/hooks/useEyeTracking.ts - Camera preview
src/components/CameraPreview.tsx - Gaze session data
src/types/gaze.ts - Gaze processing
src/hooks/useGazeProcessing.ts
Analysis and results
- Feature detection
src/lib/featureExtractionPhase3.ts - Fixation detection
src/lib/fixationDetectionEnhanced.ts - Saccade detection
src/lib/saccadeDetectionEnhanced.ts - Result interpretation
src/api/resultProcessor.ts - Result history
src/api/resultHistoryManager.ts
Backend streaming
- Session and stream state
src/store/gazeStore.ts - Session lifecycle
src/api/sessionManager.ts - STOMP client
src/api/wsClient.ts - Connection and responses
src/hooks/useWebSocketConnection.ts
Other components
- Child / adult
- Auth API
- Gaze and ML backend
Connections 34
- Child / adult → Routes and providers: opens app
README.md - Routes and providers → Auth boundary: protects route
src/App.tsx - Auth boundary → Auth state: checks access
src/components/AuthGuard.tsx - Auth state → Auth requests: requests auth
src/context/AuthContext.tsx - Auth requests → Auth API: calls REST API
README.md - Auth boundary → Adventure flow: admits signed-in user
src/App.tsx - Child / adult → Adventure flow: starts adventure
README.md - Adventure flow → Explorer profiles: shows profiles
src/pages/Index.tsx - Explorer profiles → Local profile store: persists profiles
- Adventure flow → Adventure welcome: shows welcome
src/pages/Index.tsx - Adventure flow → Camera and Face Mesh: starts capture
src/pages/Index.tsx - Camera and Face Mesh → Camera preview: supplies camera view
- Camera and Face Mesh → Gaze session data: produces gaze points
README.md - Adventure flow → Gaze calibration: opens calibration
src/pages/Index.tsx - Gaze calibration → Gaze session data: calibrates gaze
- Adventure flow → Reading adventure: starts reading
src/pages/Index.tsx - Reading adventure → Mini-game stages: offers mini-games
README.md - Reading adventure → Lumi mascot: features Lumi
- Adventure flow → Completion and export: shows completion
src/pages/Index.tsx - Completion and export → Gaze processing: runs local analysis
README.md - Gaze processing → Feature detection: extracts features
src/hooks/useGazeProcessing.ts - Feature detection → Fixation detection: uses detector
- Feature detection → Saccade detection: uses detector
- Completion and export → Child / adult: offers JSON export
README.md - Adventure flow → Connection and responses: optionally connects
README.md - Connection and responses → STOMP client: manages connection
src/hooks/useWebSocketConnection.ts - STOMP client → Auth requests: refreshes token
src/api/wsClient.ts - Session lifecycle → STOMP client: controls session
src/api/sessionManager.ts - Session lifecycle → Session and stream state: updates session state
src/api/sessionManager.ts - STOMP client → Gaze and ML backend: streams gaze data
README.md - Gaze and ML backend → STOMP client: returns results
README.md - Connection and responses → Session and stream state: updates stream state
src/hooks/useWebSocketConnection.ts - STOMP client → Result interpretation: passes ML results
- Result interpretation → Result history: records results