HFU Digital Docs
LoopKit

LoopKit

Production-ready flashcard engine with SM-2 spaced repetition for NestJS and React

LoopKit is a production-ready flashcard engine implementing the SM-2 spaced repetition algorithm. It handles deck hierarchies, note types, card scheduling, and content rendering. It ships as two packages that work together.

Packages

PackageDescription
@hfu.digital/loopkit-nestjsBackend NestJS module with pluggable storage, SRS algorithms, and content pipeline
@hfu.digital/loopkit-reactFrontend library with headless hooks and pre-styled study components

Key Features

  • SM-2 Spaced Repetition — Battle-tested algorithm with configurable parameters
  • Pluggable Storage — Bring your own database via the storage adapter pattern (Prisma adapter included)
  • Algorithm Pluggability — Swap SM-2 for any custom algorithm via the SRSAlgorithm interface
  • Headless-First Frontend — Hooks for full control, plus optional pre-styled components
  • Content Pipeline — Template interpolation with optional Markdown, KaTeX, code-highlighting, and HTML-sanitization transforms
  • Import / Export — CSV and JSON import/export for deck portability
  • Statistics — Pure functions for retention rate, study streak, review forecast, and more
  • Undo Support — Undo the last review during a study session
  • Deck Hierarchy — Nested decks with inherited configuration

Versioning

CalVer (yyyy.mm.version). Pin exact versions in package.json; range operators (^, ~) do not behave like semver across month boundaries. See the docs root for details.

On this page