Built in an afternoon of pair-programming with Claude Code (Claude Fable 5) — from idea to working app.
Learn Swedish with your camera. Photograph an object → Claude tells you what it's called in Swedish (with the right en/ett article, pronunciation hint, and an example sentence) → save it as a flashcard with your own photo → practice with spaced repetition.
Single-file web app — no build step, no server code.
cd ordkamera
python3 -m http.server 8642Open http://localhost:8642, tap ⚙︎, and paste your Anthropic API key (create one at https://console.anthropic.com → API Keys). The key is stored only in your browser's localStorage and sent only to the Anthropic API.
The app is hosted at https://ulmarise.github.io/ordkamera/
- Open that URL on your phone (Safari on iPhone, Chrome on Android).
- Tap ⚙︎ and paste your Anthropic API key once.
- Add it to your home screen so it behaves like an app: iPhone: Share → Add to Home Screen · Android: ⋮ → Add to Home screen.
The camera needs https:// (or localhost), so any static host works —
the simplest is GitHub Pages:
- Fork this repository (or clone it and push to your own).
- Your repo → Settings → Pages → deploy from the
mainbranch, root folder. - Your copy appears at
https://YOURNAME.github.io/ordkamera/.
- Vision (scene mode): photos are resized to ≤1024 px and sent to
claude-opus-4-8via the official@anthropic-ai/sdk(browser mode). Claude returns up to 8 visible objects — each with article, pronunciation hint, and example sentence — and you tick the ones to save as cards. A "Not quite?" button lets you correct the identification and re-ask. A JSON schema (structured outputs) guarantees a parseable response. - Pronunciation audio: 🔊 buttons use the device's built-in Swedish text-to-speech voice (Web Speech API) — free, offline, no extra API.
- Flashcards: stored in localStorage with a 512 px thumbnail of your photo (~50 KB/card; browser limit fits roughly 80–100 cards — enough for a prototype, IndexedDB is the upgrade path).
- Spaced repetition: SM-2-style scheduling — Again / Hard / Good / Easy map to 10 min / ~1 d / 1→3→(×ease) d intervals. Reviews are shown when you open the app (no push notifications in v1).
Each photo is one vision request to Claude Opus — roughly 1–2 cents per scan. Reviewing cards costs nothing (fully offline/local).