Nifra vs. other frameworks
Honest comparison. Nifra is a full-stack framework first - five UI libraries and five runtimes from one core, with loaders, actions, streaming, and a typed data layer - and a standalone typed backend you can use on its own. Here is where each tool fits.
Nifra's lane
Every other full-stack framework here is one UI library on a mostly-one-runtime story. Nifra bets the opposite axis: one core, many front-ends, many runtimes, with a contract-first typed backend in the same project.
| Framework | UI libraries | Runtimes |
|---|---|---|
| Nifra | React · Preact · Vue · Solid · Svelte | Bun · Node · Deno · Workers · Edge |
| Next.js | React | Node · Vercel Edge |
| Nuxt 3 | Vue | Nitro (many) |
| SvelteKit | Svelte | adapters |
| Remix / RR7 | React | adapters |
| TanStack Start | React (Solid WIP) | Nitro |
Full-stack parity
Across the board, Nifra ships the modern full-stack feature set on all five UI frameworks:
- File routing (dynamic / catch-all / groups / optional) + nested layouts.
- SSR · SSG · ISR, streaming SSR with out-of-order Suspense, islands, view transitions, and a ~0 KB-client vanilla adapter.
- Loaders + actions + server functions (typed
serverFnRPC, server code never shipped to the browser) + progressive-enhancement forms;defer()/<Await>streaming data; query cache, optimistic UI, concurrent fetchers, revalidation. - Head/meta, hover/focus prefetch, scroll restoration.
- First-party auth, i18n, image, uploads - plus content collections + MDX, font optimization, and draft / preview mode.
The data model (loaders, actions, defer, progressive enhancement, fetchers, revalidation) is closest to Remix / React Router - delivered across five UI libraries instead of one.
Server code and server-only views
Nifra provides typed loaders and actions, streaming SSR, islands and typed server functions. Server functions keep their implementation, secrets and database handles off the browser and use the same validated mutation API across the supported UI libraries.
The optional server-components pipeline adds server-only views and state-preserving refresh. React uses native RSC/Flight; Vue, Svelte and Solid use their native islands in validated server-rendered ranges. The feature is intended for the release after 4.0.0 and requires all four adapters to pass certification. Server functions remain the mutation API; native React "use server" actions are unsupported.
Also a standalone backend (vs. Hono & Elysia)
Nifra's core is a Bun-native, Web-standard server, so it stands on its own as an API - and graduates to full-stack later without a rewrite.
- Throughput - the realistic case. Router micro-benchmarks flatter Hono (a single compiled regex), but a real request also pays for middleware and validation, context, and serialization. In the current matrix (median of 5 full runs) Nifra tops the framework field on Bun - level with Elysia on
GET /users/:idat 98% of the raw-runtime ceiling and 101% of Elysia on the validatedPOST- and leads every framework on Deno on both workloads. On Node it leads the framework field too - at 122% of Fastify on the validatedPOST(143% of the raw-Node ceiling) and ahead on GET, with Elysia, Hono, and Express behind. In the realistic shape (security headers + CORS + bearer auth + cookies + validated query/body + a ~2.4 KB JSON response, measured withoha) Nifra runs at 100% of Elysia on GET and 102% on POST. Treat benchmark rows as same-run evidence, not a permanent law of nature. - End-to-end types.
client<typeof app>()derives request inputs andres.datafrom the route contracts - the compiler catches frontend/backend drift. Hono'shcand Elysia's Eden are typed too, but backend-only - no full-stack page/loader story. - Validation + OpenAPI. Any Standard Schema plus
t(TypeBox - free JSON Schema), emitting a real 3.1 doc with field-level request/response schemas (+ Scalar UI). - Batteries.
@nifrajs/better-auth+ session guards,@nifrajs/otel(W3Ctraceparent, OTel semantic conventions), andcreate-nifrascaffolding (framework × deploy × CI × DB × auth, with anAGENTS.md).
Run it yourself: bun run bench:realworld and bun run bench:http:compare.
The AI-agent toolchain - Nifra-only
Nifra covers both sides of the agent loop: agents that edit your codebase and agents that are part of the product. Every surface is anchored to the same typed capability boundary:
nifra mcp- an MCP server exposingnifra_context(the project's typed surface),nifra_example(snippets typechecked against the installed version - no hallucinated APIs),nifra_scaffold(URL → correctroutes/file),nifra_run(verify via HTTP), andnifra_check(a drift gate that returns the fix). One MCP, two transports: the docs tools are also hosted atmcp.nifra.dev(no checkout needed), while the project tools run only on your machine - your code never leaves it.llms.txt+llms-full.txtserved at the site root, anAGENTS.mdin every scaffold, and a docs corpus that can't drift from the code.nifra assure+nifra levels- a route-assurance gate: a policy file classifies every reflected route and CI fails naming exactly which evidence is missing (authentication on writes, validation, declared effects). Spectral lints the OpenAPI document and Semgrep pattern-matches source text; neither sees the real route graph. This is what makes agent-written routes safe to merge - an agent (or a human) cannot ship an unauthenticated write past it.@nifrajs/webmcp- explicit page-local tools using the browser WebMCP standard, deterministic predictive UI, bounded receipts, and versioned reconciliation.@nifrajs/ag-uistreams the same run into a product UI, while@nifrajs/agent-appprovides negotiated browser views, approvals, handoffs, and Run Studio projections.@nifrajs/agent- bounded typed agent turns with budgets, approvals, cancellation, resumable evidence, shared state, and provider-neutral model ports.@nifrajs/a2aexposes the same runner to other agents without rewriting the core.
Where Nifra fits
Reach for Nifra when you want:
- One codebase, every front-end + runtime - ship the same app on React, Vue, Solid, Svelte, or Preact, running on Bun, Node, Deno, and the edge, with no rewrite to switch either.
- A type-locked stack - the typed client derives requests and
res.datafrom your route contracts, so the compiler catches any frontend/backend drift. - The full modern toolkit on your UI of choice - loaders, actions, streaming SSR with out-of-order Suspense, SSG/ISR, islands, query cache, progressive-enhancement forms.
- A framework AI agents edit accurately - the
nifra mcptoolchain + verified, version-checked examples, which no other framework ships. - To start lean and grow - begin as a typed API, graduate to full-stack on the same core, no rewrite.
Nifra provides streaming SSR, islands and typed server functions. The optional server-components pipeline adds native React RSC/Flight and corresponding Vue, Svelte and Solid views under a shared execution contract.