# Web frontend architecture This page covers where the web UI's JavaScript is going and how it gets there one page at a time. The UI is Flask + HTMX + Alpine.js. Templates live in `web_interface/templates/v3/` and static files in `web_interface/static/v3/`. Two rules hold at every step: - **The Pi never builds anything.** It serves the files that are committed. CI builds the generated CSS (`scripts/build_css.py`, see #685) and checks it. The JavaScript needs no build at all: it is native ES modules that the browser loads as they are. - **Every page keeps working, and so does every plugin.** Third-party plugin forms, `x-widget` scripts and plugin web UIs use the existing `window.*` names. Each name keeps working as an alias until a release announces that it will be removed. ## Where it started - About 195 `window.*` globals. Their load order is held together by comments repeated in the headers of `app-early.js`, `app-shell.js` and `plugins_manager.js`. - About 5,700 lines of inline `