Skip to content
Guest
← All References
Next.js Next.js 15+

Next.js App Router Quick Reference

Essential Next.js App Router file conventions, Server vs Client boundaries, Route Handlers, Server Actions, caching, and standalone deployment.

app/[slug]/page.tsx + 'use server' + revalidatePath()

App Router File Conventions

FileRole
app/layout.tsxShared persistent layout wrapping child routes
app/page.tsxUnique UI rendered for a route segment
app/loading.tsxAutomatic React Suspense loading skeleton
app/error.tsxClient-side Error Boundary ('use client') with reset()
app/not-found.tsxCustom 404 UI triggered by notFound()
app/api/.../route.tsWeb-standard REST Route Handler (GET, POST, PUT, DELETE)
middleware.tsRequest-time redirects, headers, and cookie checks
output: 'standalone'Minimal self-contained Node server build for Docker / VPS

Search courses, lessons, and references

Type to search across all courses, lessons, and quick references.

Press Esc to close Powered by Pagefind