What problem does it solve?
Next.js App Router introduces complex conventions around server vs client components, data fetching, middleware, and route handlers. This Skill provides a practical blueprint to structure app/, leverage server actions, metadata, and route handlers with consistent patterns. It acts as a companion to react-dev and react-best-practices to align architectural decisions.
Core Features & Use Cases
- Clear directory conventions for app/, including layout.tsx, page.tsx, loading.tsx, error.tsx, not-found.tsx, and route groups.
- Guidance on server vs client components and the decision tree to ensure server components by default and client behavior only where needed.
- Middleware, data fetching, server actions, and route handlers patterns to produce robust, scalable Next.js apps.
- Use Case: Standardize a multi-route dashboard with nested layouts and API routes.
Quick Start
To apply these conventions, create or adapt your Next.js project to the app/ directory and implement the patterns shown for layouts, pages, and route handlers.