{"id":45801869,"url":"https://github.com/0xtanzim/nextrush","last_synced_at":"2026-06-10T03:01:08.979Z","repository":{"id":304532042,"uuid":"1018992430","full_name":"0xTanzim/nextRush","owner":"0xTanzim","description":"A lightweight, modular Node.js framework for building scalable backend systems with TypeScript.","archived":false,"fork":false,"pushed_at":"2026-06-09T16:51:35.000Z","size":16133,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-09T17:28:59.326Z","etag":null,"topics":["backend","framework","nextrush","node","nodejs","server","typescript"],"latest_commit_sha":null,"homepage":"https://0xtanzim.github.io/nextRush/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xTanzim.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-13T14:02:05.000Z","updated_at":"2026-05-01T17:55:30.000Z","dependencies_parsed_at":"2025-07-13T18:43:26.107Z","dependency_job_id":"21c53d49-1288-47d7-acd2-af00d3ad63a3","html_url":"https://github.com/0xTanzim/nextRush","commit_stats":null,"previous_names":["0xtanzim/nextrush"],"tags_count":133,"template":false,"template_full_name":null,"purl":"pkg:github/0xTanzim/nextRush","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xTanzim%2FnextRush","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xTanzim%2FnextRush/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xTanzim%2FnextRush/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xTanzim%2FnextRush/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xTanzim","download_url":"https://codeload.github.com/0xTanzim/nextRush/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xTanzim%2FnextRush/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34134633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","framework","nextrush","node","nodejs","server","typescript"],"created_at":"2026-02-26T12:42:49.069Z","updated_at":"2026-06-10T03:01:08.971Z","avatar_url":"https://github.com/0xTanzim.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NextRush\n\n\u003e Minimal, modular, high-performance Node.js framework\n\n[![npm version](https://badge.fury.io/js/nextrush.svg)](https://www.npmjs.com/package/nextrush)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node.js](https://img.shields.io/badge/Node.js-≥22-339933?logo=node.js)](https://nodejs.org)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.x-3178C6?logo=typescript)](https://www.typescriptlang.org)\n\n## Why NextRush?\n\n- **Minimal Core** — Under 3,000 lines of code\n- **Modular** — Install only what you need\n- **Fast** — Competes with Fastify, Hono, and Koa\n- **Type-Safe** — Full TypeScript with zero `any`\n- **Zero Dependencies** — No external runtime dependencies in core\n- **Modern DX** — Clean context API, async/await native\n\n## Performance\n\nBenchmark snapshot from a single lab machine (Intel i5-8300H, 8 cores) running Node.js v25.9.0.\nAll tests: 10s duration, 64 connections, 4 threads. All servers implement identical endpoints with equivalent work.\nFor methodology, versions, and reproducible scripts, see `apps/benchmark`.\n\n### wrk (C-based, process-isolated)\n\n| Framework       | Hello World    | Route Params   | POST JSON      | Middleware Stack |\n| --------------- | -------------- | -------------- | -------------- | ---------------- |\n| Raw Node.js     | 35,863 RPS     | 33,326 RPS     | 25,116 RPS     | 30,738 RPS       |\n| Fastify         | 35,592 RPS     | 32,407 RPS     | 18,799 RPS     | 27,968 RPS       |\n| **NextRush v3** | **31,311 RPS** | **29,688 RPS** | **18,460 RPS** | **32,377 RPS**   |\n| Hono            | 26,438 RPS     | 26,586 RPS     | 10,826 RPS     | 22,179 RPS       |\n| Koa             | 23,350 RPS     | 21,890 RPS     | 14,954 RPS     | 20,972 RPS       |\n| Express         | 17,784 RPS     | 17,598 RPS     | 12,947 RPS     | 17,356 RPS       |\n\n### autocannon (Node.js-based, shares runtime)\n\n| Framework       | Hello World    | Route Params   | POST JSON      | Middleware Stack |\n| --------------- | -------------- | -------------- | -------------- | ---------------- |\n| Raw Node.js     | 36,903 RPS     | 33,936 RPS     | 24,936 RPS     | 31,471 RPS       |\n| Fastify         | 34,063 RPS     | 31,095 RPS     | 18,532 RPS     | 28,744 RPS       |\n| **NextRush v3** | **31,733 RPS** | **29,534 RPS** | **19,192 RPS** | **32,220 RPS**   |\n| Hono            | 28,209 RPS     | 25,966 RPS     | 10,798 RPS     | 22,258 RPS       |\n| Koa             | 23,845 RPS     | 22,421 RPS     | 15,323 RPS     | 21,125 RPS       |\n| Express         | 19,496 RPS     | 18,209 RPS     | 13,063 RPS     | 17,352 RPS       |\n\nNextRush v3 leads on middleware-stack in both tools and is competitive across all scenarios.\n\nBenchmarks are run via **2 built-in tools** in `apps/benchmark`:\n- **wrk** (C-based, process-isolated) — primary tool, most accurate results\n- **autocannon** (Node.js-based) — automatic fallback\n\nThe runner auto-detects wrk first; use `--tool wrk|autocannon` to force a specific tool.\n\n\u003e Performance varies by hardware. Run `pnpm benchmark` to test on your machine.\n\n## Quick Start\n\n### Scaffold a Project (Recommended)\n\n```bash\npnpm create nextrush my-api\ncd my-api \u0026\u0026 pnpm dev\n```\n\nThe `create nextrush` form (with a space) installs the `create-nextrush` package. You can also use `npx create-nextrush@latest` or `pnpm dlx create-nextrush@latest`. See the [create-nextrush docs](https://github.com/0xTanzim/nextRush/tree/main/packages/create-nextrush#usage).\n\nThe interactive scaffolder lets you choose between functional, class-based, or full style, pick a middleware preset, and select your runtime target.\n\n### Manual Setup\n\n```bash\npnpm add nextrush\n```\n\n```typescript\nimport { createApp, createRouter, listen } from 'nextrush';\n\nconst app = createApp();\n\n// Create feature routers\nconst users = createRouter();\nusers.get('/', (ctx) =\u003e ctx.json([]));\nusers.get('/:id', (ctx) =\u003e ctx.json({ id: ctx.params.id }));\nusers.post('/', (ctx) =\u003e ctx.json({ received: ctx.body }));\n\n// Mount routers — Hono-style composition\napp.route('/users', users);\n\n// Simple routes directly on app\nconst router = createRouter();\nrouter.get('/', (ctx) =\u003e ctx.json({ message: 'Hello NextRush!' }));\napp.route('/', router);\n\nlisten(app, 3000);\n```\n\n### Class-Based Controllers\n\n```bash\npnpm add nextrush @nextrush/di @nextrush/decorators @nextrush/controllers\n```\n\n```typescript\nimport 'reflect-metadata';\nimport { Controller, Get, Post, Body, Param, Service } from 'nextrush';\n\n@Service()\nclass UserService {\n  async findAll() {\n    return [{ id: 1, name: 'Alice' }];\n  }\n}\n\n@Controller('/users')\nclass UserController {\n  constructor(private userService: UserService) {}\n\n  @Get()\n  findAll() {\n    return this.userService.findAll();\n  }\n\n  @Get('/:id')\n  findOne(@Param('id') id: string) {\n    return { id };\n  }\n\n  @Post()\n  create(@Body() data: unknown) {\n    return data;\n  }\n}\n```\n\n## Context API\n\nNextRush uses a unified context object for clean, intuitive code:\n\n```typescript\n// Request (Input)\nctx.method; // GET, POST, etc.\nctx.path; // /users/123\nctx.params; // { id: '123' }\nctx.query; // { page: '1' }\nctx.body; // Parsed request body\nctx.headers; // Request headers\nctx.get('header'); // Get specific header\n\n// Response (Output)\nctx.status = 201; // Set status code\nctx.json(data); // Send JSON\nctx.send(text); // Send text\nctx.html(content); // Send HTML\nctx.redirect(url); // Redirect\nctx.set('header', 'value'); // Set header\n\n// Middleware\nctx.next(); // Call next middleware\nctx.state; // Share data between middleware\n```\n\n## Packages\n\n### Core (included in `nextrush`)\n\n| Package                  | Description                          |\n| ------------------------ | ------------------------------------ |\n| `@nextrush/core`         | Application \u0026 middleware composition |\n| `@nextrush/router`       | High-performance radix tree router   |\n| `@nextrush/adapter-node` | Node.js HTTP adapter                 |\n| `@nextrush/types`        | Shared TypeScript types              |\n| `@nextrush/errors`       | HTTP error classes                   |\n\n### Middleware (install separately)\n\n| Package                 | Description                 |\n| ----------------------- | --------------------------- |\n| `@nextrush/body-parser` | JSON/form/text body parsing |\n| `@nextrush/cors`        | CORS headers                |\n| `@nextrush/helmet`      | Security headers            |\n| `@nextrush/rate-limit`  | Rate limiting               |\n| `@nextrush/compression` | Response compression        |\n| `@nextrush/cookies`     | Cookie handling             |\n\n### Plugins (install separately)\n\n| Package               | Description             |\n| --------------------- | ----------------------- |\n| `@nextrush/static`    | Static file serving     |\n| `@nextrush/websocket` | WebSocket support       |\n| `@nextrush/template`  | Template rendering      |\n| `@nextrush/logger`    | Structured logging      |\n| `@nextrush/events`    | Type-safe event emitter |\n\n### Class-Based Development (install separately)\n\n| Package                 | Description                 |\n| ----------------------- | --------------------------- |\n| `@nextrush/controllers` | Decorator-based controllers |\n| `@nextrush/di`          | Dependency injection        |\n| `@nextrush/decorators`  | Route \u0026 param decorators    |\n\n### Development\n\n| Package           | Description                                                   |\n| ----------------- | ------------------------------------------------------------- |\n| `@nextrush/dev`   | Hot reload dev server, production builds, and code generators |\n| `create-nextrush` | Project scaffolder — `pnpm create nextrush`, `npx create-nextrush` ([usage](https://github.com/0xTanzim/nextRush/blob/main/packages/create-nextrush/README.md)) |\n\n## Adding Middleware\n\n```bash\npnpm add @nextrush/cors @nextrush/body-parser @nextrush/helmet\n```\n\n```typescript\nimport { createApp, listen } from 'nextrush';\nimport { cors } from '@nextrush/cors';\nimport { json } from '@nextrush/body-parser';\nimport { helmet } from '@nextrush/helmet';\n\nconst app = createApp();\n\napp.use(helmet());\napp.use(cors());\napp.use(json());\n\napp.post('/api/users', (ctx) =\u003e {\n  const { name, email } = ctx.body;\n  ctx.status = 201;\n  ctx.json({ id: Date.now(), name, email });\n});\n\nlisten(app, 3000);\n```\n\n## Error Handling\n\n```typescript\nimport { NotFoundError, BadRequestError } from 'nextrush';\n\napp.get('/users/:id', async (ctx) =\u003e {\n  const user = await db.findUser(ctx.params.id);\n\n  if (!user) {\n    throw new NotFoundError('User not found');\n  }\n\n  ctx.json(user);\n});\n\n// Or use ctx.throw()\napp.get('/users/:id', (ctx) =\u003e {\n  ctx.throw(404, 'User not found');\n});\n```\n\n## CLI Tools\n\n### Dev Server \u0026 Build\n\n```bash\nnextrush dev                    # Hot reload dev server\nnextrush build                  # Production build with decorator metadata\n```\n\n### Code Generators\n\n```bash\nnextrush generate controller user    # Class-based controller\nnextrush g service user-profile      # Injectable service\nnextrush g middleware request-logger # Async middleware\nnextrush g guard auth               # Guard function\nnextrush g route product            # Functional route\n```\n\n## Development\n\n```bash\n# Install dependencies (does not run a full compile — use build/verify when you need artifacts)\npnpm install\n\n# Build all packages\npnpm build\n\n# Run tests\npnpm test\n\n# Run benchmarks\ncd apps/benchmark \u0026\u0026 pnpm benchmark\n\n# Type check\npnpm typecheck\n```\n\n## Project Structure\n\n```\nnextrush/\n├── packages/\n│   ├── core/            # @nextrush/core\n│   ├── router/          # @nextrush/router\n│   ├── types/           # @nextrush/types\n│   ├── errors/          # @nextrush/errors\n│   ├── runtime/         # @nextrush/runtime\n│   ├── adapters/        # Platform adapters (node, bun, deno, edge)\n│   ├── middleware/       # cors, helmet, body-parser, etc.\n│   ├── plugins/         # controllers, websocket, template, etc.\n│   ├── di/              # Dependency injection\n│   ├── decorators/      # Controller decorators\n│   ├── dev/             # CLI: dev server, build, generators\n│   ├── create-nextrush/ # Project scaffolder\n│   └── nextrush/        # Meta package\n├── apps/\n│   ├── docs/            # Documentation site\n│   ├── benchmark/       # Benchmark suite\n│   └── playground/      # Testing playground\n└── draft/               # Architecture docs \u0026 RFCs\n```\n\n## Documentation\n\n- [Getting Started](https://github.com/0xTanzim/nextRush/blob/main/apps/docs/content/docs/getting-started/index.mdx)\n- [Core Concepts](https://github.com/0xTanzim/nextRush/blob/main/apps/docs/content/docs/concepts/index.mdx)\n- [API Reference](https://github.com/0xTanzim/nextRush/blob/main/apps/docs/content/docs/api-reference/index.mdx)\n- [Performance \u0026 benchmarks](https://github.com/0xTanzim/nextRush/blob/main/apps/docs/content/docs/performance/index.mdx)\n- [Docs site (GitHub Pages)](https://0xtanzim.github.io/nextRush/docs)\n- [GitHub Wiki](https://github.com/0xTanzim/nextRush/wiki) — concise guides (source in repo [`wiki/`](https://github.com/0xTanzim/nextRush/tree/main/wiki); publish with `./scripts/publish-github-wiki.sh`)\n\n## Versioning\n\nNextRush follows [Semantic Versioning](https://semver.org/). We use [Changesets](https://github.com/changesets/changesets) to manage releases.\n\n- **Major** (x.0.0) — Breaking API changes\n- **Minor** (0.x.0) — New features, backward-compatible\n- **Patch** (0.0.x) — Bug fixes, security patches\n- **Pre-release** (`-alpha.x`, `-beta.x`) — Unstable, API may change\n\nSee [CHANGELOG.md](CHANGELOG.md) for release history and [PUBLISHING.md](PUBLISHING.md) for release process.\n\n## Contributing\n\nContributions are welcome! Please read the [contribution guidelines](CONTRIBUTING.md) first.\n\n## License\n\nMIT © [Tanzim Hossain](https://github.com/0xTanzim)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xtanzim%2Fnextrush","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xtanzim%2Fnextrush","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xtanzim%2Fnextrush/lists"}