npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nextrush

v3.0.6

Published

Minimal, modular, blazing fast Node.js framework

Readme

NextRush

Minimal, modular, high-performance Node.js framework

npm version License: MIT Node.js TypeScript

Why NextRush?

  • Fast — 50-60% faster than Express, competes with Fastify and Hono
  • Minimal — Core under 3,000 lines of code
  • Modular — Install only what you need
  • Type-Safe — Full TypeScript with zero any
  • Zero Dependencies — No external runtime dependencies in core

This Package

nextrush is a meta package that re-exports the essentials:

  • createApp, Application — Create and manage application instances
  • createRouter, Router — Create and manage routers
  • listen, serve, createHandler — Start HTTP server (Node.js)
  • compose — Compose middleware
  • Error classes (HttpError, NotFoundError, BadRequestError, MethodNotAllowedError, etc.)
  • Error utilities (createError, isHttpError, errorHandler, notFoundHandler, catchAsync)
  • TypeScript types (Context, Middleware, Next, Plugin, RouteHandler, HttpMethod, etc.)
  • Constants (VERSION, HttpStatus, ContentType)

Middleware and plugins are installed separately. This is intentional — you only pay for what you use.

Installation

pnpm add nextrush

Quick Start

import { createApp, createRouter, listen } from 'nextrush';

const app = createApp();
const router = createRouter();

router.get('/', (ctx) => {
  ctx.json({ message: 'Hello NextRush!' });
});

app.route('/', router);

listen(app, 3000);

Performance

Benchmark snapshot from a single lab machine (Intel i5-8300H, 8 cores) running Node.js v25.1.0. See https://github.com/0xTanzim/nextRush/blob/main/apps/docs/content/docs/performance/index.mdx for methodology, versions, and reproducible scripts.

| Framework | Hello World | POST JSON | Mixed Workload | | --------------- | -------------- | -------------- | -------------- | | Fastify | 48,045 RPS | 21,412 RPS | 48,493 RPS | | NextRush v3 | 43,268 RPS | 20,438 RPS | 43,283 RPS | | Hono | 37,476 RPS | 12,625 RPS | 38,759 RPS | | Koa | 34,683 RPS | 17,664 RPS | 35,566 RPS | | Express | 23,739 RPS | 14,417 RPS | 23,783 RPS |

Performance varies by hardware. See Performance for methodology and numbers.

Adding Middleware

Install what you need:

pnpm add @nextrush/cors @nextrush/body-parser
import { createApp, listen } from 'nextrush';
import { cors } from '@nextrush/cors';
import { json } from '@nextrush/body-parser';

const app = createApp();

app.use(cors());
app.use(json());

app.use((ctx) => {
  ctx.json({ body: ctx.body });
});

listen(app, 3000);

Class-Based Controllers

Class-based APIs (decorators, DI, controllers) are available via the nextrush/class subpath:

  • nextrush — Functional API (createApp, createRouter, listen, errors, types)
  • nextrush/class — Class-based API (Controller, Get, Service, controllersPlugin, etc.)

The nextrush/class entry auto-imports reflect-metadata, so you can use decorators and DI without any extra setup:

pnpm add nextrush
import { createApp, createRouter, listen } from 'nextrush';
import { controllersPlugin, Controller, Get, Service } from 'nextrush/class';

@Service()
class GreetService {
  greet() {
    return { message: 'Hello!' };
  }
}

@Controller('/api')
class HelloController {
  constructor(private svc: GreetService) {}

  @Get()
  hello() {
    return this.svc.greet();
  }
}

const app = createApp();
const router = createRouter();

app.plugin(controllersPlugin({ router, root: './src' }));
app.route('/', router);
listen(app, 3000);

experimentalDecorators and emitDecoratorMetadata are required when you use nextrush/class with DI or decorators. create-nextrush turns them on for class-based and full templates, and omits them for functional (routes-only) projects where they are unnecessary.

What's Included

This meta package re-exports from:

| Package | Exports | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | | @nextrush/core | createApp, Application, compose | | @nextrush/router | createRouter, Router | | @nextrush/adapter-node | listen, serve, createHandler | | @nextrush/types | Context, Middleware, Next, Plugin, RouteHandler, HttpMethod, HttpStatus, ContentType | | @nextrush/errors | HttpError, NextRushError, error classes (4xx/5xx), createError, isHttpError, errorHandler, notFoundHandler, catchAsync |

Available Packages

Core (included in nextrush)

| Package | Description | | ------------------------ | ------------------------------------ | | @nextrush/core | Application & middleware composition | | @nextrush/router | High-performance radix tree router | | @nextrush/adapter-node | Node.js HTTP adapter | | @nextrush/types | Shared TypeScript types | | @nextrush/errors | HTTP error classes |

Middleware (install separately)

| Package | Description | | ----------------------- | -------------------------------------- | | @nextrush/body-parser | JSON/form/text body parsing | | @nextrush/cors | CORS headers | | @nextrush/helmet | Security headers | | @nextrush/cookies | Cookie handling | | @nextrush/compression | Response compression (gzip/brotli) | | @nextrush/rate-limit | Rate limiting with multiple algorithms | | @nextrush/request-id | Request ID generation | | @nextrush/timer | Request timing headers |

Plugins (install separately)

| Package | Description | | ----------------------- | ------------------------------- | | @nextrush/logger | Structured logging | | @nextrush/static | Static file serving | | @nextrush/websocket | WebSocket support with rooms | | @nextrush/template | Multi-engine template rendering | | @nextrush/events | Type-safe event emitter | | @nextrush/controllers | Decorator-based controllers |

Advanced (install separately)

| Package | Description | | ---------------------- | ------------------------------ | | @nextrush/di | Dependency injection container | | @nextrush/decorators | Controller & route decorators |

Dev Tools

| Package | Description | | ----------------- | --------------------------------------------------------- | | @nextrush/dev | Hot reload dev server, production builds, code generators | | create-nextrush | Project scaffolder — pnpm create nextrush, npx create-nextrush (usage) |

Direct Package Usage

For maximum control, skip the meta package:

import { createApp } from '@nextrush/core';
import { createRouter } from '@nextrush/router';
import { listen } from '@nextrush/adapter-node';
import { cors } from '@nextrush/cors';

Error Handling

Built-in HTTP error classes:

import { NotFoundError, BadRequestError, HttpError } from 'nextrush';

app.use(async (ctx) => {
  if (!user) throw new NotFoundError('User not found');
  if (!valid) throw new BadRequestError('Invalid input');
});

Version

import { VERSION } from 'nextrush';
console.log(VERSION); // '3.0.5'

License

MIT © Tanzim Hossain