A spaced repetition flashcard app that helps you learn anything efficiently. Create decks, add flashcards, and study using the SM-2 algorithm — the same scientifically-backed scheduling method used by Anki and SuperMemo.
# Install dependencies and start the app
npm install && npm startThen open http://localhost:3000 in your browser.
- Node.js 18+ — Download here
- That's it. No database server, no Docker, no build step.
- Create, edit, and delete decks — organize your flashcards by topic
- Create, edit, and delete cards — each card has a front (question) and back (answer)
- Persistent storage — SQLite file database survives restarts
The standout feature is the spaced repetition study engine, which goes far beyond basic CRUD:
- Cards are automatically scheduled for review based on how well you know them
- After viewing a card's answer, rate your recall: Again, Hard, Good, or Easy
- The SM-2 algorithm adjusts the review interval — cards you struggle with appear more often, cards you know well appear less
- A study session shows your progress, accuracy, and per-card scheduling
- Card flip animation for an engaging study experience
Why this matters: Without spaced repetition, studying flashcards is just random repetition. SM-2 ensures you review material right before you'd forget it — maximizing retention with minimum effort. This transforms a CRUD demo into a genuine learning tool.
| Layer | Technology | Why |
|---|---|---|
| Runtime | Node.js | Universal, easy setup |
| Server | Express | Minimal, well-known, zero config |
| Database | SQLite (better-sqlite3) | File-based, zero external deps, survives restarts |
| Frontend | Vanilla HTML/CSS/JS | No build step, runs immediately |
├── server.js # Express server entry point
├── db.js # SQLite setup, schema, SM-2 algorithm
├── routes/
│ ├── decks.js # Deck CRUD API
│ ├── cards.js # Card CRUD API
│ └── study.js # Study session + review API
├── public/
│ ├── index.html # SPA shell
│ ├── style.css # Dark theme design system
│ └── app.js # Client-side SPA logic
├── package.json
├── ANSWERS.md # Assessment answers
└── README.md
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/decks |
List all decks with stats |
| POST | /api/decks |
Create a new deck |
| GET | /api/decks/:id |
Get a single deck |
| PUT | /api/decks/:id |
Update a deck |
| DELETE | /api/decks/:id |
Delete a deck + its cards |
| GET | /api/decks/:deckId/cards |
List cards in a deck |
| POST | /api/decks/:deckId/cards |
Add a card to a deck |
| PUT | /api/cards/:id |
Update a card |
| DELETE | /api/cards/:id |
Delete a card |
| GET | /api/decks/:deckId/study |
Get due cards for study |
| POST | /api/cards/:id/review |
Submit review rating (SM-2) |