Next.js 16 Expert
Production-ready React framework with Server Components, streaming, and Turbopack.
Agent Workflow (MANDATORY)
Before ANY implementation, use TeamCreate to spawn 3 agents:
- fuse-ai-pilot:explore-codebase - Analyze existing routes, components, and patterns
- fuse-ai-pilot:research-expert - Verify latest Next.js 16 docs via Context7/Exa
- mcp__context7__query-docs - Check breaking changes v15→v16
After implementation, run fuse-ai-pilot:sniper for validation.
Overview
When to Use
- Building new React applications with server-first architecture
- Need Server Components for optimal performance and SEO
- Implementing streaming and progressive rendering
- Migrating from Next.js 14/15 to version 16
- Using proxy.ts for route protection (replaces middleware)
- Leveraging Turbopack for faster development builds
Why Next.js 16
| Feature |
Benefit |
| Turbopack default |
2-5x faster builds, 10x faster HMR, Webpack deprecated |
| Cache Components |
Explicit caching with use cache directive |
| proxy.ts |
Full Node.js runtime, replaces Edge middleware |
| React Compiler |
Automatic memoization, no manual useMemo/useCallback |
| React 19 |
View Transitions, useEffectEvent, Activity component |
| App Router |
Nested layouts, parallel routes, intercepting routes |
Breaking Changes from v15
Critical Migration Points
- proxy.ts replaces middleware.ts - Full Node.js runtime, not Edge
- Turbopack ONLY - Webpack completely deprecated and removed
use cache directive - Replaces Partial Prerendering (PPR)
- React 19 required - New hooks and View Transitions API
- Async params/searchParams - Must await dynamic route params
SOLID Architecture
Module-Based Structure
Pages are thin entry points importing from feature modules:
app/page.tsx → imports from modules/public/home/
app/dashboard/page.tsx → imports from modules/auth/dashboard/
modules/cores/ → Shared services, utilities, configurations
File Conventions
- page.tsx - Route UI component
- layout.tsx - Shared UI wrapper
- loading.tsx - Suspense loading state
- error.tsx - Error boundary
- not-found.tsx - 404 handling
Core Concepts
Server Components (Default)
All components are Server Components by default. Use 'use client' directive only when needed for interactivity, hooks, or browser APIs.
Caching Strategy
use cache - Mark async functions for caching
cacheTag() - Tag cached data for targeted revalidation
cacheLife() - Control cache duration (stale, revalidate, expire)
revalidateTag() - Invalidate cached data on-demand
Data Fetching
Server Components fetch data directly. Use fetch() with native caching or database queries. No need for getServerSideProps or getStaticProps.
Reference Guide
| Need |
Reference |
| Initial setup |
installation.md, project-structure.md |
| Migration v15→v16 |
upgrade.md, middleware-migration.md |
| Routing |
app-router.md, routing-advanced.md |
| Caching |
caching.md, cache-components.md |
| Server Components |
server-components.md, directives.md |
| React 19 features |
react-19.md, react-compiler.md |
| Route protection |
proxy.md, security.md |
| SEO/Metadata |
metadata.md, metadata-files.md |
| Forms/Actions |
forms.md, data-fetching.md |
| Deployment |
deployment.md, environment.md |
Best Practices
- Server Components first - Only add
'use client' when necessary
- Colocate data fetching - Fetch data where it's used
- Streaming with Suspense - Wrap slow components in Suspense
- proxy.ts over middleware - Full Node.js runtime for auth
- Cache explicitly - Use
use cache for expensive operations
- Parallel routes - Load independent UI sections simultaneously
Performance
Build Optimization
- Turbopack - Incremental compilation, instant HMR
- React Compiler - Automatic memoization
- Tree shaking - Unused code elimination
- Code splitting - Automatic route-based splitting
Runtime Optimization
- Streaming - Progressive HTML rendering
- Partial hydration - Only hydrate interactive components
- Image optimization - Automatic WebP/AVIF conversion
- Font optimization - Zero layout shift with next/font
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: nextjs-163description: Expert Next.js 16 with Turbopack, App Router, Cache Components, proxy.ts, React 19. Use when building Next.js apps, routing, caching, server components, or migrating from v15. Use when this capability is needed.4---56# Next.js 16 Expert78Production-ready React framework with Server Components, streaming, and Turbopack.910## Agent Workflow (MANDATORY)1112Before ANY implementation, use `TeamCreate` to spawn 3 agents:13141. **fuse-ai-pilot:explore-codebase** - Analyze existing routes, components, and patterns152. **fuse-ai-pilot:research-expert** - Verify latest Next.js 16 docs via Context7/Exa163. **mcp__context7__query-docs** - Check breaking changes v15→v161718After implementation, run **fuse-ai-pilot:sniper** for validation.1920---2122## Overview2324### When to Use2526- Building new React applications with server-first architecture27- Need Server Components for optimal performance and SEO28- Implementing streaming and progressive rendering29- Migrating from Next.js 14/15 to version 1630- Using proxy.ts for route protection (replaces middleware)31- Leveraging Turbopack for faster development builds3233### Why Next.js 163435| Feature | Benefit |36|---------|---------|37| Turbopack default | 2-5x faster builds, 10x faster HMR, Webpack deprecated |38| Cache Components | Explicit caching with `use cache` directive |39| proxy.ts | Full Node.js runtime, replaces Edge middleware |40| React Compiler | Automatic memoization, no manual useMemo/useCallback |41| React 19 | View Transitions, useEffectEvent, Activity component |42| App Router | Nested layouts, parallel routes, intercepting routes |4344---4546## Breaking Changes from v154748### Critical Migration Points49501. **proxy.ts replaces middleware.ts** - Full Node.js runtime, not Edge512. **Turbopack ONLY** - Webpack completely deprecated and removed523. **`use cache` directive** - Replaces Partial Prerendering (PPR)534. **React 19 required** - New hooks and View Transitions API545. **Async params/searchParams** - Must await dynamic route params5556---5758## SOLID Architecture5960### Module-Based Structure6162Pages are thin entry points importing from feature modules:6364- `app/page.tsx` → imports from `modules/public/home/`65- `app/dashboard/page.tsx` → imports from `modules/auth/dashboard/`66- `modules/cores/` → Shared services, utilities, configurations6768### File Conventions6970- **page.tsx** - Route UI component71- **layout.tsx** - Shared UI wrapper72- **loading.tsx** - Suspense loading state73- **error.tsx** - Error boundary74- **not-found.tsx** - 404 handling7576---7778## Core Concepts7980### Server Components (Default)8182All components are Server Components by default. Use `'use client'` directive only when needed for interactivity, hooks, or browser APIs.8384### Caching Strategy8586- **`use cache`** - Mark async functions for caching87- **`cacheTag()`** - Tag cached data for targeted revalidation88- **`cacheLife()`** - Control cache duration (stale, revalidate, expire)89- **`revalidateTag()`** - Invalidate cached data on-demand9091### Data Fetching9293Server Components fetch data directly. Use `fetch()` with native caching or database queries. No need for `getServerSideProps` or `getStaticProps`.9495---9697## Reference Guide9899| Need | Reference |100|------|-----------|101| Initial setup | [installation.md](references/installation.md), [project-structure.md](references/project-structure.md) |102| Migration v15→v16 | [upgrade.md](references/upgrade.md), [middleware-migration.md](references/middleware-migration.md) |103| Routing | [app-router.md](references/app-router.md), [routing-advanced.md](references/routing-advanced.md) |104| Caching | [caching.md](references/caching.md), [cache-components.md](references/cache-components.md) |105| Server Components | [server-components.md](references/server-components.md), [directives.md](references/directives.md) |106| React 19 features | [react-19.md](references/react-19.md), [react-compiler.md](references/react-compiler.md) |107| Route protection | [proxy.md](references/proxy.md), [security.md](references/security.md) |108| SEO/Metadata | [metadata.md](references/metadata.md), [metadata-files.md](references/metadata-files.md) |109| Forms/Actions | [forms.md](references/forms.md), [data-fetching.md](references/data-fetching.md) |110| Deployment | [deployment.md](references/deployment.md), [environment.md](references/environment.md) |111112---113114## Best Practices1151161. **Server Components first** - Only add `'use client'` when necessary1172. **Colocate data fetching** - Fetch data where it's used1183. **Streaming with Suspense** - Wrap slow components in Suspense1194. **proxy.ts over middleware** - Full Node.js runtime for auth1205. **Cache explicitly** - Use `use cache` for expensive operations1216. **Parallel routes** - Load independent UI sections simultaneously122123---124125## Performance126127### Build Optimization128129- **Turbopack** - Incremental compilation, instant HMR130- **React Compiler** - Automatic memoization131- **Tree shaking** - Unused code elimination132- **Code splitting** - Automatic route-based splitting133134### Runtime Optimization135136- **Streaming** - Progressive HTML rendering137- **Partial hydration** - Only hydrate interactive components138- **Image optimization** - Automatic WebP/AVIF conversion139- **Font optimization** - Zero layout shift with next/font140141---142> Converted and distributed by [TomeVault](https://tomevault.io/claim/fusengine) — claim your Tome and manage your conversions.143<!-- tomevault:4.0:skill_md:2026-04-13 -->