The frontend has one source tree and one build pipeline:
tauri-ui/index.htmlis the only document entry.tauri-ui/src/main.jsis the only JavaScript entry.tauri-ui/src/app/bootstrap.jsis the application composition root.tauri-ui/src/app/domains/contains independently configured ESM domain modules.tauri-ui/src/app/runtime/contains dependency-free state, DOM, dependency binding, error reporting and performance primitives.tauri-ui/src/app/ux.jsowns the shared browser UX boundary.tauri-ui/src/styles/contains styles imported by the JavaScript entry.tauri-ui/dist/is generated exclusively by Vite and is never committed.
There are no root-level compatibility mirrors and no static copy step. Tauri
starts the Vite dev server for development and serves tauri-ui/dist/ in
packaged builds.
Domain modules must not import the bootstrap or each other. The bootstrap passes
explicit runtime dependencies through each domain's configure*() boundary, and
the architecture gate rejects ESM cycles. Runtime modules may not import project
modules. The bootstrap has a test-enforced, non-increasing line budget so new
features must live in a domain or runtime module.
The UI uses the operating system font stack. Remote font requests are forbidden in both source and Tauri CSP, so packaged operation remains offline and does not leak startup metadata to a font provider. Runtime errors are recorded in a bounded, redacted in-memory buffer instead of writing browser console output.
Use these commands:
npm run frontend:devstarts the browser development server.npm run check:architecturevalidates source placement and dependency direction.npm run clean:frontendremoves current and obsolete frontend output only.npm run frontend:buildvalidates, cleans and creates the exact frontend consumed by Tauri.npm run test:frontendverifies the source and Tauri/Vite wiring.npm run test:frontend:coverageenforces quantitative coverage for the independently testable runtime and configuration-model boundary.npm run devstarts Tauri and lets itsbeforeDevCommandstart Vite.