Live Framework
The 0x0 Live framework lets you build an interactive server-rendered app. The
server owns the page state. The browser receives HTML, sends events, and applies
small patches when the server changes part of the page.
Use this lesson after you understand modules, functions, packages, and runtime
boundaries.
First Live App
A Live app keeps pure code and web code in separate directories:
src/
web/live/
web/components/
web/templates/
web/assets/
web/auth/
web/scopes/
test/
src/ is for ordinary domain code. web/live/ is for live routes.
web/templates/ stores checked *.html.0x0 templates. test/ is where
fixtures and test helpers belong.
Generate
Create a small app skeleton with the source-owned generator:
python3 tools/live-generator.py generate \
--kind new-app \
--name hello-live \
--out build/live-learning/hello-live
The generated app includes route modules, templates, assets, auth, scopes, and
tests. Generated code is meant to be edited.
Understand The Main Pieces
- An endpoint receives HTTP and WebSocket requests.
- A router decides which route handles the request.
- A template returns the HTML shape for a view.
- A component is a reusable view helper.
- A session stores the live state for one connected browser.
- An event is a browser action such as click, submit, upload, or reconnect.
- A diff is the small patch sent back to the browser.
- A scope says which tenant, workspace, or user the action belongs to.
Test
Run the framework gates that match the app surface you touched:
make live-generator-check
make live-test-framework-check
make live-security-check
Use make live-learning-check when changing this learning path.
Run
For local development, use the developer-server evidence path:
make live-dev-server-check
The dev server is bounded. It checks reload behavior, error overlays, and
resource caps without starting unbounded watchers.
Deploy
Production apps must use release-owned artifacts, explicit runtime boundaries,
and rollback evidence. Kukulkan is the first first-party app that uses this
framework path:
make kukulkan-live-adoption-check
Read Live framework how-to for task workflows, and
Live framework cookbook for compact examples.