# hoangvvo/next-connect

The TypeScript-ready, minimal router and middleware layer for Next.js, Micro, Vercel, or Node.js http/http2

Repository: https://github.com/hoangvvo/next-connect
Canonical: https://ross.abutalabs.com/products/next-connect
Homepage: https://www.npmjs.com/package/next-connect
Language: TypeScript
License: MIT
License Family: permissive
Topics: javascript, nextjs, middleware, connect, router, micro, typescript
Last push: 2024-02-15T06:39:41+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2516, "days_push": 930, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1650, forks 65 (observed 2026-08-28T04:05:16.848124+00:00)

## What it is
next-connect is a lightweight, promise-based method routing and middleware layer for Next.js API routes, Edge routes, Middleware, App Router, and Node.js http/http2 servers. It supports async handlers with error catching, TypeScript, and Express middleware compatibility via a wrapper.

## Use cases
- add method-based routing to Next.js API routes
- use Express middleware like passport in Next.js handlers
- chain async middleware with error handling in serverless functions
- build lightweight routers for Vercel Edge or micro services
- handle GET/PUT/POST logic in a single Next.js route file
- replace Express with a faster minimal router on Node.js

## When to choose
- you use Next.js API routes or Edge runtime and want Express-style middleware chaining
- you need a tiny, fast router for serverless or Node.js http servers
- you want TypeScript-first routing with async error handling

## When to avoid
- you need a full-featured web framework with built-in validation, sessions, or templating
- you are on Next.js App Router and prefer native route handlers without middleware chaining
- you need routing features like nested route params or sub-routers beyond method routing

## Facets
- artifact type: library
- maturity: stable
- function: routing, middleware, http-server, web-framework
- domain: web-development, backend, apis
- platform: serverless
- tags: nextjs, express-compatible, typescript-ready, serverless, edge-runtime, nodejs, web-server

## Member repositories
- hoangvvo/next-connect (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:16.848124+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:45:05.054376+00:00, confidence not recorded.
  - readme: https://github.com/hoangvvo/next-connect (fetched 2026-08-28T04:05:16.848124+00:00, sha 07de8d3a70a6)
  - registry_npm: https://registry.npmjs.org/next-connect (fetched 2026-08-29T11:18:21.075403+00:00, sha caed0a23989d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
