┌─────────────────────────────────────────────────────────────────┐
│ Frontend (Next.js :3000) │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Capsule List │ │ Trust Dash │ │ Onboarding │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Backend (FastAPI :8000) │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ /capsules │ │ /auth │ │ /health │ │
│ │ /chain │ │ /trust │ │ /live │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│
┌───────────────┼───────────────┐
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ SQLite │ │ Redis │ │ RFC 3161 │
│ (dev) │ │ (CSRF) │ │ TSA │
└──────────┘ └──────────┘ └──────────┘
src/
├── api/ # FastAPI routers
├── auth/ # JWT auth (3 files - all used)
├── security/ # Crypto: Ed25519, ML-DSA-65, RFC 3161
├── crypto/ # SDK signing utilities
├── models/ # SQLAlchemy models
├── live_capture/ # Claude Code hook integration
└── core/ # Config, database
frontend/
├── src/app/ # Next.js pages
├── src/components/ # React components
├── src/contexts/ # Auth, Creator, Onboarding
├── src/lib/ # API client, utils, logger
└── src/hooks/ # Custom hooks
sdk/typescript/ # TypeScript SDK
Claude Code Hook → rich_hook_capture.py → live_capture/
→ Sign with Ed25519
→ Timestamp with RFC 3161
→ Store in SQLite
Frontend → /auth/login → JWT issued
→ Stored in sessionStorage
→ Sent as Bearer token
→ Backend validates claims