Next.js App Router Page
Create a new App Router route with Server Components by default and explicit route boundaries.
When to Use
- •New pages under
app/ - •Server-first rendering with partial hydration
- •Routes requiring metadata and loading/error UX
Inputs
- •Route segment path (e.g.
app/dashboard) - •Data needs (static/ISR/dynamic)
- •Client interactivity requirements
- •Metadata requirements (title/description/OG)
Instructions
- •Create
page.tsxin the route segment. - •Default to a Server Component (no
"use client"). - •Add
loading.tsx,error.tsx, andnot-found.tsxper segment. - •Use
fetchwith explicit caching (no-storeorrevalidate). - •Add
generateMetadataormetadatafor SEO. - •Add
Route Segment Config(runtime, revalidate) when needed. - •Split interactivity into leaf Client Components.
Output
- •App Router files in the target segment with server-first patterns.
- •Explicit data and caching strategy for the route.