Next.js 16 · build anatomy

The build is not one step. It is a compiler pipeline that turns your app tree into runtime maps.

This page explains what Next.js reads, what it transforms, what it emits, and which runtime later consumes each artifact. Open any stage to see its inputs, the artifact it produces, and the runtime that reads that artifact later.

14
Build stages
06
Module graphs
05
Manifest families
.next
Deployable output
Turbopack defaultApp Router DSLRSC / FlightManifests.next outputstandalone tracing
01 — pipeline

From source files to a deployable runtime.

A Next.js build starts with your project files, but it does not simply concatenate them. It reads configuration, resolves environment variables, classifies modules into runtime graphs, compiles TypeScript and JSX, processes assets, splits server and client boundaries, builds chunks, analyzes routes, prerenders what can be static, writes manifests, and finally reports what was produced.

Build pipeline diagram

Inputs flow left to right into the deployable output
tap any stage ↗
configloadConfignext.configtsconfig envSWCpublic inlineprivate server graphsTurbopackserver graphclient graphasset graphroute graph compileSWCTS / JSXtransforms optimizeTurbopackDCEchunks publishreact-dom/server@vercel/nftroutesmanifests.next/traces reportnext buildbudgets Build output is not only JavaScript. It is JS + CSS + HTML + RSC payloads + route maps + manifests + traces + cache metadata. core question for every stage: what did it read, what did it produce, and who reads that product later?
phase mental modelMODEL
02 — graph analysis

The app becomes several graphs, not one bundle.

Next.js and Turbopack have to decide which modules belong to the server runtime, which belong to the browser runtime, which are route handlers, which are assets, and which files are only metadata. The split matters because each graph has a different runtime and a different failure mode.

Graph classification diagram

Shows how imports become server, client, route, asset and proxy graphs
tap any box ↗
source filesimports / exportsspecial files server graphRSC modules, server APIs client graph'use client' entry subtrees route graphapp tree → URL matchers asset graphCSS, fonts, images boundary graphclient refs + RSC map proxy graphproxy.ts request gate Node / Edge readersserver bundlesroute handlers Browser readersclient chunkshydration / prefetch The graph step decides runtime ownership. A wrong boundary leaks server-only code to the client or browser-only code to the server.
03 — App Router DSL

Your folder tree is a routing language.

In the App Router, the tree is not just organization. Folder names are path grammar. Special files are framework keywords. Nesting is layout composition. Dynamic folders are parameters. Route groups are invisible organization. Next.js reads that structure and emits internal route manifests from it.

Filesystem DSL → route map

Folders become segments; special files become behavior
tap a box or file ↗
app/ filesystemlayout.tsxpage.tsxdashboard/page.tsxdashboard/settings/page.tsxblog/[slug]/page.tsx(marketing)/about/page.tsxapi/users/route.tsproxy.ts route analyzerfolder = segmentfilename = instruction segment treelayouts wrap pagesloading creates Suspense runtime route map/ → app/page.tsx/dashboard → dashboard/page/dashboard/settings → page/blog/:slug → [slug]/about → (marketing)/about/api/users → route handlerproxy → request interception There is no handwritten central routes.json. Next builds internal route manifests from this filesystem DSL.

Special files are keywords

folder tree → route mapTREE
app/dashboard/settings/page.tsx
        ↓
/dashboard/settings

app/dashboard/settings/Button.tsx
        ↓
not a route; just a colocated module

app/api/users/route.ts
        ↓
GET /api/users
POST /api/users
04 — RSC transport

Initial load can stream HTML and Flight together. Client navigation usually asks for Flight separately.

The browser can paint HTML immediately, but React also needs the serialized Server Component tree so it can reconcile what the server rendered and hydrate Client Component boundaries. That serialized tree is the Flight / RSC payload.

HTML + Flight transport diagram

Hard load vs client-side navigation
tap any box ↗
Initial hard load / refresh browserGET /some-pageAccept: text/html Next serverRSC payloadHTML previewstream response one HTML document stream<html>...paintable preview<script>self.__next_f.push(...)client chunk references Client-side navigation browser appclick <Link /> RSC requestAccept: text/x-componentno full document needed Flight payload onlyReact applies updateclient chunks hydrate if needed
hard load · documentHTML
<html>
  <body>
    server-rendered preview...
    <script>self.__next_f.push(... )</script>
    <script>self.__next_f.push(... )</script>
  </body>
</html>
client nav · flightRSC
Flight payload only

The existing document stays alive.
The client router receives the next RSC tree.
React reconciles the new server output.
05 — manifests

A manifest is a map for a later reader.

The word “manifest” causes confusion because there are two very different categories. Your app/manifest.* is browser-facing metadata for installability and icons. Internal .next/ manifests are build products that Next, React, the router, the deployment adapter, or the cache system read later.

Manifest families diagram

Public browser manifest vs internal runtime manifests
tap any box ↗
build inputsapp treegraphs/assets public browser manifestapp/manifest.* → browser route/runtime manifestsURLs → compiled entries React/RSC boundaryclient refs → chunks prerender/cache/deploy browser / OS shellicons, display, start_url Next server / routermatch route → load bundlechoose runtime / assets React + deployment readerhydrate boundaries / copy traces
example shapeJSON
06 — .next output

The build output is a directory of runtime artifacts.

.next/ is not just “the bundle.” It contains server-side bundles, browser chunks, static assets, generated HTML/RSC artifacts, route metadata, cache data, and traces that explain which files a deployment needs to copy.

.next/ output map

What gets emitted and who reads it
tap any box ↗
sourceapp/components/lib/public/next.configenv .next/serverserver bundlesroute handlers .next/staticbrowser chunks/assets .next/cacheincremental work cache manifest files standalone outputserver.jsminimal node_modulescopied traced files .nft.json tracesfile list for each entryused by output tracing deploymentcopy minimal filesserve static assetsrun server
example paths.NEXT
07 — handbook

The deeper rule: every artifact exists because something later needs to read it.

Lock this in: the tree is the config, the filenames are the keywords, the graphs decide runtime ownership, and the manifests are the maps that let runtime readers find the correct thing later.
tap any concept to expand ↗
Back to JIT-Atlas