data/socialstudies.jsonis the default deck served to the browser; update or replace it to change the prompt set.data/card-state.jsonstores live spaced-repetition progress and can be deleted (while the server is stopped) to reset the scheduler.data/vocab.jsonplusdata/card-state-vocab.jsonhold an alternate vocabulary deck/state if you want to swap content sources.
npm startlaunches the production-like Express server with the current assets.npm run devstarts the Nodemon/parcel combo in watch mode for hot reloads across the API and front-end.
- Standard run:
npm startboots the Express server in the current shell; point your browser at http://localhost:3000 once it prints "Server listening". - Hot-reload/dev mode:
npm run devkeeps both the server and front-end in watch mode so changes auto-reload; cancel withCtrl+C. - Data source: both modes read the same deck at
data/socialstudies.json, so update that file (or drop in a replacement) before launching if you want fresh content.
Local-first flashcard web app tailored to the provided social studies questions. Every time you score yourself, the server persists the schedule so you can stop and resume later without losing place.
- Express server that serves the UI and JSON endpoints (
/api/cards/next,/api/cards/:id/rate). - Smart scheduling rules that interpret Trivial, Easy, Normal, and Hard into increasingly spaced review intervals (or retire the card altogether).
- Front-end card experience with flip animation, progress counters, and live feedback.
- Persistent progress stored in
data/card-state.jsonso that restarting the app resumes the queue exactly where you left it.
- Node.js 18.x or newer (includes
npm). - The provided
data/socialstudies.jsondeck (already copied into the repo).
- Install dependencies (run inside this folder):
npm install
- Start the server:
npm start
- Visit http://localhost:3000 in your browser.
During development you can use the hot-reload script:
npm run dev- The master deck lives in
data/socialstudies.json. - Runtime progress is stored in
data/card-state.json. It is already ignored by git so you can freely reset progress by deleting that file while the server is stopped.
| Method | Path | Description |
|---|---|---|
GET |
/api/cards/next |
Returns the next due card plus deck statistics. |
POST |
/api/cards/:id/rate |
Saves a rating (trivial, easy, normal, hard) and returns the updated queue. |
GET |
/api/health |
Lightweight status check. |
Each response includes meta counts so the UI can keep its counters in sync.
- If
npmis not available on your system, install Node.js 18+ and retrynpm install. - If you want to start over, delete
data/card-state.json(with the server stopped) and the scheduler will rebuild fresh on next launch.