A beautiful, editorial-styled flashcard app with spaced repetition, custom decks, and 420+ predefined cards across 10 knowledge domains.
- 📇 10 predefined decks, 420 cards total — World Capitals, Chemistry Elements, Historical Events, Programming Concepts, Human Anatomy, Famous Scientists, Literature, Mathematics, Spanish Vocabulary, and General Knowledge
- ✍️ Create custom decks with a simple
front | backsyntax - 🔄 3D card flip animation — click or press
Space - 🧠 Spaced repetition (SM-2 algorithm) — cards you struggle with reappear sooner
- 📊 Session score tracking — correct / wrong / accuracy per session
- 📈 Mastery % per deck — persistent across sessions via localStorage
- ⌨️ Full keyboard support —
Spaceto flip,1–4to grade - 🎨 Editorial paper aesthetic — Fraunces + Instrument Serif + JetBrains Mono
- 📱 Responsive — works beautifully on mobile, tablet, and desktop
- 💾 All data stored locally — no backend, no tracking
# Install dependencies
npm install
# Run dev server
npm run dev
# Build for production
npm run build
# Preview the production build
npm run previewThe dev server runs at http://localhost:5173.
This project comes with a pre-configured GitHub Actions workflow that auto-deploys to GitHub Pages on every push to main.
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/YOUR_USERNAME/flashcard-quiz-app.git
git push -u origin mainIf you name your repo something other than flashcard-quiz-app, open vite.config.js and change the base path:
base: process.env.NODE_ENV === 'production' ? '/YOUR-REPO-NAME/' : '/',- Go to your repo on GitHub → Settings → Pages
- Under Build and deployment, set Source to GitHub Actions
- Push any commit (or re-run the workflow manually from the Actions tab)
- Your site will be live at
https://YOUR_USERNAME.github.io/YOUR-REPO-NAME/
The GitHub Actions workflow (.github/workflows/deploy.yml) handles everything — it installs dependencies, runs npm run build, and publishes the dist/ folder.
| Key | Action |
|---|---|
Space |
Flip the current card |
1 |
Grade as Wrong |
2 |
Grade as Hard |
3 |
Grade as Good |
4 |
Grade as Easy |
The app uses a simplified SM-2 algorithm (the core of Anki and SuperMemo):
- Wrong → repetitions reset, card comes back in the same session
- Hard → small interval growth, ease factor decreases
- Good → standard interval growth (1 day → 3 days → 3×ease...)
- Easy → faster interval growth, ease factor increases
A card is considered mastered after 3 successful reviews.
flashcard-quiz-app/
├── .github/workflows/
│ └── deploy.yml # GitHub Pages auto-deploy
├── public/
│ └── favicon.svg
├── src/
│ ├── components/
│ │ ├── DeckLibrary.jsx # Home screen with all decks
│ │ ├── StudySession.jsx # Main study view
│ │ ├── Flashcard.jsx # Flipping card component
│ │ └── CreateDeckModal.jsx # Custom deck creator
│ ├── data/
│ │ └── predefinedDecks.js # 10 built-in decks (420 cards)
│ ├── hooks/
│ │ └── useLocalStorage.js
│ ├── utils/
│ │ └── spacedRepetition.js # SM-2 algorithm
│ ├── App.jsx
│ ├── main.jsx
│ └── index.css
├── index.html
├── vite.config.js
├── package.json
└── README.md
The app uses an editorial magazine aesthetic — warm cream paper (#f4ead5), deep ink text, ochre and forest-green accents. Typography pairs:
- Fraunces — display headings, card content
- Instrument Serif — italic accents, summary headers
- JetBrains Mono — category labels, keyboard hints, meta text
Cards sit on textured paper with subtle grain overlays and pressed-ink shadows. The flip is a 3D CSS transform on a preserve-3d container.
Click the "+ Create a custom deck" tile on the home screen. Use this format in the cards field:
What is the capital of France? | Paris
Largest planet in our solar system | Jupiter
Author of "1984" | George Orwell
One card per line. Use the pipe (|) to separate front from back.
MIT — use it, fork it, modify it. Have fun learning!
Built with React + Vite. Fonts via Google Fonts. Icons are native emoji.