Nifra vs Elysia
Elysia is the best-known Bun-first backend framework, and it set the bar Nifra measures itself against. The short version: on identical benchmarked workloads Nifra is level to ahead of Elysia on Bun and ahead on Deno, and the larger difference is scope - Elysia is a backend framework, Nifra is a full-stack one.
Throughput, on identical workloads
Both frameworks are fast enough that the interesting question is overhead relative to the raw runtime. In our published two-workload benchmark (a path-param GET and a schema-validated POST, identical semantics per framework, load driven by oha):
- On Bun, Nifra runs level with Elysia on
GET /users/:idat 101% of a hand-rolledBun.servebaseline - the framework layer costs nothing measurable - and 105% of Elysia on the validatedPOST. - In the realistic middleware shape (security headers + CORS + request-id on every request), Nifra runs at 103% of Elysia on GET and 108% on POST.
- On Deno, Nifra leads every measured framework, Elysia included, on both workloads.
Single-digit percentages, honestly labeled: treat them as "the same speed class, with the edge to Nifra as middleware stacks up". The harness and methodology are public - the benchmarks page has every row, including the ones Nifra loses.
Typed clients: Eden vs inferred
Both frameworks solve typed API access. Elysia's Eden gives you a typed treaty client from your server type; Nifra's client infers request and response types from route declarations the same way. The difference is what sits above it: Nifra's typed contract extends through loaders, pages, and server functions, because the frontend is part of the framework rather than a separate project consuming the API.
Backend framework vs full-stack framework
| Nifra | Elysia | |
|---|---|---|
| HTTP + validation + typed client | Yes | Yes |
| SSR + file-based frontend routing | Yes - React, Vue, Svelte, Solid, Preact | No (bring your own frontend) |
| Server functions, ISR, islands | Yes | No |
| Runtimes | Bun, Node, Deno, edge workers | Bun-first, adapters for others |
| Verification tooling | nifra check / assure / doctor, structured output | Type-level guarantees |
| Docs for AI agents | Live MCP server + typed corpus, CI-gated freshness | llms.txt style docs |
When to pick which
- Pick Nifra if you want the backend and frontend in one typed contract, the option to change UI framework or runtime later, and tooling built for AI-assisted development - at the same or better throughput.
- Elysia holds up if you specifically want a backend-only Bun framework and lean on its plugin ecosystem, with a separate frontend story you are happy with.
Start with bunx create-nifra my-app (backend) or --template site (full-stack). Deeper capability comparison: the comparison doc.