# Next.js App Router & Server Components

> Production guidelines for Next.js App Router including nested layouts, streaming SSR, parallel routes, Server Actions, and Core Web Vitals optimization.

Canonical: https://www.agentickit.co/skills/next-app-router
Last updated: 2026-11-18

## Key practices
- Keep server-only code (DB queries, API secrets) strictly in Server Components
- Use Server Actions for mutations with useActionState and optimistic updates
- Implement granular Suspense boundaries around slow data fetching streams
- Avoid large client bundles by pushing interactivity to the leaves of the component tree

## Related
- [react-specialist](https://www.agentickit.co/agents/react-specialist)
- [tech-lead](https://www.agentickit.co/agents/tech-lead)
- [design-engineer](https://www.agentickit.co/agents/design-engineer)
- [/build-page](https://www.agentickit.co/commands/build-page)
- [/ship](https://www.agentickit.co/commands/ship)
