How devanithimaran10/sphere-trainer works
Neuro-Adapt is a browser-based cognitive-motor trainer with two connected experiences: Sphere Trainer sessions and the NeuroPlay cognitive-games hub. Players train in adaptive tasks, receive scores and progress summaries, and can review history or adjust accessibility and pacing. The main session store coordinates Sphere scoring and adaptive control; NeuroPlay has a separate profile/session store and scoring pipeline. The README documents modes and capabilities not all individually sampled; unsampled page and game implementations are represented by their exact source paths, with only documented or indexed relationships shown.
Main entry points: App.tsx App shell · useGameStore.ts Session state · NeuroPlayApp.tsx NeuroPlay app · useNeuroPlayStore.ts Profiles and sessions
Components 26
Application shell
- App shell
src/App.tsx
Sphere training
- 3D scene
src/components/Scene.tsx - Training HUD
src/components/hud/PlayingHUD.tsx - Training modes
src/components/hud/modes.ts - Mini-game router
src/components/hud/MiniGameRouter.tsx - Mini-games
src/components/games - Session state
src/store/useGameStore.ts - Session recovery
src/store/useSessionLifecycle.ts
Scoring and adaptation
- AI warm start
src/ai/simulate.ts - State estimator
src/ai/stateEstimator.ts - RL controller
src/ai/rlController.ts - Safety layer
src/ai/safetyLayer.ts - Cognitive profile scoring
src/ai/cognitiveScoringEngine.ts - Progress predictor
src/ai/progressPredictor.ts - Game scoring
src/neuroplay/engine/scoringEngine.ts - Fatigue estimator
src/neuroplay/engine/fatigueEngine.ts - Difficulty adaptation
src/neuroplay/engine/adaptiveEngine.ts - Recommendations
src/neuroplay/engine/recommendationEngine.ts
NeuroPlay hub
- NeuroPlay app
src/neuroplay/NeuroPlayApp.tsx - Hub pages
src/neuroplay/pages - Cognitive games
src/neuroplay/games - Session summary
src/neuroplay/components/TrainingSessionSummary.tsx
Profiles and history
- Accessibility settings
src/store/useSettingsStore.ts - Session history
src/store/useHistoryStore.ts - Profiles and sessions
src/neuroplay/store/useNeuroPlayStore.ts
Other components
- Player
Connections 35
- Player → App shell: starts training
- App shell → 3D scene: renders
src/App.tsx - App shell → Training HUD: renders
src/App.tsx - App shell → Accessibility settings: reads preferences
src/App.tsx - App shell → Session state: reads phase
src/App.tsx - App shell → AI warm start: bootstraps
src/App.tsx - App shell → Session recovery: checks recovery
src/App.tsx - App shell → NeuroPlay app: switches to
src/App.tsx - 3D scene → Session state: reads game state
src/components/Scene.tsx - 3D scene → Mini-games: renders sphere
- Training HUD → Session state: reads and updates
src/components/hud/PlayingHUD.tsx - Training HUD → Training modes: uses modes
src/components/hud/PlayingHUD.tsx - Mini-game router → Mini-games: routes games
src/components/hud/MiniGameRouter.tsx - Mini-game router → Session state: reads game state
src/components/hud/MiniGameRouter.tsx - Session state → State estimator: estimates state
src/store/useGameStore.ts - Session state → RL controller: chooses and updates
src/store/useGameStore.ts - Session state → Safety layer: vets action
src/store/useGameStore.ts - Session state → Session history: records results
src/store/useGameStore.ts - App shell → Session recovery: pauses on background
src/App.tsx - App shell → Accessibility settings: applies display settings
src/App.tsx - NeuroPlay app → Profiles and sessions: reads hub state
src/neuroplay/NeuroPlayApp.tsx - NeuroPlay app → Hub pages: routes pages
src/neuroplay/NeuroPlayApp.tsx - NeuroPlay app → Cognitive games: renders games
src/neuroplay/NeuroPlayApp.tsx - Profiles and sessions → Cognitive games: stores game results
- Profiles and sessions → Game scoring: seeds demo sessions
- Game scoring → Fatigue estimator: shares scoring helpers
src/neuroplay/engine/fatigueEngine.ts - Difficulty adaptation → Game scoring: uses scoring
src/neuroplay/engine/adaptiveEngine.ts - Recommendations → Difficulty adaptation: uses adaptation
src/neuroplay/engine/recommendationEngine.ts - Recommendations → Fatigue estimator: uses fatigue
src/neuroplay/engine/recommendationEngine.ts - Session summary → Profiles and sessions: reads session data
src/neuroplay/components/TrainingSessionSummary.tsx - Session summary → Fatigue estimator: calculates fatigue
src/neuroplay/components/TrainingSessionSummary.tsx - Session summary → Game scoring: scores session
src/neuroplay/components/TrainingSessionSummary.tsx - Cognitive profile scoring → Session history: reads sessions
src/ai/cognitiveScoringEngine.ts - Hub pages → Cognitive profile scoring: shows profile
- Player → NeuroPlay app: trains and reviews