vercel/next.js
Next.js
Next.js is the React framework that powers full-stack web applications. The repository at vercel/next.js is the home of the next npm package along with the Turbopack bundler, the SWC-based compiler, the App Router runtime, the Pages Router runtime, and the supporting CLI and developer tooling that ship as part of every release.
What lives here
This is a pnpm monorepo with four major source areas:
packages/— TypeScript and JavaScript packages published to npm. The flagship ispackages/next, which is the framework users install withnpm install next.crates/— Rust crates that build the SWC-based custom transforms, the Next.js API used by Turbopack, the build orchestration, and the napi/wasm bindings.turbopack/— A git subtree containing the Turbopack bundler crates. This subtree is split out of and merged back into vercel/turborepo periodically.test/— End-to-end, integration, development-mode, production-mode, and unit test suites that exercise both the JavaScript runtime and the Rust pipeline.
Documentation lives in docs/ and is the source for nextjs.org/docs. Examples live in examples/ (more than 200 of them).
Two routers, two pipelines, one framework
Next.js ships two router implementations side by side:
- App Router (
packages/next/src/server/app-render/,packages/next/src/client/components/app-router*) — the React Server Components-based router that supports streaming, server actions, partial prerendering, and the new caching primitives. - Pages Router (
packages/next/src/server/render.tsx,packages/next/src/pages) — the originalpages/directory router usinggetStaticProps/getServerSideProps.
Both routers share the same dev server, route server, image optimizer, and CLI. They build through a unified pipeline in packages/next/src/build/index.ts that supports three bundlers: Turbopack (default), webpack, and rspack.
Quick links
- System architecture — how dev server, build, route server, and rendering fit together
- Getting started — clone, install, build, and run the framework locally
- Glossary — terms used throughout the codebase
- How to contribute — workflows, testing, and conventions
- Codebase by the numbers — size, churn, and language breakdown
- Lore — history of the codebase and major rewrites
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.