Beginner
- Create a new Next.js app with
create-next-appand add three routes:/,/about,/contact. - Build a nested layout: a
/dashboardsection with its own sidebar layout, containing/dashboard/profileand/dashboard/settingspages. - Create a dynamic route
/products/[id]that displays the id from the URL. - Add a shared
Navbarin the root layout usingnext/linkfor all navigation. - Add
metadata(title + description) to three different pages.
Intermediate
- Build a
/studentspage that fetches a list from a public API (e.g.https://jsonplaceholder.typicode.com/users) inside a Server Component. - Add a search page at
/searchthat reads aqsearch param and filters results server-side. - Build a "contact us" form using a Server Action that validates the email field and shows an error via
useActionState. - Create a Route Handler at
/api/studentssupportingGET(list) andPOST(create). - Add
next/imageto a gallery page and compare load behavior with a plain<img>tag using browser DevTools' Network tab.
Advanced
- Add middleware that redirects unauthenticated visitors away from a
/dashboardroute group. - Convert a data-heavy page to use
"use cache"with acacheLifeprofile, and add a Server Action that callsrevalidateTagafter a mutation. - Build a product page that combines a static shell with a
<Suspense>-streamed personalized section (Partial Prerendering / Cache Components in practice). - Add
generateMetadatato a dynamic blog route so each post has a unique title and Open Graph image. - Set up a CI check that runs
next buildand fails if any route unexpectedly becomes fully dynamic when it was meant to be static. - Deploy the finished app (Vercel, or another host using the Adapter API) and verify caching headers with browser DevTools.
Compare each exercise's Server vs Client Component boundaries as you build — that decision affects nearly everything else in a Next.js app.
Learning roadmap
| Stage | Focus |
|---|---|
| Weeks 1–2 | Project setup, file-based routing, layouts, next/link navigation |
| Weeks 3–4 | Server vs Client Components, data fetching, basic caching |
| Weeks 5–6 | Server Actions, forms, Route Handlers, middleware |
| Weeks 7–8 | Rendering strategies (SSR/SSG/ISR/PPR), SEO, image/font optimization |
| Ongoing | Cache Components, Turbopack tuning, an auth provider, deployment & monitoring |
Common interview questions
- What problem does the App Router's file-based routing solve compared to manually configuring a router?
- Explain the difference between a Server Component and a Client Component, and when you'd need
'use client'. - What are the four core rendering strategies in Next.js, and how would you choose between them for a given page?
- How does
revalidateTagdiffer fromrevalidatePath? - What is a Server Action, and how is it different from a traditional API route?
- Why does Next.js recommend
next/imageandnext/fontinstead of plain<img>tags and<link>font imports? - What does middleware run on, and why can't it use most Node.js-only packages?
- Explain what Cache Components changed about the App Router's caching model, and why.
- What's the difference between
NEXT_PUBLIC_and regular environment variables? - What is Partial Prerendering, and what problem does it solve that plain SSG/SSR couldn't?
Where to go next
Read the official documentation at nextjs.org/docs, which is kept in sync with each release. Then build one complete project — a blog with dynamic routes and SEO metadata, or a small SaaS dashboard with authentication and a database — rather than only isolated exercises. Pushing a real app through next build and deploying it is what surfaces the caching, rendering, and data-fetching decisions that tutorials alone don't teach.