AnkiLite — Time-Aware Spaced Repetition Flashcards
Tags: Angular · Django REST · JWT Auth · SQLite · MongoDB · Spaced Repetition · Time-Aware Grading
AnkiLite is an Anki-inspired flashcards + spaced repetition web app, built end-to-end with a focus on transparency and control. Instead of hiding the scheduling logic, AnkiLite makes review behavior configurable per deck and adds time-aware learning signals (how quickly you answered) to support smarter practice workflows.
What Makes It Distinct (Not a Clone)
- Per-deck scheduling settings: each deck controls the intervals for Again/Hard/Good/Easy, and you can edit these settings anytime.
- Two scheduling modes: Fixed (exact user-defined intervals) and Hybrid (starts from your intervals and scales over time).
- Time-aware grading signals: the app records how long you took to think and how long you took to choose a grade (useful for analytics + prioritization).
- Force review: you can “force due” a deck to review immediately (optionally resetting progress).
- Cram mode: practice cards even when nothing is due (good for last-minute studying).
User Flow
- Register / Login (JWT)
- Create decks (with configurable review intervals)
- Add cards (front/back + optional tags)
- Review in either:
- Due (SRS): only shows cards currently scheduled as due
- Cram: shows cards for practice even if not due
Scheduling Modes
Each deck supports two deterministic scheduling modes:
- Fixed: Again/Hard/Good/Easy always schedule the next due time using the exact deck-defined intervals (great for “I want full control”).
- Hybrid: starts from the deck-defined intervals, then scales future intervals based on the card’s ease / repetition history (more like a traditional SRS feel, but still grounded in user settings).
Review Signals (Time-Aware)
For every review, AnkiLite records timing metadata:
- think_ms: time from card shown → answer revealed (or grade click if never revealed)
- grade_ms: time from reveal → grade click
- session_id: groups a review session
These are stored as review events so you can later analyze difficulty trends, “hesitation” cards, speed vs accuracy, and overall study behavior.
Backend Design
- Django REST + SimpleJWT for authentication and APIs
- SQLite for core relational entities (users, decks, cards, deck settings)
- MongoDB for append-only review event logs (timing + grade history)
Core API Endpoints
POST /api/auth/registerPOST /api/auth/loginGET /api/auth/meGET /api/decks,POST /api/decksPATCH /api/decks/:id(update deck scheduling)POST /api/decks/:id/cardsPOST /api/decks/:id/force_dueGET /api/review/due(SRS queue)GET /api/review/cram(practice queue)POST /api/review/:card_id(submit grade + timing)
Frontend Design
- Angular standalone components + route pages
- JWT stored client-side + attached via interceptor
- Clean “Decks → Add Cards → Review” workflow
- Review UI supports:
- Deck selection (or All decks)
- Due vs Cram mode
- Progress indicator
- Done state with sensible next actions
Repo Structure (High-Level)
backend/— Django project (accounts, decks, reviews, scheduling logic, Mongo logging)frontend/— Angular app (login, decks, review pages + services)docker-compose.yml— MongoDB container for event logs
Run Locally
- Backend:
- Activate venv
- Run migrations
python manage.py runserver(http://127.0.0.1:8000)
- MongoDB:
docker compose up -d
- Frontend:
npm installnpm start(http://localhost:4200)
Future Ideas
- Stats dashboard (streaks, speed trends, accuracy per deck)
- Import/export (CSV / Anki format)
- Markdown/LaTeX card rendering
- Smarter prioritization using timing + lapses
- Offline mode (IndexedDB)