Why the browser should not compute or decide anything
*Draft for the owner to publish. Every number comes from docs/claims.md with its conditions.*
For fifteen years we have moved work into the browser. A typical business screen today downloads a bundle, asks an API for data, and then computes in the browser: it adds up the totals, formats the money and the dates, decides which buttons are enabled, validates the form, sorts and paginates the table. The server does all of that again, because the server cannot trust the browser. Two implementations of the same rules, in two languages, kept in step by hand.
Luxel starts from the opposite rule: the browser computes nothing and decides nothing. This article explains what that means, why we chose it, what it is not, and what it costs.
What Luxel does
Compile once. Project information. Not application code.
Luxel is a framework for CWP (Compiled Web Projection). CWP is the name we give to the model Luxel implements, a category of its own next to SPA and SSR: the interface is compiled once into a public template; per request the server fills only values; the browser runs one universal runtime and receives no application code. SSR with hydration (how React-style frameworks ship it) also renders on the server, then sends the application's code to the browser to hydrate it. CWP sends none and does not hydrate. The name is ours, not an industry standard; the README defines it.
Luxel projects compiled information.
- You write a view in TSX. At build time it is compiled once into a public template (HTML with numbered holes), a slot map and a manifest that lists the view's zones and events. None of it contains user data, so all of it can be cached publicly.
- Per request, the server fills the holes with escaped text. It does not run components and it does not render anything per user: it only writes values into slots. The server is the only authority: it reads the data, computes every total, formats every date and amount, applies every rule and decides what the user may do.
- In the browser, one universal runtime resumes the page that is already painted. It does not hydrate: it creates, removes and rewrites no node of the server's page at mount. When the user acts, it sends the event; when the server answers, it writes the new values into the slots that changed. That is all it does.
The runtime is the same set of files for every app, each with the same hash. Your app sends zero bytes of its own executable code to the browser. We call that ASEF = 0 (app-specific executable footprint), and the build checks it.
Why: three reasons
Coherence. A rule written once cannot drift. When the total, the page count, the chart's scale and the "you can't transfer more than your balance" message all come from the server, the browser cannot show a number the server would not accept. There is no second implementation to forget when a rule changes, and no "it worked on the client but the API refused it".
Simplicity. Nothing to hydrate, no client state to synchronize with the server, no cache of server data in the browser to invalidate. A page is a template plus values; an update is a list of slots and their new text. When something is wrong, it is wrong in one place.
ASEF = 0. Because the browser decides nothing, it needs no app code. Every app ships the same audited runtime modules, the page's Content-Security-Policy lists exactly their hashes, and Trusted Types are required. There is no per-app bundle to review, to update, or to leak a secret into.
What it is not: a security measure
It would be easy to sell "no code in the browser" as security. It is not, and we do not claim it. Whoever controls the browser can read everything the page shows and send every request the page can send; an adapter that knows Luxel does exactly that (our own tamper study, H-TAMPER L2). Compiled templates, view tokens and the absence of app code raise the cost of generic scripts at most.
Security is the server's authority: the session cookie (HttpOnly, Secure, SameSite), exact Origin and CSRF checks, view tokens signed with HMAC-SHA256, idempotency in the same transaction as the effect, state-version control, authorization of every role × event × resource. Our attack matrix is sent without the runtime, directly to the server, and is refused with no effect (claim 8). The "browser decides nothing" rule makes that authority simpler to see; it does not replace it.
What it costs
The rule has a price, and we measured it.
- Every recalculation is a round trip. Changing a field that affects a total, turning a page, searching: each goes to the server. On our 4G profile that is about 165 ms (Sprint 7). Apps that must recompute on every keystroke, work offline, or draw locally (editors, maps, games, spreadsheets) are not for Luxel.
- Reads carry their security context. A search on a transactions table costs 7 % more bytes than a React SPA's GET; a sort behind HTTP/2 costs 1.03 × (1 294 vs 1 256 B). We report those as losses.
- No push yet. Data that changes on the server is polled.
- A closed set of components. Authors do not write client JavaScript, so a widget Luxel does not have is a gap (we list them in GAPS.md), not an npm install away.
What we measured
All times below were measured on one benchmark machine, cold loads on a 4G network profile with the CPU slowed ×4. Numbers from different machines are never compared. The times and the JavaScript totals were measured before the change of 2026-12-03 to the runtime's core module (+61 B raw, +5 B Brotli); they have not been measured again (docs/claims.md, criteria rule 7). Every CPU figure is the cost of a single-user cold page view: it covers no interaction, and nothing has been measured with concurrent users.
- Interactive after a cold load: 276 vs 864 ms against Astro (Sprint 8); 0.42 × and 0.46 × the Astro control on two data-heavy screens. Astro hydrates; Luxel resumes.
- As each framework ships (the same app in a React SPA, Astro, vanilla JavaScript and HTMX): Luxel's first paint is 0.17–0.58 × theirs, its interactivity ties vanilla's (0.963 ×) and is far ahead of Astro and the SPA, and it sends all 10 items of a common security list (7 headers, 3 cookie flags) where the others send 7–8 (Sprints 10–11).
- On the wire: a warm update costs 1 173.8 B against the JSON baselines' 1 176.9 B on HTTP/1.1; behind HTTP/2 it costs 1.07 × (361 vs 337 B).
- A real business application (internal pilot) rebuilt on Luxel and compared with its Next.js 16 version, same backend, database and seed, on the 9 data screens both have: interactive at 0.29–0.35 × the time, first paint at 0.22–0.26 ×, 0.06–0.07 × the JavaScript and 0.03–0.10 × the frontend CPU per view (Sprint 11; one user, one cold page view at a time).
- The runtime's core is 8 113 B Brotli (8 106 B before the sign-out button and the npm scope rename of 2026-12-03).
- Browser paint metrics (Sprint 12, Chromium's own first and largest contentful paint, 20 runs per target): in the lab Luxel's first paint ties the fastest alternative configured the same way (264 vs 260 ms); on the internal pilot's 9 data screens its largest paint comes at 0.27–0.32 × the time of the Next.js 16 version, and at 0.70 × on the login.
- Tasks, and the cost of one page view on the internal pilot: logging in to the first screen takes 0.71 × the time, a search 0.48 ×; a single-user cold page view costs 5–19 % of the server-side CPU (frontend, backend and database together) on the data screens, 78 % on the login. That figure does not cover interactions or many users at once: no load test with concurrent users has been run. In the lab a transfer ties the fastest alternative and a search takes 1.12 × the time of plain JavaScript with its CSS inlined.
- Against a Next.js 16 app optimized by hand (Server Components, no client fetching, inlined CSS), on three of the pilot's screens: 0.07–0.08 × the JavaScript, both tasks in 0.76–0.78 × the time and 0.16–0.50 × the server CPU per view (again a single-user cold page view). Its largest contentful paint ties on the two data screens since Sprint 12.1 (336 vs 340 ms and 292 vs 300 ms: a tie within ±3 %, not a win; claim 43). In Sprint 12, with an inline-CSS limit of 4 096 B, the Next.js app painted both first (348 vs 516 ms and 304 vs 436 ms): those Luxel pages linked a stylesheet the browser waits for.
We also publish what we lost or withdrew: "Luxel paints first" is not a claim (with the same CSS treatment, a baseline painted first or tied), against a Next.js app optimized by hand the paint on two of the pilot's screens is a tie, not a win (and was a loss before Sprint 12.1's inline-CSS limit), "answers under 50 bytes" was refuted, and the accessible Canvas profile was refuted and paused.
Where it stands
Luxel 0.1.0-beta.1 is a beta. It has a specification (VSA 0.9) where every MUST has a fixture or a test, twelve million differential fuzzing inputs with no discrepancy, 96 % of the critical modules' mutants killed, and a short red-team exercise that found nothing high or critical. It has no external security review and has not been tried by developers outside the project. It is not "production ready", and it does not claim WCAG or OWASP conformance.
If you build business applications (forms, tables, dashboards, back offices) and the rules already live on your server, try it:
npm create luxel@beta my-app
Tell us where the model does not fit: that is what GAPS.md is for. And if you find a way to make the server do something it should not, please report it privately (SECURITY.md).