Read OSS

vercel/next.js

6 articles

Prerequisites

01

Next.js Codebase Architecture: A Map of the Territory

A high-level tour of the Next.js monorepo covering workspace layout, core package structure, execution contexts, routing paradigms, bundler strategy, and configuration system.

02

From `next dev` to First Response: The Server Boot and Request Pipeline

Traces the complete startup sequence from the `next dev` CLI through the layered server architecture and follows a single HTTP request through route resolution, middleware, and dispatch.

03

Inside the App Router Rendering Engine: RSC, Streaming, and PPR

A deep dive into app-render.tsx — the heart of App Router rendering. Explores RSC Flight payloads, HTML streaming, AsyncLocalStorage stores, and Partial Prerendering.

04

The Client-Side Router: Navigation, Caching, and State Management

Explores the App Router's browser-side implementation — a reducer-based state machine managing navigation, RSC payload application, layout preservation, and PPR segment caching.

05

The Build Pipeline: webpack Config, Code Generation, and Three-Compiler Architecture

Deconstructs how `next build` transforms source code into production artifacts — from entrypoint discovery through code generation, Webpack configuration, and manifest production.

06

Caching in Depth: ISR, Response Cache, Cache Handlers, and the `use cache` Directive

Explores the multi-layered caching architecture spanning server and client — response cache, incremental cache, the CacheHandler interface for `use cache`, tag-based revalidation, and PPR caches.