Japan Memory Atlas
Live· alphaA spaced-repetition quiz for learning Japan's geography — all 47 prefectures and the 23 wards of Tokyo. Answer on an interactive map and every correct guess leaves a visual trace, turning the map into a personal record of what you've mastered. Adaptive review surfaces your weak spots first.
AI-generated: this write-up was drafted by AI from the project's source code and may contain inaccuracies.
Japan Memory Atlas is a spaced-repetition quiz for learning Japan's geography — all 47 prefectures and the 23 wards of Tokyo. You answer on an interactive SVG map: the map highlights a region and you pick its name, or it shows a name and you click the region. Every region is a flashcard scheduled by an FSRS algorithm, and all progress lives in the browser's localStorage — there is no account and no server. It is live and usable at alpha stage.
Architecture
The two decks (prefectures and Tokyo wards) are built from one createQuizStore factory, each a Zustand store wrapped in the persist middleware against a distinct localStorage key. Scheduling is delegated to ts-fsrs. Because FSRS Card objects hold Date fields that don't survive JSON.stringify, every card is serialized to ISO strings on write and rehydrated on read; the store version-tags its data and a migrate step resets cards on a schema bump.
Interactive SVG map ◀── click targets ── region geometry
│
│ answer (correct / incorrect)
▼
┌─────────────────────────────────────────────┐
│ Quiz store (Zustand + persist) │
│ per-region card · answer history · stats │
└─────────────────────────────────────────────┘
│ │
▼ ▼
ts-fsrs (schedule) localStorage (ISO-serialized)
│
▼
generateSession: due → new → weakest seenScheduling
Rating is binary. A correct answer maps to FSRS Good, an incorrect one to Again; reviewCard runs the card through fsrs.repeat and stores the next due date, stability, and difficulty. Response time is recorded in each card's answer history for stats (average response time, streak), but it is deliberately kept out of the recall signal — the four-grade FSRS scale is collapsed to two so a slow-but-correct answer is still just a pass.
generateSession orders a session by priority: cards already due for review come first (sorted by due date), then unseen new cards, and only when neither fills the session does it fall back to the weakest seen cards, ranked by recent accuracy over the last 10 answers. Easy mode adds three random distractors per question; the question direction is chosen up front and locked for the session.
Progress tracking
Per region, the store keeps a capped rolling history of answers (correct/incorrect, response time, mode). A region counts as "mastered" once its recent history has at least five answers at 90%+ accuracy — surfaced as 47 prefecture and 23 ward progress bars, plus session counts, a daily streak keyed on the local date, and the mastery heatmap drawn from FSRS stability and recent accuracy. Since everything is client-side, rehydration is defensive: if localStorage is corrupted the store marks itself hydrated anyway so the UI never hangs on the loading spinner.