Block 5: Web App & Interactive Tooling Lessons

Block 5: Web App & Interactive Tooling Lessons

8 lessons from the web app implementation (FastAPI + vanilla JS SPA for interactive calendar selection).

# Lesson Core Teaching
031 Read-Only DB Connections for Web Layers Open the warehouse read-only in the web tier so the pipeline CLI can still write
032 Startup Cache for Interactive Scoring Pre-load scoring dicts into memory at startup; query the DB per-request only for browse/search
033 Vanilla JS SPA Without a Build Step Hash routing + dynamic import() delivers a functional SPA with zero toolchain overhead
034 Reusing Query Modules Across CLI and Web Import query functions directly; wrap with Pydantic at the API boundary, not in the query layer
035 Design System Portability via Tokens CSS custom properties as a shared asset make visual consistency free across standalone tools
036 Linter Rules vs. Framework Idioms When a linter rule conflicts with a framework's official pattern, suppress per-line — don't restructure
037 Static Site Generation via Fetch Shim Intercept fetch() to serve pre-built JSON files — turns any API-backed SPA into a static site without frontend changes
038 CI Path Portability and Release Artifacts Hardcoded dev paths break CI — use env vars for paths, release artifacts for large binaries