Tier-1
Merged
HU
4mo ago+16186+16186+01234567890123456789012345678901234567890123456789-6200-6200-0123456789012345678901234567890123456789
Summary by cubic
Adds JWT + API key auth, per‑IP rate limiting with KV caching, R2 media uploads, and a motion‑polished SPA with create session, virtualised history, offline/PWA, and scorecard export.
-
New Features
- API:
/auth/token(JWT from API key), API key list/create/revoke, JWT orx-oche-ownersupport, structured JSON logs withX-Trace-Id, deepGET /health?deep=1, OpenAPI updates +/openapi.json, per‑IPRateLimiterDurable Object, KV‑cachedGET /sessions(60s TTL,X-Cache), and media upload to R2 with stricter MIME/size policy. - Web: page‑load motion (
AnimatedOutlet, skeletons, TabStrip), Create Session (/sessions/new) with required tooltips, MediaUpload with progress/cancel, game guides and field tooltips single‑sourced, virtualised History list with responsive posters, animated score display, owner switcher + API key UI (/settings/keys), PWA read‑only offline with query persistence and OfflineBanner, i18n (en), scorecard export, theme toggle, and an API docs page.
- API:
-
Migration
- Migrate Durable Objects to add
RateLimiterand create/bind a KV namespace toCACHEinwrangler.toml. - Set secrets and envs:
OCHE_JWT_SECRET,MEDIA_SIGNING_SECRET,VITE_API_BASE_STAGING,VITE_API_BASE_PROD(update.dev.varsand CI). - Use new build/deploy scripts:
build:web:staging/build:web:prod; staging full pipeline vianpm run deploy:staging:full. - Local dev:
npm run setup,npm run setup:dev-vars:sync,npm run db:prepare, thennpm run dev.
- Migrate Durable Objects to add