All documents · Architecture

Loopcard architecture

v1 decision: one web app (PWA) + one small API + one local CLI.
Not in v1: Electron, App Store, Play Store, MCP proxy, Stripe.

Browser (FileReader parse) ──PNG download (canvas)
        │
        └── POST /v1/cards  {amount, source, loop, kind} only
                    │
              Node 127.0.0.1:3100
                    │
              Postgres `loopcard`
                    │
              GET /c/:id  +  /c/:id.png (PIL)

CLI reads ~/.claude/projects/**/*.jsonl or a path. --publish is the only network call.

Nginx terminates TLS on cryptobook.space and reverse-proxies to 3100. Apps bind localhost.

Rates used for JSONL estimates (Sep 2026 list): Sonnet $2/$10, Opus $5/$25, Haiku $1/$5 per MTok. Labeled as estimates.