Luxel - Compiled Web Projection
What if your browser stopped downloading and executing your application code? Today we are releasing the first public beta of Luxel (0.1.0-beta.1, Apache 2.0), an open-source framework implementing CWP (Compiled Web Pro
What if your browser stopped downloading and executing your application code?
Today we are releasing the first public beta of Luxel (0.1.0-beta.1, Apache 2.0), an open-source framework implementing CWP (Compiled Web Projection)βa web application model that sits alongside SPA and SSR.
The core idea is simple: compile once, project informationβnot application code.
How Compiled Web Projection (CWP) works
- Compile once at build time: You write your views in TSX. Luxel compiles them once into a public, cacheable template (the mold), a slot map, and a manifest.
- Send only data per request: The server remains the single authority. It validates, computes, formats, and fills the template's slots with escaped text.
- Project in the browser: One universal runtime (~8.1 KB Brotli) resumes the already-painted page, applies server updates via the VSA (Visual State Atlas) protocol, and sends user events back.
The result is ASEF = 0: zero bytes of app-specific executable JavaScript are sent to the browser, and there is no hydration. Every Luxel app ships the exact same runtime modules with the exact same hashes.
CWP vs. SPA vs. SSR
| Model | What the browser receives | Hydration | Where logic & state live |
|---|---|---|---|
| SPA | Full application bundle | N/A (client-rendered) | Client + Server (must sync) |
| SSR (React/Next.js) | HTML + application bundle | Yes | Server + Client |
| CWP (Luxel) | Compiled template + data + 1 universal runtime (~8.1 KB) | None | Server only |
Benchmarks (and where Luxel loses)
We believe in publishing both wins and trade-offs. All figures below were measured on cold loads (4G network profile, CPU Γ4):
- vs. Next.js 16 (internal business app pilot, 9 data screens): 0.29β0.35Γ time to interactive, 0.22β0.26Γ first paint, 0.06β0.07Γ JavaScript downloaded, and 0.02β0.07Γ single-user frontend CPU per cold view.
- vs. Optimized Next.js 16 (RSC + inlined CSS): 0.07β0.08Γ JavaScript and 0.76β0.78Γ task completion time, but LCP is a tie (336 vs 340 ms and 292 vs 300 ms).
- Where it loses: Every recalculation, sort, or search is a server round trip (~165 ms on 4G). On a lab search, it takes 1.124Γ the time of plain JS with inlined CSS.
All claims, conditions, and negative results are documented in docs/claims.md.
Who it is for (and who it is NOT for)
Good fit:
- Business applications: dashboards, forms, tables, back-office tools, and sign-in flows where rules already live on the server.
- Teams that want strict Content-Security-Policy, zero client-server drift, and no per-app client bundle to audit.
Not a fit:
- Offline-first apps, rich editors, games, maps, or spreadsheets that require client-side physics or optimistic local state.
- Apps that need server push today (data updates are polled for now; no SSE/WebSocket yet).
Try the beta & break it
Full transparency: 0.1.0-beta.1 has not undergone an external security review yet, and concurrent-user load tests are still open. It is not "production ready"βwe are releasing it now to get real architectural feedback and battle-test the authoring DX.
Try it locally (requires Node.js 22.12+):
bash
npm create luxel@beta my-app
cd my-app
npm install
npm run dev
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.