NextRush Documentation
Minimal, modular Node.js backend framework with a zero-dependency functional core and multi-runtime support.
NextRush
Minimal, modular HTTP framework for Node.js, Bun, Deno, and the edge — a zero-dependency functional core, with a class-based runtime when you want one.
What brings you to NextRush today?
🚀 Starting fresh
Start with the mental model, then build a working API in about twenty minutes.
⚡ I'm building an API
Task-oriented guides — routing, validation, middleware, auth, testing.
🔄 I'm migrating from another framework
Concept mapping from Express, Koa, Fastify, or NestJS, with real before/after code.
🌐 I'm targeting Node, Bun, Deno, or the edge
How the same application code runs unmodified across every supported runtime.
📚 I need the API reference
Every package's exports, types, and options, organized by capability.
🏗 I want to contribute
Package hierarchy, design principles, and how to submit a change.
Why NextRush
- Small core — routing, middleware, and context in a core under 3,000 lines.
- Zero-dependency functional path —
createApp/createRouter/listenpull in no runtime dependencies at all. - Composable — install a package per capability instead of taking on a bundled framework.
- Explicit — no hidden middleware, no implicit magic; you see what runs and in what order.
- Type-safe — TypeScript strict mode throughout, no
anyin the public surface. - Multi-runtime — the same request-handling code runs on Node.js, Bun, Deno, and the edge.
Quick facts
| Property | Value |
|---|---|
| Latest (core packages) | 3.1.0 |
| Runtimes | Node.js · Bun · Deno · Edge (Cloudflare Workers, Vercel Edge) |
| Module format | ESM-only, permanently — no CommonJS build |
| Requirements | Node.js ≥ 22 |
| Dependencies | Zero runtime dependencies in the functional core; tsyringe + reflect-metadata only on the nextrush/class path |
| Language | TypeScript, strict mode |
| License | MIT |
Who is this for?
Choose NextRush if you want:
- ✓ A backend framework whose core you can read end to end in an afternoon
- ✓ To install a capability only when you need it, instead of a fixed bundle
- ✓ The same application code to run on Node.js, Bun, Deno, and edge runtimes
- ✓ Both a functional style (
createApp/createRouter) and a class-based style with dependency injection, in the same framework
Not a fit if you want:
- ✗ A full-stack framework with server-side rendering or a built-in frontend
- ✗ Convention-over-configuration with generated boilerplate you don't read
- ✗ A framework with a large plugin marketplace already built out — NextRush's middleware catalog is deliberately smaller and in-house
Quick start
$ pnpm add nextrush$ pnpm add -D tsx typescript @types/node
import { createApp, createRouter, listen } from 'nextrush';
const app = createApp();
const router = createRouter();
router.get('/', (ctx) => ctx.json({ message: 'Hello NextRush!' }));
app.route('/', router);
await listen(app, 8080);npx tsx app.ts # → visit http://localhost:8080Most developers learn next: Routing → Middleware → Context.
Prefer to scaffold a project instead? create-nextrush generates a runnable project with your style, runtime, and middleware preset in one command.
What can you build?
- ✓ REST APIs and internal services
- ✓ Class-based applications with dependency injection, guards, and interceptors
- ✓ WebSocket and real-time services
- ✓ Streaming responses for AI/agentic apps (SSE, NDJSON)
- ✓ Edge and serverless functions that share code with a Node.js deployment
Runs everywhere
The same application code — routing, middleware, context — runs unmodified across every supported runtime. Each adapter translates the platform's native request/response into the same Context API, so a change of runtime is a deployment decision, not a rewrite.
Edge and serverless are marked partial because they run on Web-standard Request/Response
without Node's node:* APIs — see Runtime compatibility
for exactly what that changes.
Documentation roadmap
Concepts explain why something works the way it does, once. Guides and recipes explain how to use it. Reference lists what is available. If a page starts re-explaining a concept, it should be linking to one instead — that's how this documentation stays consistent as it grows.
Learning paths
🟢 New here
Quick start → Core concepts → First guide.
🟡 Building an API
Routing → Middleware → Validation → Testing.
🔵 Migrating
Coming from Express, Koa, Fastify, or NestJS? Start here.
Core concepts
Popular guides
Popular recipes
Reference & internals
API reference
Looking for a specific package's API? Go straight here.
Internals
Package hierarchy, design principles, and how requests actually flow.