Chapter 13 / 14
Architecture decisions
Python-only maintained logic
Maintained Node/TypeScript logic was migrated to Python. Browser JavaScript remains only as deterministic generated artifacts; third-party JavaScript is vendor code. This keeps one application language without pretending browsers execute Python natively.
Flask to Sanic
Flask was retired before launch. Sanic preserves API behavior while providing native async request handling, WebSockets, streaming, and middleware suited to a low-latency speech loop.
Backend authorization boundary
The model reasons and proposes; backend code acts. This was chosen because database and external effects require stable authorization, idempotency, audit, and tests that prompts cannot supply.
Domain-oriented Postgres
The app schema introduces explicit relational identities and immutable versions beside intact legacy tables. An additive pre-launch migration was chosen over an in-place rewrite because it makes parity measurable and rollback immediate.
Separate static deployments
Slides and documentation are isolated static projects. They receive no production mutation credentials. This narrows compromise impact and lets cache/security contracts match each surface.