Next.js
A beginner to advanced Next.js library: App Router fundamentals, rendering strategies and React Server Components, routing and navigation, data fetching and the caching layers, Server Actions and Route Handlers, authentication and proxy, performance, testing, deployment, and an interview playbook.
Start here for Next.js prep, from "what is the difference between page.tsx and layout.tsx" to "why is this page still showing stale data after the mutation".
Each page teaches the framework the way interviews probe it: what runs on the server, what ships to the browser, what is cached where, and how you would prove it.
Everything reflects the current platform: the App Router is the default, Server Components are the default component type, Turbopack is the default bundler, params and cookies() are async, proxy.ts replaces middleware.ts, and Cache Components with "use cache" is the explicit caching model.
- 01Next.js Fundamentals
Next.js from zero: what it is and how it differs from plain React, Remix, and Astro, project setup and anatomy, App Router file conventions, layouts and templates, Link and navigation hooks, styling, fonts and images, metadata and SEO, environment variables, and the mistakes SPA developers make first.
BeginnerTable of Contents1. What Next.js Is2. Next.js vs the Alternatives3. Creating a Project4. Project Anatomy5. App Router File Conventions6. Layouts and Templates7. Linking and Navigation8. Styling, Fonts, and Images9. Metadata and SEO10. Environment Variables11. Common Mistakes from SPA Developers+1 more - 02Rendering and Server Components
How Next.js renders: CSR, SSR, SSG, ISR, and streaming compared, static vs dynamic rendering and what triggers each, React Server Components and the RSC payload, the use client boundary, composition rules, serialization limits, hydration and its errors, Suspense and loading UI, and Partial Prerendering.
Mid to advanced - 03Routing and Navigation
Next.js App Router routing in depth: dynamic, catch-all, and optional catch-all segments, async params and searchParams, route groups and private folders, generateStaticParams, loading, error, and not-found handling, parallel and intercepting routes for modals, redirects and rewrites, internationalization, and client navigation behavior.
Beginner to mid - 04Data Fetching and Caching
Data in Next.js: fetching in Server Components, parallel vs sequential requests and waterfalls, request memoization and React cache, the four classic caches (Request Memoization, Data Cache, Full Route Cache, Router Cache), Cache Components with use cache, cacheLife, cacheTag, revalidateTag, updateTag, and refresh, ISR, client-side data libraries, and debugging stale data.
Mid to advancedTable of Contents1. Where to Fetch Data2. Fetching in Server Components3. Parallel vs Sequential Fetching4. Request Memoization and React cache5. The Classic Caching Layers6. Cache Components and use cache7. Cache Lifetimes and Tags8. Revalidation APIs9. Time-based and On-demand ISR10. Client-side Data Fetching11. Debugging Stale Data+1 more - 05Server Actions and Route Handlers
Mutations and APIs in Next.js: Server Actions with forms and progressive enhancement, useActionState, useFormStatus, useOptimistic, validation with Zod, returning errors, revalidation after mutations, file uploads, Route Handlers for REST endpoints and webhooks, streaming responses, CORS, and when to use which.
MidTable of Contents1. Server Actions Basics2. Forms and Progressive Enhancement3. useActionState and Pending UI4. Validation and Error Handling5. Optimistic Updates6. Revalidation After Mutations7. Calling Actions from Event Handlers8. Uploads9. Route Handlers10. Actions vs Route Handlers11. Security Model+1 more - 06Auth, Security, and Proxy
Authentication and security in Next.js: proxy.ts (formerly middleware) and what it should and should not do, session cookies vs JWTs, the Data Access Layer pattern, authorization at every boundary, Auth.js and other libraries, OAuth flows, CSRF, security headers and CSP with nonces, server-only code, secrets, rate limiting, and a production checklist.
Mid to advancedTable of Contents1. Authentication vs Authorization2. proxy.ts (Formerly Middleware)3. Sessions: Cookies vs JWTs4. Implementing Sessions5. The Data Access Layer6. Where to Check Auth7. Auth Libraries and OAuth8. CSRF, XSS, and Cookies9. Security Headers and CSP10. Secrets and Server-only Code11. Rate Limiting and Abuse+2 more - 07Performance and Optimization
Next.js performance: Core Web Vitals and how each is hurt or helped, measuring with Lighthouse, Web Vitals, and the bundle analyzer, next/image, next/font, next/script, bundle size and dynamic imports, Server Component wins, streaming and Partial Prerendering, caching layers, React Compiler, Turbopack, and a debugging playbook.
Mid to advanced - 08Testing, Deployment, and Operations
Shipping Next.js: the testing pyramid for the App Router (Vitest, React Testing Library, Playwright, mocking), CI pipelines, deployment targets (Vercel, Node server, Docker standalone, static export, adapters), environment configuration, multi-instance caching and cacheHandler, observability with instrumentation and OpenTelemetry, logging, and upgrades.
Mid - 09Next.js Interview Playbook
Next.js interview rehearsal: what each level is expected to know, a 50-question bank with strong-answer checklists, predict-the-behavior puzzles, machine coding tasks, system design prompts, production scenarios, cheat sheets, common mistakes, and a 7-day study plan.
All levels
Reading Path
Pick Your Level
| You are | Read in this order |
|---|---|
| A React SPA developer new to Next.js | Fundamentals, Routing and Navigation, Rendering and Server Components |
| Preparing for a mid-level role | Add Data Fetching and Caching, Server Actions and Route Handlers, and Performance |
| Preparing for senior or platform roles | Add Auth, Security, and Proxy and Testing, Deployment, and Operations |
| One week left | The Interview Playbook study plan |
Related Sections
- React covers hooks, rendering, and patterns that apply unchanged inside Client Components.
- JavaScript and TypeScript cover the language your app is written in.
- Redux covers Redux Toolkit and RTK Query, which live in Client Components only.
- Backend covers HTTP, auth, caching, and queues behind Route Handlers and Server Actions.
- Frontend System Design covers the client architecture framework used in design rounds.