Codebase maps / vercel/next.js

The Next.js codebase, as a map.

Next.js's repository holds the next package itself, Turbopack (its bundler, written in Rust), the Rust crates behind its compiler, and a set of smaller packages around them. Here is how they fit together - and the whole repository as a map you can open and explore.

Explore Next.js in 3D — free →vercel/next.js on GitHub
The Next.js repository as a map: every folder and file, grouped by package

How Next.js is organized

Next.js is the React framework: it builds full-stack web applications on the latest React features, with Rust-based tooling for fast builds. These are the parts of its repository, and what each one does.

packages/next

The package you install - its own description is "The React Framework". All of its source is in src/; the folders below are the main parts of it.

packages/next/src/server

The servers. next start runs next-server.ts; next dev runs dev/next-dev-server.ts. Pages from the app folder are rendered on the server in app-render/.

packages/next/src/build

next build: it turns your app into what runs in production. It starts in build/index.ts.

packages/next/src/client

The code that runs in the browser: the router for the app folder (components/app-router.tsx), Link, and the rest of the client side.

turbopack/

Turbopack: a general-purpose bundler written in Rust, built and designed for Next.js. It is the default bundler for both next dev and next build.

crates/ and packages/next-swc

The Rust side of Next.js: crates for its SWC bindings, and @next/swc, the package "responsible for swc compilation customized for next.js".

packages/create-next-app

create-next-app - "Create Next.js-powered React apps with one command".

Packages around Next.js

@next/font (next/font: fonts self-hosted, with no layout shift), @next/third-parties (loads third-party libraries efficiently) and eslint-plugin-next (ESLint rules for Next.js).

Where to start reading

Open these in the live map - click a file to read it beside the map, and point at it to see what it imports.

  1. packages/next/src/cli/next-dev.ts - what runs when you type next dev
  2. packages/next/src/server/next-server.ts - the production server behind next start
  3. packages/next/src/build/index.ts - where next build begins
  4. packages/next/src/server/app-render/app-render.tsx - where a page from the app folder is rendered on the server

Good to know

Is this the official Next.js repository?

Yes: github.com/vercel/next.js, where Next.js is developed. Each part above is described from the repository's own guide and each package's own description.

Is the map up to date?

The live map reads the repository when you open it, so it always shows the current code. The picture on this page was made on October 29, 2026.

Can I map my own project like this?

Yes. Paste any public GitHub link, or open a folder on your computer - your own code never leaves your device.