DevPrep
  • Interview Prep
  • Projects
  • Resources
  • Pricing
  • About Us
Submit Question
DevPrep
  • Pricing
  • About Us
Submit Question
← From Beginner to Expert in Fundamentals of Frontend
  • Project 1: The Performance-First Dashboard
  • Project 2: Accessible Video Player
  • Project 3: Markdown Blog Engine
  • Project 4: Browser-Based Code Editor
  • Project 5: Multi-Tab Whiteboard
  • Project 6: Infinite Scroll Image Gallery
  • Project 7: Recipe Optimizer & Converter
  • Project 8: Budget Tracker with Charts
  • Project 9: Typing Speed Test
  • Project 10: Weather App with Time-Travel
  • Project 11: CSS Grid Layout Builder
  • Project 12: Password Vault (Frontend Only)
  • Project 13: Kanban Board (Trello Clone)
  • Project 14: Quiz App with Leaderboard
  • Project 15: Habit Tracker (GitHub Style)
  • Project 16: E-commerce Product Page
  • Project 17: Unit Converter (Expert Mode)
  • Project 18: Music Visualizer
  • Project 19: Flashcard Learning App
  • Project 20: Custom Form Validator
  • Project 21: Virtual Terminal
  • Project 22: Pomodoro Timer (Focus Pro)
  • Project 23: SVG Path Editor
  • Project 24: Movie Database Matchmaker
  • Project 25: Interactive Resume / Portfolio
  • Project 26: Recipe Scraper UI
  • Project 27: Crypto Tracker (Real-Time)
  • Project 28: Find My Pet (PWA)
  • Project 29: Markdown-to-Slide Tool
  • Project 30: Browser Health Dashboard
← From Beginner to Expert in Fundamentals of Frontend

Project 19: Flashcard Learning App

40 min read
SM-2 AlgorithmCSS 3D TransformsSpaced RepetitionFile ImportProgress TrackingCard Scheduling

📋 Project Brief

Build a spaced-repetition flashcard app using the SM-2 algorithm (Anki-style). Cards are scheduled based on how well the user remembers them, with intervals increasing for well-known cards and decreasing for difficult ones. Includes 3D flip animations and a progress dashboard.

✅ Feature Requirements

Feature 1: 3D Card Flip

Acceptance Criteria:

  • Clicking a card triggers a CSS 3D flip animation (transform: rotateY(180deg))
  • The front shows the question; the back shows the answer
  • The flip must use perspective and backface-visibility: hidden
  • Flip duration: ~400ms with an ease-in-out curve
  • Clicking again (or pressing Space) flips back

Feature 2: SM-2 Spaced Repetition

Acceptance Criteria:

  • After viewing the answer, the user rates difficulty: "Again" (Hard), "Good," or "Easy"
  • Again: Card reappears in 1 minute, then 10 minutes
  • Good: Interval doubles from the previous interval (1d → 2d → 4d → 8d...)
  • Easy: Interval triples
  • Each card stores: interval, ease_factor, repetition_count, next_review_date
  • On app open, show only cards where next_review_date ≤ today

Feature 3: Markdown Support

Acceptance Criteria:

  • Card content supports Markdown: bold, italic, code blocks, lists
  • Code snippets render with syntax highlighting
  • Math formulas supported via basic LaTeX notation (stretch)
  • Images can be embedded via URL

Feature 4: Progress Dashboard

Acceptance Criteria:

  • Circular progress chart: "Cards Mastered" (interval > 21 days) vs. "Learning" vs. "New"
  • Daily review count: "Reviewed 15 cards today"
  • Streak tracker: consecutive days of reviews completed
  • Forecast: "You have ~8 cards due tomorrow, ~12 in 3 days"

Feature 5: Deck Import

Acceptance Criteria:

  • Import decks from CSV or JSON files
  • CSV format: front,back (one card per row)
  • JSON format: [{ "front": "...", "back": "..." }]
  • Show a preview of the first 5 cards before confirming import
  • Duplicate detection: skip cards that already exist in the deck

📊 SM-2 Algorithm Reference

RatingEffect on IntervalEffect on Ease Factor
Again (0-1)Reset to 1 minuteDecrease by 0.2 (min: 1.3)
Good (3)Previous interval × Ease FactorNo change
Easy (5)Previous interval × Ease Factor × 1.3Increase by 0.15

🧪 Testing Checklist

  • Unit test SM-2 interval calculations for all ratings
  • Unit test ease factor clamping (never below 1.3)
  • Unit test "due today" filtering logic
  • Unit test CSV/JSON parsing
  • Integration test: rating a card updates its next review date correctly

🚀 Stretch Goals

  • Add audio pronunciation for language learning cards
  • Implement card tags/categories for organized study
  • Add a "Cram Mode" that shows all cards regardless of schedule
  • Implement cloud sync for cross-device study sessions

Practice

  • JavaScript
  • DSA
  • Machine Coding
  • System Design

Resources

  • Learning Tracks
  • Articles
  • Roadmaps
  • Compare Concepts
  • Glossary
  • Developer Tools
  • All Questions

Company

  • About
  • Pricing

Legal

  • Privacy Policy
  • Terms of Service
DevPrep

© 2026 DevPrep. All rights reserved.