Live Framework Cookbook
Use these recipes when you want the shortest current pattern. Each recipe names
the source-owned gate that backs it.
App Generation
Command:
python3 tools/live-generator.py generate \
--kind new-app \
--name hello-live \
--out build/live-cookbook/hello-live
Gate: make live-generator-check
Components
Put reusable UI helpers in web/components/ and keep test fixtures under
test/.
Gate: make live-component-boundary-check
Forms
Use form helpers for change, submit, validation, error state, and redirect
behavior.
Gate: make live-form-check
Uploads
Keep upload limits, accepted types, scan behavior, and cleanup explicit.
Gate: make live-uploads-check
Streams
Use streams when a collection changes over time and the browser only needs the
insert, update, delete, or reset patch.
Gate: make live-streams-check
Auth
Use framework auth for magic links, optional passwords, CSRF, origins, session
renewal, logout-all, token rotation, remember-me, and local-only dev mailbox.
Gate: make live-auth-check
Scopes
Pass scope first into data access. Scope records carry tenant, workspace, user,
and capability information.
Gate: make live-scope-check
Testing
Use framework tests for render, event, upload, reconnect, auth scope, patch,
redirect, and browser client behavior.
Gate: make live-test-framework-check
Deployment
Use release-owned artifacts and bounded deploy checks. Kukulkan is the current
first-party adoption example.
Gate: make kukulkan-live-adoption-check
Debugging
Use correlated logs, metrics, traces, and template/patch debug annotations.
Gate: make live-observability-check
Security And Performance
Keep CSP, asset integrity, origin checks, rate limits, upload scanning, session
secret rotation, budgets, and regression thresholds current.
Gates:
make live-security-check
make live-performance-check