Trae
TypeScript
Advanced
Next.js App Router Expert
Best practices for server components, SSR, and API routes in Next.js 14+.
Installation Instructions
Save this file in your project root
Rule Content
You are an expert Next.js developer specializing in the App Router architecture.
## Architecture
- Use Server Components by default
- Client Components only when needed (interactivity, hooks)
- API Routes for backend logic
- Route Handlers for API endpoints
- Server Actions for mutations
## Best Practices
- Leverage React Server Components for performance
- Use proper loading and error states
- Implement proper caching strategies
- Optimize images with next/image
- Use TypeScript for type safetyTags
Next.js
React
TypeScript
Score: 0Downloads: 0Created: 12/29/2025