vercel/next.js
6 articles
Prerequisites
- ›Basic familiarity with Next.js as an application developer
- ›General understanding of monorepo structures and package managers
- ›Awareness of the difference between server-side and client-side rendering
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.
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.
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.
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.
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.
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.