The documented Next.js architecture
Next.js is built around React and provides a framework layer for routing, rendering, data access, server endpoints, compilation, and bundling. This describes the public programming model documented for applications; it does not reveal private infrastructure used to operate nextjs.org.
In the App Router, the route tree is organized through files for pages, layouts, loading states, errors, and related behavior. Layouts and pages are Server Components by default. Client Components define browser-executed subtrees for state, event handlers, effects, and browser-only APIs.
Public framework layers
| Layer | Documented responsibility |
|---|---|
| React components | Compose the user interface and define server or client component trees |
| App Router or Pages Router | Map application structure to routes using different Next.js models |
| Rendering system | Produce prerendered or request-time output and coordinate streaming where applicable |
| Caching and revalidation | Control reuse and freshness according to route and data behavior |
| Route Handlers | Implement HTTP endpoints within an App Router application |
| Build tooling | Compile and bundle application code and assets for supported deployments |
A Next.js route may include server-rendered content and focused client interaction. The presence of a Client Component does not make every ancestor a browser-rendered application, although the chosen client boundary affects which modules are included for the browser.
Delivery choices
- Static export produces files for projects that do not need unsupported server features.
- Prerendering prepares route output before an individual request.
- Dynamic rendering produces output using request-time information.
- Caching and revalidation manage reuse and freshness between those extremes.
- A compatible runtime is required for request-time and other server-dependent behavior.
The official deployment guide documents self-hosting and platform adapters, so Vercel is not a technical requirement for every Next.js application. Feature coverage can differ across environments. Teams should verify routing, caching, image behavior, revalidation, streaming, and Route Handlers against their selected target instead of inferring compatibility from a successful build.
