flashcards Svelte Themes

Flashcards

๐Ÿ“‡ A fast, fully client-side flashcard tool. No login, no server, no analytics.

๐Ÿ“‡ flashcards

A fast, fully client-side flashcard tool. No login, no server, no analytics. Cards live in your browser; export the whole library to JSON any time.

Quick start

Requires Node 20+ and npm.

npm install
npm run dev

Opens at http://localhost:5173 with hot module reload.

Scripts

Command What it does
npm run dev Vite dev server with HMR
npm run build Production build โ†’ dist/
npm run preview Serve the production build locally
npm run check svelte-check (types + Svelte diagnostics)

Stack

Builds to ~46 KB gzipped JS + ~3.5 KB CSS, under the 50 KB target.

Project layout

src/
โ”œโ”€โ”€ App.svelte            โ† top-level layout + view switch
โ”œโ”€โ”€ app.css               โ† CSS tokens, shared button system, base styles
โ”œโ”€โ”€ main.ts               โ† font imports, mount()
โ”œโ”€โ”€ components/
โ”‚   โ””โ”€โ”€ Header.svelte     โ† brand + nav tabs
โ”œโ”€โ”€ lib/
โ”‚   โ”œโ”€โ”€ router.ts         โ† hash-based router
โ”‚   โ”œโ”€โ”€ storage.ts        โ† IndexedDB get/save/delete
โ”‚   โ”œโ”€โ”€ markdown.ts       โ† marked + DOMPurify
โ”‚   โ”œโ”€โ”€ theme.ts          โ† light / dark / system
โ”‚   โ”œโ”€โ”€ shortcuts.ts      โ† global g-chord nav handler
โ”‚   โ”œโ”€โ”€ keyboard-help.ts  โ† shortcut reference rendered on About
โ”‚   โ”œโ”€โ”€ export.ts         โ† JSON backup download
โ”‚   โ”œโ”€โ”€ import.ts         โ† JSON merge restore
โ”‚   โ”œโ”€โ”€ id.ts             โ† URL-safe 8-char id generator
โ”‚   โ””โ”€โ”€ types.ts          โ† Card type
โ””โ”€โ”€ views/
    โ”œโ”€โ”€ Add.svelte        โ† capture / edit a card
    โ”œโ”€โ”€ Browse.svelte     โ† list, export, import, delete
    โ”œโ”€โ”€ Quiz.svelte       โ† shuffled queue with flip animation
    โ””โ”€โ”€ About.svelte      โ† intro, settings, shortcuts, data location

Routes

  • #/add โ€” capture a new card (default)
  • #/edit/:id โ€” edit an existing card
  • #/browse โ€” list of all cards
  • #/quiz โ€” flip through a shuffled queue
  • #/about โ€” intro, theme picker, keyboard shortcuts, data location

Keyboard

Nav is Gmail-style chord shortcuts: g a (Add) ยท g b (Browse) ยท g q (Quiz). Quiz: Space to flip, n/p (or โ†’/โ†) to navigate, e to edit. Save in Add is โŒ˜/Ctrl + Enter; Esc clears or cancels.

Full list on the About page.

Data

Cards live in your browser's IndexedDB under the flashcards database. Nothing is sent anywhere.

  • Export (Browse) โ€” download the whole library as JSON.
  • Import (Browse) โ€” merge a JSON file back in.
  • Wipe everything: DevTools โ†’ Application โ†’ IndexedDB โ†’ flashcards โ†’ Delete database.

Deploy

Hosted on Cloudflare Pages with Git integration โ€” every push to main rebuilds and ships.

Setting Value
Build command npm run build
Build output dist/
Node version 20 (via NODE_VERSION env var)

License

MIT ยฉ 2026 Bhargav Kowshik.

Top categories

Loading Svelte Themes