Skip to content

Flashcard Editor

Generated artifact. Do not edit manually.

Generated by: scripts/build_compendia.py Regenerate with: python3 scripts/build_compendia.py --compendium dev-handbook --web-and-tex Source of truth: docs/dev/source/

Language / Sprache: English (EN) · Deutsch (DE) | PDF: English PDF · Deutsches PDF

Compendium: §1 Documentation Guidelines · §2 Landscape JSON Reference · §3 Minimal Schema & Fallback · §4 Authoring Editors · §5 Graph Editor · §6 Flashcard Editor · §7 Node Ordering · §8 Liquibase · §9 Auto-Update (SSE)


6. Flashcard Editor

The local Flashcard Editor (/flashcard-editor, implemented in FlashcardEditorView.tsx and FlashcardFlipCard.tsx backed by Vite dev middleware /__deck-editor/{list,load,save}) authors and previews spaced-repetition decks (*_deck*.json) with live KaTeX math and Markdown rendering.

6.1. Deck JSON Schema, Bilingual Pairing, and Dual-Write Save

{
  "deckId": "physics_sek2_q1_fields_deck",
  "title": "Q1 Elektrisches und magnetisches Feld",
  "cards": [
    {
      "id": "q1-field-01",
      "front": "Definiere die elektrische Feldstaerke $E$.",
      "back": "$E = \\frac{F}{q}$ in $\\mathrm{N/C}$ bzw. $\\mathrm{V/m}$.",
      "category": "Grundbegriffe",
      "tags": ["GK", "LK"]
    }
  ]
}

Authoring invariants:

  • Required card fields: Every deck defines deckId, title, and cards[]; each card carries a deck-unique id, front, back, category, and optional tags (string[]). Card IDs must remain stable so existing learner SM-2 and verifiedRecall records (Node Types) stay bound.
  • DE / EN deck pairing: Optional English companion decks (*_deck.en.json) align card-by-card via identical id values so learners can switch languages without losing recall state.
  • Dual-write persistence (repository mode): Saving via /__deck-editor/save writes both the canonical file under curricula/... and its runtime mirror under app/public/data/<basename>.json (whereas standalone package mode resolves decks from data/cards/ via CurriculumResourceResolver).