Skip to content

bkowshik/flashcards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“‡ 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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors