This guide explains how to set up Auto Flashcards, import decks, write cards, and study with the web UI.
- Install Node and npm (Node 18+). Install Python 3.9+.
- Install website dependencies:
cd website && npm install
- Start the app:
npm run dev(ornpm run dev:debugfor extra logs)
- Open http://localhost:3000 in your browser.
Cards are Markdown files with a title and two sections.
Example card:
# Card Title
## Front
State the Cauchy–Schwarz inequality.
## Back
For vectors $x, y$ in an inner product space:
$$\lvert\langle x, y \rangle\rvert \le \lVert x \rVert \cdot \lVert y \rVert$$
- Place cards in
obsidian_notes/flashcards/(or setFLASHCARDS_DIR). - You may create subfolders (e.g.,
obsidian_notes/flashcards/linear-algebra/) to group cards. - The UI supports filtering by group.
- Inline:
$...$or\(...\) - Display:
$$...$$or\[...\] - Escaped dollar:
\$renders as$. - Inline code (
`...`) is protected from math parsing.
- Put media under
obsidian_notes/flashcards/files/. - Reference in Markdown as
. - The site serves
/files/<filename>automatically.
Use xml_to_markdown.py to turn XML decks into Markdown cards.
Basic usage:
python xml_to_markdown.py "MyDeck.xml" --output_dir obsidian_notes/flashcards/MyDeck
python xml_to_markdown.py <deck1.xml> [<deck2.xml> ...]
- Home page queues cards using the selected scheduler.
- Press “Show Answer”, then grade with Again/Hard/Good/Easy.
- The app logs your reviews to
website/data/history.json. - Browse Cards: edit titles and Front/Back directly in the UI and preview rendering.
- The default scheduler is SM-2–like.
- Add your own under
website/src/algorithms/and register inindex.ts. - The API
/api/nextuses the active scheduler to pick the next N cards.
- Use
npm run dev:debugto enable extra logs:- Card parsing (
DEBUG_CARDS=1): prints section extraction info for each card. - Markdown rendering (
NEXT_PUBLIC_DEBUG_MD=1): logs input/output previews to the browser console.
- Card parsing (
- Test the section extractor:
npm run test:cards(validates multi-line## Front/## Backextraction)
- Keep each card focused; break large topics into multiple cards.
- Prefer short Front prompts with Back explanations, examples, and formulas.
- Use display math (
$$...$$) for multi-line equations; inline ($...$) for short expressions. - Store large images or attachments under
obsidian_notes/flashcards/files/and link to them.