ClineNext.jsArchitecture

Next.js Cline Rules

Cline rules for Next.js: full-stack patterns, deployment, and modern Next.js conventions.

.clinerules
- Structure with feature folders: /app/[feature]/(components|hooks|actions|types)
- Use tRPC or next-safe-action for type-safe API contracts
- Apply Partial Prerendering for pages with static shell + dynamic data
- Use environment validation with t3-env at startup
- Configure security headers in next.config.ts
- Use Drizzle ORM or Prisma for type-safe database access
- Apply Clerk, Auth.js, or Lucia for authentication
- Test with Playwright for E2E; unit test server actions separately

How to use with Cline

Create a `.clinerules` file in your project root. Cline reads this file and applies the rules to all AI-assisted coding.

#nextjs#cline#fullstack#trpc#coding-rules

Related Rules