Tier-3

Merged
HU
4mo ago
+15106-5924

Summary by cubic

Adds polished page-load motion, media upload, and “how to play” guides on the web app, plus JWT auth with API keys, offline read-only caching, and a rate‑limited, cached API with structured logs for better UX, security, and reliability.

  • New Features

    • Motion system: AnimatedOutlet, TabStrip, and route-aware skeletons; respects reduced motion.
    • Media: UI upload with progress/cancel; sessions now support video/poster and player photos.
    • Game guides: single source content/game-guides.ts with GameGuideCard; tests included.
    • Field tooltips: enforced via TextField/SelectField/FileField with centralized copy.
    • Auth: /auth/token issues HS256 JWTs; API keys list/create UI at /settings/keys; AuthProvider + OwnerSwitcher.
    • PWA/offline: vite-plugin-pwa + React Query persistence for sessions; OfflineBanner.
    • Scorecard export: print-ready HTML; basic i18n via i18next; API docs hosted in /docs using Redoc.
  • Scale & Reliability

    • Rate limiting via RateLimiter Durable Object per IP (health/docs excluded).
    • KV caching for GET /sessions (60s TTL, Cache-Control: max-age=15, X-Cache headers).
    • Structured JSON logging with X-Trace-Id; deep readiness at GET /health?deep=1.
    • Tests for health, JWT, rate limiter, session cache; Vitest UI tests for Overview/History.
    • Upgrades: wrangler v4; new envs include OCHE_JWT_SECRET, RATE_LIMITER, and CACHE bindings.