NextRush Documentation
Minimal, modular, type-safe Node.js backend framework — docs home.
NextRush is a minimal, modular, type-safe HTTP framework for Node.js and other runtimes. The core stays
under 3,000 lines with no runtime dependencies; you add @nextrush/* packages when you need them.
Everything is written for TypeScript strict mode.
Current Version
NextRush v3 is in active development. APIs are stabilizing — suitable for early adopters. Requires Node.js 22+.
Why NextRush?
Most backend frameworks force a trade-off:
- Minimalist but limiting — Great for prototypes, frustrating at scale.
- Feature-rich but opaque — Lots of features, but behavior is hidden from you.
NextRush takes a different approach: small core, modular packages, explicit behavior. You install what you need and see what happens at every layer.
Lean routing
Segment trie routing with O(d) lookup.
Type Safe
Full TypeScript strict mode. Zero `any`.
Modular
30 packages in the monorepo. Install what you need.
Multi-Runtime
Node.js, Bun, Deno, and Edge adapters.
Extensible
Plugin system for controllers, WebSocket, and more.
Security Middleware
Helmet, CORS, rate limiting available as packages.
Quick Start
$ pnpm add nextrush
import { createApp, createRouter, listen } from 'nextrush';
const app = createApp();
const users = createRouter();
users.get('/', (ctx) => ctx.json([{ id: 1, name: 'Alice' }]));
users.get('/:id', (ctx) => ctx.json({ id: ctx.params.id }));
app.route('/users', users);
await listen(app, 3000);npx tsx src/index.ts
# → 🚀 NextRush listening on http://localhost:3000Choose your path
Introduction
What NextRush is, trade-offs vs other frameworks, and when to use it.
Framework overview
Full map: hello world, lifecycle, packages, styles, benchmarks.
Core concepts
Context, middleware, routing, plugins, and guards in depth.
API reference
Lookup tables for core, middleware, plugins, and adapters.
Guides
REST APIs, auth, validation, testing, deployment.
Benchmarks
Lab methodology, snapshots, and tuning notes.
Design Philosophy
NextRush is built on these principles:
| Principle | What It Means |
|---|---|
| Minimal Core | Core is under 3,000 lines of code. |
| Explicit Over Implicit | No hidden behavior. You see what happens. |
| Composition Over Inheritance | Build with functions and middleware, not deep class hierarchies. |
| Type Safety First | TypeScript strict mode from the ground up. Zero any allowed. |
| Zero Runtime Dependencies | No external runtime deps in core. reflect-metadata is auto-imported for DI. |
Dual Paradigm
NextRush supports both functional and class-based programming styles. Start with functions for simplicity, add decorators and DI when your project grows. Both styles work together — no forced migration.
Learn more about programming styles →
What's Next?
Start with the Getting Started guide to install NextRush and create your first API.
Questions? Use GitHub Discussions or open an issue. For AI-assisted workflows, see the Skills directory.