Skip to content

MHarrisT/Study-Deck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StudyDeck ⚡

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.

Node.js SQLite License

Quick Start

# Install dependencies and start the app
npm install && npm start

Then open http://localhost:3000 in your browser.

Requirements

  • Node.js 18+Download here
  • That's it. No database server, no Docker, no build step.

Features

Core CRUD

  • 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

Beyond CRUD: Spaced Repetition Study Mode

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.

Tech Stack

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

Project Structure

├── 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

API Endpoints

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)

About

⚡ A spaced repetition flashcard app built with Node.js, Express & SQLite. Create decks, add cards, and study with the SM-2 algorithm — the same scientifically-backed scheduling used by Anki. Features a dark glassmorphism UI with card flip animations. Run with: npm install && npm start

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors