Build a Leitner-Box Flashcard Trainer with Spaced Review in One HTML File

Produces a single-file flashcard app with a five-box Leitner schedule, deck import by pasted text, flip animation, keyboard controls, and progress stats so you know what to study today.

You getFull HTML file in one code block, A sample 8-card deck about {subject} the user can paste to… and risks and missing information table

The prompt

Prompt
Role: You are a front-end developer and learning-science-aware tool builder who ships simple, reliable study apps.

Context: I am studying Spanish vocabulary for travel (example value for {subject}) with this goal: hold a basic conversation on a trip in eight weeks (example value for {study_goal}). My starting deck has about 150 (example value for {deck_size}) cards. The decision this tool supports is what to review today and which cards need more work.

Task: Build one self-contained HTML file (inline CSS and JS, no libraries, no network) implementing a Leitner-box flashcard trainer.

Inputs (state any assumptions first):
- Deck input: pasted text, one card per line, front and back separated by a tab, semicolon or ' :: '
- Review intervals per box (default: box 1 daily, box 2 every 2 days, box 3 every 4 days, box 4 every 8 days, box 5 every 16 days)
- Optional daily new-card limit (default 20)

Workflow:
1. List assumptions separately (what 'due' means, how a wrong answer is handled: move back to box 1, how dates are compared: local calendar days).
2. Build an import panel with a parse preview showing the card count and any lines that were skipped, with the reason.
3. Build the study view: show the front, flip with Space or click, then grade with 'Got it' (key 1) or 'Missed' (key 2). Only cards due today appear.
4. Update box number and next-due date on each grade; save everything in localStorage.
5. Show a stats strip: due today, cards per box as a small SVG bar chart, accuracy this session, and a 'streak of study days'.
6. Add Edit card, Delete card, Reset deck and Export deck as text; confirm destructive actions.
7. When nothing is due, show the next due date and a button to study ahead by 10 cards.

Constraints: Offline only, no external fonts. Respect prefers-reduced-motion for the flip. All controls must be keyboard reachable, with visible focus. Escape card text. Do not claim the schedule guarantees memory retention.

Output format:
1. Assumptions
2. Full HTML file in one code block
3. A sample 8-card deck about Spanish vocabulary for travel (example value for {subject}) the user can paste to test
4. Risks and missing information table (risk, impact, next action)
5. Next actions: three suggestions for improving the deck or the app

Acceptance criteria:
- Importing the sample deck creates the right number of cards and skips malformed lines with a visible reason
- Grading moves cards between boxes as specified and schedules the right due date
- Progress and streak persist after refresh
- The entire study loop works with the keyboard alone

Quality checks: Trace one card through a miss in box 3 and a correct answer in box 1, and confirm the due dates. Check for empty-deck behavior, duplicate fronts, and date handling around midnight. Report anything you could not verify.

Dashed parts are example values, so the prompt runs as copied. Change them in Fill in the blanks.

Replace the subject and goal with your own material, then paste your deck into the import box. Keep cards atomic, one fact each, for best results. Export the deck periodically as a backup.

Make it repeatable

Keep using this prompt without pasting it in every time.

Prompt details

By
Prompts-GPT editors
Published
How prompts are written and checked

Did this prompt work?

Keep exploring

More in Mini Apps & Tools