• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
jonmaim

jonmaim

flashcard

anki-style flash cards
Public
Like
flashcard
Home
Code
10
backend
4
frontend
3
shared
2
.vtignore
AGENTS.md
ARCHITECTURE.md
GETTING_STARTED.md
README.md
deno.json
H
main.ts
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
GETTING_STARTED.md
Code
/
GETTING_STARTED.md
Search
…
GETTING_STARTED.md

Getting Started with Flashcard Learning App

Quick Start Guide

1. Deploy to Val Town

  1. Upload all project files to Val Town
  2. Set the Val type to HTTP Val
  3. Set entry point to main.ts
  4. Save and preview!

2. First Use

  1. Open the app in your browser
  2. Enter a username (any name you like - creates a new account)
  3. Create your first deck (e.g., "Spanish Vocabulary")
  4. Add some cards:
    • Front: "Hello"
    • Back: "Hola"
  5. Click "Study" to start learning!

3. Understanding the Study Mode

When you study:

  • Card shows the front (question)
  • Try to recall the answer
  • Click "Show Answer"
  • Rate your recall:
    • πŸ”΄ Again: Didn't remember β†’ see again tomorrow
    • 🟠 Hard: Difficult β†’ see in a few days
    • 🟒 Good: Normal recall β†’ see in ~1-2 weeks
    • πŸ”΅ Easy: Perfect recall β†’ see in a month

The app learns which cards are hard for you and shows them more often!

Project Structure

flashcard/
β”œβ”€β”€ main.ts                      # Entry point
β”œβ”€β”€ README.md                    # Overview and features
β”œβ”€β”€ ARCHITECTURE.md              # Technical deep-dive
β”œβ”€β”€ GETTING_STARTED.md          # This file
β”‚
β”œβ”€β”€ backend/                     # Server-side code
β”‚   β”œβ”€β”€ index.ts                # Hono app setup
β”‚   β”œβ”€β”€ storage.ts              # Blob storage
β”‚   └── routes/                 # API endpoints
β”‚       β”œβ”€β”€ auth.ts             # Login
β”‚       β”œβ”€β”€ decks.ts            # Deck CRUD
β”‚       β”œβ”€β”€ cards.ts            # Card CRUD
β”‚       β”œβ”€β”€ study.ts            # Spaced repetition
β”‚       β”œβ”€β”€ stats.ts            # Statistics
β”‚       └── backup.ts           # Export/import
β”‚
β”œβ”€β”€ frontend/                    # Client-side code
β”‚   β”œβ”€β”€ index.html              # UI layout
β”‚   └── index.js                # App logic
β”‚
└── shared/                      # Shared code
    └── types.ts                # Types + SR algorithm

Features Overview

βœ… What You Can Do

  • ✨ Create unlimited decks and cards
  • 🎯 Study with proven spaced repetition (SM-2 algorithm)
  • πŸ“Š Track your learning progress
  • πŸ’Ύ Backup/restore your data
  • πŸ“± Works on mobile and desktop

🧠 How Spaced Repetition Works

Instead of cramming, this app:

  1. Shows cards at optimal intervals
  2. Focuses on cards you're about to forget
  3. Spaces out cards you know well
  4. Adapts to your learning speed

Result: Better retention with less time studying!

Example Use Cases

Language Learning

  • Deck: "French Vocabulary"
  • Cards: English β†’ French translations
  • Result: Build vocabulary naturally over weeks/months

Medical Studies

  • Deck: "Anatomy Terms"
  • Cards: Term β†’ Definition + location
  • Result: Retain complex terminology long-term

Programming

  • Deck: "Python Syntax"
  • Cards: Concept β†’ Code example
  • Result: Memorize syntax patterns

General Knowledge

  • Deck: "World Capitals"
  • Cards: Country β†’ Capital city
  • Result: Fun trivia learning

Tips for Effective Learning

Card Creation

  • βœ… Keep cards simple (one concept per card)
  • βœ… Use clear, concise language
  • βœ… Add context when needed
  • ❌ Avoid long paragraphs
  • ❌ Don't make cards too easy or too hard

Study Habits

  • βœ… Study daily (even just 5-10 minutes)
  • βœ… Be honest with ratings
  • βœ… Focus on understanding, not just memorization
  • βœ… Take breaks between sessions
  • ❌ Don't cram before tests (start early!)

Rating Guidelines

  • Again (1): Completely forgot or got it wrong
  • Hard (2): Struggled but eventually remembered
  • Good (3): Recalled with reasonable effort
  • Easy (4): Instant, effortless recall

Understanding Your Stats

Total Cards

Number of flashcards you've created across all decks.

Total Reviews

How many times you've reviewed cards (each rating counts as 1 review).

Study Time

Cumulative time spent in study sessions (hours and minutes).

Accuracy

Percentage of reviews rated "Good" or "Easy" (higher = better retention).

Session History

Detailed log of each study session:

  • When you studied
  • Which deck
  • How long
  • How many cards
  • Success rate

Backup & Restore

Why Backup?

  • Protect against accidental data loss
  • Move data between Val Town accounts
  • Keep version history
  • Share decks with others (JSON format)

How to Backup

  1. Click "Backup" in navigation
  2. Click "Download Backup"
  3. Save the JSON file somewhere safe (e.g., Google Drive, Dropbox)

How to Restore

  1. Click "Backup" in navigation
  2. Click "Choose File" and select your backup JSON
  3. Click "Restore Backup"
  4. Confirm (⚠️ this replaces current data!)

Troubleshooting

Cards aren't showing in study mode

  • Check if cards are due (new cards are due immediately)
  • Make sure the deck has cards
  • Try refreshing the page

Lost my data

  • Did you use the same username?
  • Check if you have a backup file
  • Contact Val Town support if needed

Stats seem wrong

  • Stats calculate based on completed sessions
  • Try logging out and back in
  • Check backup file for data integrity

App not loading

  • Check Val Town status
  • Try clearing browser cache
  • Check browser console for errors

Next Steps

Learn More

  • Read ARCHITECTURE.md for technical details
  • Read README.md for full feature list
  • Visit Anki Manual to learn about spaced repetition

Customize

  • Modify CSS in frontend/index.html for styling
  • Adjust SM-2 parameters in shared/types.ts
  • Add new features (see README for ideas)

Share

  • Export decks as JSON
  • Share with friends/classmates
  • Contribute improvements

Support

This is an open-source project built for Val Town.

For Val Town platform issues, see Val Town Documentation.

For spaced repetition questions, research the SuperMemo SM-2 algorithm.


Happy Learning! πŸŽ“

Remember: Consistent daily practice beats intense cramming. The algorithm works best when you:

  1. Study regularly (even 5-10 min/day)
  2. Rate honestly (don't grade yourself too easily)
  3. Trust the process (cards will come back at the right time)

Good luck with your learning journey! πŸš€

FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
Β© 2025 Val Town, Inc.