App Resources
Screens & Assets
Reference guide for UI screens, asset loading, known issues, and future improvements.
Screen-by-Screen Guide
| Screen | File | Purpose |
|---|---|---|
| Splash | SplashScreen.js |
Boot animation, auth check → Home |
| Home | HomeScreen.js |
Dashboard, metrics, mode selection |
| PreGame | PreGameScreen.js |
Mode + difficulty picker |
| Game | GameScreen.js |
Main game shell → instantiates engine |
| Results | ResultsScreen.js |
Session summary, NeuroScore |
| Profile | ProfileScreen.js |
Radar chart, session history |
| Settings | SettingsScreen.js |
Full settings (6 tabs, 81KB) |
| Science | ScienceScreen.js |
Cognitive science explainers |
| Login | LoginScreen.js |
Google / Email / Guest auth |
| LevelReward | LevelRewardScreen.js |
Level-up celebration |
| Theme | ThemeSelectionScreen.js |
Visual theme picker |
| Legal | LegalScreen.js |
Privacy / Terms |
| AdGate | AdGateScreen.js |
Ad interstitial |
| Review | ReviewScreen.js |
App review prompt |
| Challenge | ChallengeGameScreen.js |
Challenge mode game |
Data & Assets
📦 Dataset
Item schema: { id, name, category, image, sentences: { easy, medium, hard } }
Loaded by dataLoader.js; per-locale sentence files in public/assets/data/i18n/
🔊 Audio
Manager: audioManager.js. Files: CORRECT, WRONG, UI_CLICK, BONUS. Toggle:
settings.sfx
📲 Haptics
Uses navigator.vibrate() with patterns: BUTTON(20ms), CORRECT(45ms), MISTAKE(80-60-80ms)
🎨 Theme
Tailwind CSS + custom tokens. Fonts: Inter, Material Symbols. Mobile-first, safe-area-aware.
Bugs & Risks
| # | Issue | Risk | Fix |
|---|---|---|---|
| 1 | No Page Visibility API — timer runs when backgrounded | âš ï¸ High | Add visibilitychange → auto-pause |
| 2 | Base64 images bloat localStorage session history | âš ï¸ Med | Strip image data before saving session |
| 3 | QuickCalc Math.random() lacks seeding for exact replays | ↓ Low | Implement LCG PRNG for challenge modes |
| 4 | i18n.js async loading causes brief FOUC on slow networks | ↓ Low | Add app-level loading spinner until ready |
Future Improvements
- Firebase Integration: Migrate
store.jsto Firestore for cross-device sync. - Daily Challenges: Global seeded Daily mode with leaderboards.
- Neural Coach: AI character offering personalized tips based on weak metrics.
- WebGL Rendering: Rewrite core render loop in PixiJS if DOM node churn causes GC stutters.
Glossary
- Cognitive Charge: Primary XP metric. Linear indicator of total playtime/effort.
- Neural Growth: Secondary mastery metric. Demands high quality and stability (capped 100).
- NeuroScore: 0-1000 composite of the 5 cognitive pillars for a session.
- RT: Reaction Time in milliseconds.
- CV: Coefficient of Variation (Standard Deviation / Mean). Lower is better.