DEV Community

Cover image for Luxel - Compiled Web Projection
JACKT72xp
JACKT72xp

Posted on Edited on

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 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

  1. 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.
  2. Send only data per request: The server remains the single authority. It validates, computes, formats, and fills the template's slots with escaped text.
  3. 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+):

npm create luxel@beta my-app
cd my-app
npm install
npm run dev
Enter fullscreen mode Exit fullscreen mode

What do you think about moving application code completely out of the browser for business apps? Drop your feedback, critiques, or questions in the comments!

Top comments (0)