ClaudeNext.jsArchitecture

Next.js Claude Rules

Claude rules for Next.js App Router: streaming, server actions, caching, and production deployment patterns.

CLAUDE.md
- Use Server Components by default; add 'use client' boundary only when necessary
- Stream responses with Suspense boundaries for improved perceived performance
- Use server actions with useFormState for progressive enhancement
- Implement optimistic updates with useOptimistic for instant UI feedback
- Use next/font for zero-layout-shift font loading
- Add structured data (JSON-LD) to all content pages for SEO
- Use parallel routes and intercepting routes for advanced UI patterns
- Monitor Core Web Vitals with @vercel/analytics or custom RUM

How to use with Claude

Create a `CLAUDE.md` file in your project root. Claude Code reads this on startup and follows your conventions throughout the session.

#nextjs#claude#app-router#server-actions#coding-rules

Related Rules