link: https://flashcard-engine-0y75.onrender.com
An AI-assisted flashcard platform that converts PDFs into practice-ready decks and schedules reviews using spaced repetition.
Students usually re-read notes passively. This app pushes active recall and long-term retention:
- Upload a PDF and instantly generate high-quality flashcards.
- Practice cards with a review loop that adapts to your performance.
- Track mastery, weak spots, and upcoming reviews.
- Manage multiple decks with search and quick resume.
- PDF ingestion and text extraction using
pdf-parse. - AI card generation using OpenRouter chat completions (
OPENROUTER_API_KEY). - Heuristic fallback generator when no API key is present.
- SM-2 inspired spaced repetition (Again/Hard/Good/Easy).
- Deck browser with due count and mastery score.
- Study queue that prioritizes due cards.
- Progress panel with weak/improving/strong buckets.
- Responsive UI built with React + Vite.
- Frontend: React, TypeScript, Vite
- Backend: Node.js, Express, TypeScript
- Storage: JSON file store (
server/data/decks.json) - PDF Parsing:
pdf-parse - Validation:
zod
- Install dependencies:
npm install
npm install --prefix server
npm install --prefix client- Create env file from sample:
cp .env.example .env-
Optional but recommended: set
OPENROUTER_API_KEYin.env. -
Run both frontend and backend:
npm run dev- Open:
- Frontend: http://localhost:5173
- Backend API: http://localhost:8787/api/health
Each card stores:
repetitionsintervalDayseaseFactordueAtreviewCountlapses
Rating behavior:
Again: resets repetitions, lowers ease factor, reintroduces quickly.Hard/Good/Easy: increases intervals and adjusts ease factor.
Cards due now are surfaced first in each study queue.
GET /api/decks?q=...POST /api/decks/import-pdf(multipart field:file)GET /api/decks/:deckIdGET /api/decks/:deckId/study?limit=20POST /api/decks/:deckId/reviewbody:{ cardId, rating }GET /api/decks/:deckId/progress
This repo includes render.yaml for one-service deployment.
- Push this repo to GitHub.
- In Render, choose New > Blueprint.
- Select the repository.
- Add
OPENROUTER_API_KEYin Render environment variables. - Deploy.
- Build command:
npm install && npm run build - Start command:
npm run start - Environment variables:
OPENROUTER_API_KEY(required for AI generation)OPENROUTER_MODEL(optional, defaults toopenai/gpt-4.1-mini)OPENROUTER_SITE_URL(optional but recommended for OpenRouter analytics)OPENROUTER_APP_NAME(optional display name for requests)PORT(Render sets this automatically)
- Per-user auth and cloud DB instead of file storage.
- Better extraction for equation-heavy PDFs and scanned docs (OCR).
- Deck editing (merge/split/regenerate cards).
- Richer analytics (retention over time, goal streaks).
- Offline mobile mode with sync.