Learning Roadmap

Follow this path from top to bottom. Each chapter builds on the previous one. Don't skip ahead. The foundations matter.

🌱

Beginner

01

What is Next.js & Getting Started

Why Next.js exists, what problems it solves, and how to set up your first project.

02

File-Based Routing (App Router)

How folders become URLs. Pages, nested routes, and the app directory structure.

03

Layouts, Templates & Metadata

Shared UI across pages, nested layouts, route groups, and SEO metadata.

04

Link, Image & Script Components

Next.js built-in components for navigation, optimized images, and third-party scripts.

05

Styling in Next.js

CSS Modules, Tailwind CSS, CSS-in-JS, and global styles. Pick your weapon.

Intermediate

06

Dynamic Routes & Route Groups

Params, catch-all routes, optional segments, and organizing routes with groups.

07

Server vs Client Components

The React Server Components mental model. When to use 'use client' and why.

08

Data Fetching & Caching

Fetching data in Server Components, caching strategies, revalidation, and streaming.

09

Server Actions & Forms

Mutate data without API routes. Forms, validation, optimistic updates, and revalidation.

10

API Routes (Route Handlers)

Build your backend inside Next.js. GET, POST, dynamic routes, and middleware.

11

Middleware

Run code before a request completes. Auth checks, redirects, rewrites, and geolocation.

12

Loading & Error Handling

loading.tsx, error.tsx, not-found.tsx, and Suspense boundaries for better UX.

🚀

Advanced

13

Authentication (Auth.js)

Protect your app with Auth.js (NextAuth v5). OAuth, credentials, sessions, and guards.

14

Advanced Patterns

Parallel routes, intercepting routes, streaming with Suspense, and partial prerendering.

15

Deployment & Production

Deploy to Vercel, self-host, bundle analysis, performance tips, and production checklist.

16

Metadata & SEO

Page titles, Open Graph images, structured data, sitemaps, and robots.txt for discoverability.

17

Performance & Optimization

Bundle splitting, image optimization, font loading, Core Web Vitals, and Lighthouse scores.

Next.js Rendering - At a Glance

Rendering Strategies in Next.js 15Static (SSG)Built at compile timeServed from CDNFastest possibleServer (SSR)Rendered per requestAlways fresh dataSlightly slowerStreamingProgressive renderingShell loads firstParts stream inISR (Revalidation)Static + timed refreshBest of both worldsrevalidate: 60PPR (Partial)Static shell + dynamic partsFuture of Next.jsSuspense boundariesAll strategies are available simultaneously. Choose per-route based on your data needs
Click to expand

How Data Flows in Next.js

UserBrowserRequestMiddlewareAuth/RedirectServer Component(Page)Route Handler(API)fetch/dbDatabase/ External APIHTML / JSON ResponseServer Action(Form mutation)
Click to expand