NextRush
TypeScript-first backend framework
Explicit architecture. Zero hidden behavior.
Build composable HTTP APIs with explicit routing and middleware.
Start with a small core and scale without hidden framework behavior.
Quick example
Hello, NextRush
Hello, NextRush
TypeScript
import { createApp, createRouter, listen } from "nextrush";
const app = createApp();
const users = createRouter();
users.get("/", (ctx) => ctx.json({ message: "Hello NextRush!" }));
app.route("/users", users);
await listen(app, 8080);- Zero runtime dependencies
- Web-standard APIs
- Multi-runtime ready
- MIT Licensed
Install your first app
Three commands. One running server.
Create
$ pnpm create nextrush@latest my-apiStart
$ cd my-api && pnpm devBuilt around four principles
Every decision optimizes for clarity, composability, and long-term maintainability.
Explicit
Every behavior is declared in your code—no magic hooks, no hidden middleware.
No surprisesComposable
Start with a small core. Add routers, middleware, and modules only when you need them.
Opt-in surfacePredictable
Trace any request from adapter to response without guessing framework behavior.
Reasonable pathsPortable
One application model across Node.js, Bun, Deno, and Edge—adapters own the rest.
Runtime freeRequest lifecycle
An explicit stack, not a magic box
Keep the request path understandable and add capabilities only where they solve a real application need.
Segment-trie routing
Route matching scales with URL segments rather than route count, while keeping application code explicit.
Typed request flow
Context, routes, middleware, and errors share TypeScript contracts without loosening to `any`.
Small core, optional modules
Start with the functional core, then add middleware, streaming, or class-based composition when needed.
Web-standard adapters
Write against Request, Response, streams, and AbortSignal; adapters carry runtime-specific details.
Class runtime when it helps
Controllers, modules, request scopes, guards, and lifecycle hooks remain an opt-in path.
Security as composition
Add CORS, headers, CSRF protection, rate limits, and validation as intentional middleware choices.
Choose your next step
Learn the model first, then move into architecture or task-focused documentation.
Start with the mental model
See how applications, routers, middleware, and adapters fit together before writing code.
Read introductionExplore the architecture
Trace the request lifecycle, package boundaries, runtime support, and performance methodology.
View framework mapBuild from the docs
Move from concepts to guides, recipes, and API reference when you know what you need.
Browse documentationSmall packages. Explicit composition.
Install only what your application needs — start with the core, then add capabilities as your application grows.
Core
Start here
Class-based
Optional
Capabilities
Optional
Tooling
Dev tooling