NextRush
Getting Started

Introduction

What NextRush is, how it differs from common stacks, and where to read next.

Start here

NextRush is a backend framework for Node.js, Bun, Deno, and Edge — small core, strict TypeScript, and explicit wiring (middleware, router, optional controllers). The API stays readable: you can follow a request through middleware, the router, and the adapter without hidden steps.

When you want the full map — packages, both styles, benchmarks — read the Framework overview.

Requirements

NextRush requires Node.js 22.0.0 or later and TypeScript with strict mode enabled.

Where common stacks leave gaps

If you have shipped HTTP APIs before, you may have run into limits like these:

Express

Fast to start, weak structure. TypeScript via @types. Middleware wiring is manual.

Koa

Clean async/await, fragmented ecosystem. Quality across plugins varies.

Fastify

Node.js-focused throughput and plugins, steeper learning curve. JSON Schema validation can be verbose.

NestJS

Strong structure and DI, heavier runtime. Patterns feel closer to Angular than to small Node services.

Hono

Modern and fast, younger ecosystem. Edge-first defaults can feel tight for classic Node servers.

What NextRush emphasizes

FocusWhat you get
PerformanceSegment trie routing and a small hot path. Benchmarks use a fixed methodology — run them on your hardware before comparing frameworks.
TypeScriptWritten in strict mode; no any in the framework surface.
MiddlewareKoa-style async handlers with ctx.next().
StructureOptional controllers and DI when the project grows.
Modularity30 packages in the monorepo — install only what you need.
Multi-runtimeNode.js, Bun, Deno, and Edge with the same application code and adapter swap.

Core mental model

Three pieces show up in almost every app:

Application

The app holds middleware, plugins, and routes.

import { createApp } from 'nextrush';

const app = createApp();

Context

Each request gets a ctx — read input, write the response.

import { createRouter } from 'nextrush';

const router = createRouter();

router.get('/users/:id', (ctx) => {
  const { id } = ctx.params;
  const { page } = ctx.query;
  ctx.json({ id, page });
});

Middleware

Middleware runs in order. Code before ctx.next() runs on the way in; code after runs on the way out.

import { createApp } from 'nextrush';

const app = createApp();

app.use(async (ctx) => {
  const start = Date.now();
  await ctx.next();
  const duration = Date.now() - start;
  // Prefer structured logging in production instead of console.log
});

When NextRush fits

  • REST APIs and backend services
  • Teams that want strict TypeScript end-to-end
  • Teams that want to measure framework overhead with reproducible scripts (see Performance)
  • Deploying to more than one runtime (Node, Bun, Edge)
  • Prefer explicit wiring over implicit framework behavior
  • Modular installs instead of one giant framework bundle

When to pick something else

Choose the right tool

NextRush is a backend API framework. It does not replace full-stack frameworks like Next.js or Remix.

  • You need SSR or full-stack routing (Next.js, Remix, SvelteKit)
  • You need the widest npm middleware catalog (Express)
  • GraphQL-only APIs with a dedicated server stack
  • You require the longest production track record (Express, Fastify)

Next steps

On this page