Skip to content

Mind Gym Whitepaper

Browser-native memory training, presented as a systems-design case study

Mind Gym is a zero-dependency memory training PWA for the open web: no backend, no runtime framework, no account wall, and no hidden infrastructure. This site treats the project as both a playable product and a technical argument. The documentation leads, then the demo backs the claims.

Why this site exists

Senior engineers, strict reviewers, and contributors should be able to trace every major claim back to concrete files such as app.js, src/game-state.js, src/game-manager.js, src/storage.js, and sw.js.

System leverage at a glance

SignalWhy it mattersPrimary evidence
Zero runtime dependenciesThe app ships as HTML, CSS, and browser-native JavaScript, so source-to-runtime mapping stays unusually direct.index.html, app.js, src/*.js
Three-layer state modelSettings, GameState, and ModeState separate durable preferences from live control and specialized mode workflows.src/settings-manager.js, src/game-state.js, src/nback-state.js, src/recall-state.js
Deep modules in hotspotsComplex areas stay locally understandable instead of dissolving into one giant coordinator.src/game-manager.js, src/modal-manager.js, src/ui/renderer.js, src/pipeline/win-pipeline.js
Offline-first deliveryShort sessions remain resilient even when connectivity is weak or absent after first load.sw.js, manifest.webmanifest, src/storage.js
Bilingual docs shellCore architectural claims remain readable in English and Chinese without splitting the story.docs/en/*, docs/zh/*

Reading routes

For strict reviewers

Start with Project Thesis

Continue with System Overview, then Module Catalog.

For senior GitHub developers

Start with State Architecture

Continue with PWA and Offline Strategy, then Getting Started.

For new contributors

Start with Learning Path

Continue with Getting Started, then the OpenSpec files in the repository.

For product-minded readers

Start with Project Thesis

Continue with References and Related Work to place the product choices in context.

Capability surface

Training surfaceWhat it trainsSupporting system
Classic matchingRecognition, pair association, pacingCore board loop, scoring, stats
Countdown modeTime-budgeted play under pressureTimer orchestration, score persistence
Daily challengeDeterministic repeatable sessionsDate seeding, storage, comparison logic
N-backWorking-memory load and response timingMode-specific state and training logic
Delayed recallPost-session recognition testingRecall state, win pipeline, scoring
Long-term progressionRepeat use over noveltyAchievements, adaptive rating, FSRS-backed mastery

What this whitepaper covers

  1. Product intent: why Mind Gym is framed as a serious small system rather than a toy demo.
  2. Architecture: how runtime modules, persistence, and offline behavior cooperate.
  3. Contributor leverage: where to start, what to read first, and how to verify changes safely.
  4. Research context: which ideas come from cognitive training patterns and which come from web engineering practice.

Editorial note

This site is intentionally opinionated. It favors grounded claims over hype, concrete file references over architecture theater, and implementation leverage over novelty for novelty's sake.