Next.js 15 App Router: A Complete Guide for 2026
The App Router is now the default way to build Next.js applications, and Next.js 15 makes it faster and more predictable than ever. If you're starting a new project or migrating an old one, this guide covers the mental model and the pieces you'll use every day.
File-based routing, folders as routes
In the App Router, every folder under `app/` is a route segment and a `page.tsx` inside it makes that segment publicly accessible. Special files give each segment behavior: `layout.tsx` wraps its children, `loading.tsx` shows a fallback while data streams, `error.tsx` catches render errors, and `not-found.tsx` handles missing resources.
Server components are the default
Components in the App Router run on the server unless you opt into the client with `"use client"`. Server components can query your database directly, keep secrets out of the bundle, and ship zero JavaScript for static content. Reach for client components only when you need state, effects, or browser APIs.
Data fetching without an API layer
- Call your database or an async function directly inside a server component — no `useEffect`, no loading spinner boilerplate.
- Use `fetch` with Next.js caching options to control revalidation per request.
- Use server actions for mutations (form submissions, likes, comments) without writing a REST endpoint.
Streaming and Suspense
Wrap slow data in `<Suspense>` and Next.js streams the rest of the page immediately, filling in the slow part when it's ready. Combined with `loading.tsx`, this gives users a fast first paint even when part of the page is expensive to render.
Route handlers for real APIs
When you genuinely need an HTTP endpoint — a webhook, a file download, a third-party callback — add a `route.ts` file. It replaces the old `pages/api` directory with a cleaner, standards-based Request/Response API.
Every KitCraft template is built on the Next.js 15 App Router, so you get these patterns wired up correctly from day one — layouts, server actions, and route handlers included.
