A single-page math flashcard game for kids. Pick a section (Addition, Subtraction, Multiplication, Division), pick a level, and answer 10 multiple-choice arithmetic questions. There's a "Cheat" button that reveals the correct answer a limited number of times per level, at the cost of points — hence the name.
Live logic lives entirely client-side; there's no backend or persistence layer. Progress and scores exist only for the duration of a level.
- Vue 3 (
<script setup>SFCs) + TypeScript - Vite 8 as the build tool
- vue-router 5 with hash history, for
/sectionand/section/levelroutes - Tailwind CSS 4 + daisyUI 5, configured entirely via CSS (
src/style.css) using@import/@plugin/@theme— there is notailwind.config.jsorpostcss.config.jsin Tailwind v4 - unplugin-icons for
~icons/feather/*imports, backed by@iconify-json/feather - howler for sound effects
- @unhead/vue for
<title>management - vue-tsc for type-checking
.vuefiles duringpnpm build
src/
main.ts entry point: creates the Vue app, head, router
routes.ts route table + a beam analytics pageview hook
App.vue root layout: header + <RouterView>
types.ts shared types (Section, Level, Question, ...)
sections.ts the 4 sections' data + generateLevel() question generator
sounds.ts Howler sound effect wrappers
utils.ts shuffle/format helpers + LevelMetrics (per-level scoring/timing)
pages/
HomePage.vue lists all sections
SectionPage.vue lists the 8 levels for one section
LevelPage.vue the actual flashcard game + end-of-level summary
components/
SiteHeader.vue, SiteFooter.vue, NavBreadcrumbs.vue, LevelLinks.vue
assets/sounds/ mp3 files played via howler
Routing is /:section and /:section/:level, with section/level passed
in as string props. Both SectionPage.vue and LevelPage.vue look up the
section by id via sections.find(...) (so it's typed Section | undefined)
and redirect to / if the id doesn't match a known section — this guards
against arbitrary/stale URLs.
pnpm install
pnpm dev # start Vite dev server
pnpm build # type-check (vue-tsc) + production build to dist/
pnpm preview # preview the production buildThis repo uses pnpm (see pnpm-workspace.yaml). There's no test suite.
- TypeScript is pinned to
^6.0.3, not thelatest/7.xline. TypeScript 7 is a from-scratch native (Go-based) rewrite with a completely different package layout — it no longer exposes the classictypescript/lib/tscentry point thatvue-tsc(and most of the current Vue tooling) depends on. Installingtypescript@latestwill breakpnpm buildwithERR_PACKAGE_PATH_NOT_EXPORTED. Keep TypeScript on the last classic-architecture 6.x release untilvue-tsc/@vue/language-coreship native-TS-7 support, then re-evaluate. - Tailwind v4 + daisyUI config lives in
src/style.css, not in JS/CS config files. If you're looking for theme/plugin config, look there, not for atailwind.config.js. autoprefixer/postcss.config.jswere removed — Tailwind v4's Vite plugin (@tailwindcss/vite) handles CSS transforms itself.generateLevel()insections.tsprocedurally generates questions and wrong-answer distractors per operator; there's no static question bank.- Levels 1–8 per section; level difficulty scales via
factorA = level + 1.