Next.js
Seven chapters on the framework that most senior frontend job adverts name by version. Chapters 01–05 are the framework itself. They show how the App Router maps files to routes, where data is fetched and cached, and how mutations run on the server. They also show how a route renders, and what runs before it, on which runtime. Chapters 06–07 cover production: authentication, and the point where Next.js starts to be your backend.
Written against Next.js 16. Nothing here assumes Vercel. The chapters name the platform only where a detail really differs, such as cold starts, regional execution, or which adapter runs the build.
⚠️ Moving target. Caching rules changed in Next.js 15 and again in 16. Version 16 also renamed
middleware.tstoproxy.tsand made every request API asynchronous. Treatuse cache,cacheLifeandcacheTagas this year's names for a lasting principle. Caching is opt-in per request, and anything cached needs an explicit key that you can invalidate on purpose.
Chapters
| # | Chapter | What it answers |
|---|---|---|
| 01 | App Router Mental Model | How do files become routes, and what re-renders on navigation? |
| 02 | Data Fetching and Caching | Where does this request go, and how long does the answer live? |
| 03 | Server Actions | How do you mutate data without writing an API route — and safely? |
| 04 | Rendering in Next.js | Static, dynamic, streaming or partially prerendered — which, and why? |
| 05 | Middleware, Runtimes and Deployment | What runs before the route, on which runtime, and where does the cache live when you self-host? |
| 06 | Auth Patterns | Session or token, and where is it checked? |
| 07 | Route Handlers and the BFF | When is Next.js your backend, and when should it stop being one? |
What Interviewers Probe For
Two Next.js-specific questions, on top of the part-level signals in the Part III opener:
- "Why is this page stale?" The answer walks a chain — the fetch, the cache entry, the revalidation key, and the CDN in front of it. Candidates who have only used the defaults describe the symptom. Candidates who have shipped a content site name the layer.
- "What stops a user calling that Server Action directly?" Nothing. It is a public endpoint with a generated name. Authorisation and validation belong inside the action, every time. The most common security finding in App Router code is a Server Action trusted just because it sits beside its component.
Reading Order
Read 01 → 05 in order. The caching model in 02 explains the rendering choices in 04, and 03 assumes both. Chapters 06 and 07 stand alone and can be read in either order.
Interview sprint: 01 → 02 → 03 → 04. Rendering and caching are what the round asks about. Runtimes and deployment are what the job asks about.