A 10-minute math sprint app for ISEE prep. Static web app — no server, no database, no accounts. State lives in your browser; a single sync button pushes it to GitHub so the parent dashboard works from any device.
- Sprint engine with countdown timer, free-response answers, and a "prove it from memory" loop on every wrong answer
- Walkthrough screen with KaTeX-rendered math, step-by-step rationales, and a scaffolded "why does this work?" prompt
- Background error classification — common misconception patterns (forgot to invert when dividing, sign errors, etc.) get tagged and surfaced in the tutor report
- Two-audience views:
/Beatrix's home + sprint + her-progress/parentsparent dashboard with struggle areas/parents/reportprintable narrative tutor briefing
- Hybrid problem source: 16 numeric templates that generate fresh problems every sprint + 48 hand-written word problems across 8 interest domains (thrift, sewing, sailing, music, currency/Denmark, reading rate, pocket money, spending slope)
- Tidy mode toggle — default ON for test-faithful clean answers; flip OFF later in the summer for upper-school "trust your process" practice
npm install
npm run dev # Vite dev server on http://localhost:5173/math-engine/
npm test # Vitest — 76 tests
npm run build # Production build to ./dist- Create a GitHub repo named
math-engineunder your account. Public is fine — the URL itself is the access control. - Initialize this folder as a git repo:
git init git branch -M main git add . git commit -m "initial commit" git remote add origin git@github.com:YOUR-USERNAME/math-engine.git git push -u origin main
- Enable GitHub Pages in repo Settings → Pages: source =
gh-pagesbranch, folder =/ (root). - Update the URL in
vite.config.tsif your repo name differs frommath-engine. Thebasefield must match/REPO-NAME/.
npm run deployThis builds the project and pushes dist/ to the gh-pages branch. GitHub Pages serves it within a minute or two at:
https://YOUR-USERNAME.github.io/math-engine/
Re-run npm run deploy any time you change code.
The sync button stores Beatrix's sprint data in a data branch of the same repo, so the parent dashboard can read it from a different device.
- Open the app, click Settings.
- Enter your GitHub username and
math-enginefor the repo name. - Generate a Personal Access Token (classic) at https://github.com/settings/tokens with the
reposcope. Copy it into the PAT field. (The PAT only lives in browser localStorage on this device — it's not stored in the repo.) - Run a sprint, then click Push now in Settings. The app creates the
databranch automatically on first push.
After that, sprints auto-push when they end.
- Open the same URL, click Settings.
- Enter the same username and repo name. Leave the PAT field blank — reads from the public
databranch don't require auth. - Navigate to
/parents— the dashboard auto-pulls the latest state on load.
- Beatrix: opens the URL, lands on home, clicks "Start a sprint", does 10 minutes. Her data persists locally and pushes to GitHub automatically when the sprint ends.
- You / mom / stepdad / tutor: open the URL with
/parentsappended. Dashboard pulls latest data, shows today + this week's stats, struggle areas grouped by misconception pattern, and a list of any problems she flagged. Click "Open tutor report" for a printable narrative briefing.
The 48 word problems live as JSON in src/problems/static-bank/*.json. Each domain is one file. To edit voice/tone or add more problems:
- Open the JSON file for the domain (e.g.,
sailing.json). - Edit
text,walkthrough.steps, orselfExplanationdirectly. Each problem follows the same shape — copy an existing entry as a template if adding new ones. - Run
npm testto make sure the structural checks still pass. npm run deployto push.
Or just ask Claude Code: "Edit the sewing word problems to sound more like Beatrix would."
Tidy mode controls whether generated problems produce clean answers (default ON, ISEE-faithful) or include repeating decimals you have to round (OFF, upper-school habit).
Flip via Settings, or ask Claude Code: "Turn off tidy mode."
The current state is surfaced in the parent dashboard banner and at the top of the tutor report.
- Preact + TypeScript + Vite — ~110 KB gzipped + KaTeX fonts
fraction.jsfor exact fraction arithmetic (no floating-point drift on1/4 + 1/6 = 5/12)- Sprint engine is a pure reducer (
src/sprint/engine.ts); UI is a thin layer - Problem source is behind a
ProblemProviderinterface (src/problems/provider.ts) — generators and the static bank both implement it, so swapping the static bank for a word-problem generator later is a one-file change
See the plan file at ~/.claude/plans/read-the-prd-in-iridescent-stardust.md for the full design rationale.
Private — for Beatrix and family.