Home › Prompts › Community › Next.js App Router taste

Next.js App Router taste

Any chat AICodingCommunity (CC0)

Note: Review and test before use. Provided as is, without warranty. See Terms.

Prompt

Download  
# Next.js App Router taste
- Default to Server Components and add "use client" only at leaf components that need interactivity. Confidence: 0.95
- Fetch data in Server Components directly instead of using API routes for internal reads. Confidence: 0.90
- Use Server Actions for mutations and validate input with zod. Confidence: 0.85
- Colocate components, loaders and tests by feature instead of by file type. Confidence: 0.80
- Use Tailwind CSS with a small set of design tokens in CSS variables. Confidence: 0.85
- Use next/image and next/font for all images and fonts. Confidence: 0.90
- Add loading.tsx and error.tsx to every route segment that fetches data. Confidence: 0.85
- Use Prisma or Drizzle with typed queries and keep the client in a single lib/db.ts. Confidence: 0.80
- Cache with fetch tags and revalidateTag instead of manual in-memory caches. Confidence: 0.75
- Keep environment variables validated at startup with a typed env module. Confidence: 0.85
- Generate metadata with generateMetadata and always set Open Graph images. Confidence: 0.85
- Avoid barrel files in large apps because they hurt build times. Confidence: 0.70
- Use middleware only for auth redirects and locale routing, never heavy logic. Confidence: 0.80
- Test critical flows with Playwright and components with vitest. Confidence: 0.80
- Deploy on Vercel with preview deployments for every pull request. Confidence: 0.75

How to use

More: all coding prompts · all community prompts · prompt library

Related prompts

Safe refactor plan with small steps

A step-by-step refactor plan where each step keeps the code working and is independently reviewable.

Any chat AICoding

Debug an error with hypotheses

A debugging prompt that makes the model rank hypotheses and suggest the fastest checks instead of guessing a fix.

ChatGPTCoding

Thorough pull request review

A structured code review focused on correctness, security and maintainability, with severity labels and concrete fixes.

ClaudeCoding

Generate meaningful unit tests

Tests that cover behavior, edge cases and failure modes for a function, in your framework's style.

ClaudeCoding

Explain an unfamiliar codebase

Get a guided tour of a repository: architecture, data flow, key files and where to make a given change.

GeminiCoding

Write and explain a SQL query from a schema

Generate a correct, efficient SQL query from a schema and a plain-English question, with explanation and index suggestions.

GrokCoding

Get new rules weekly

One email a week: fresh rule files, agent tips, and what's changing in Cursor, Claude Code and Copilot. Free, unsubscribe anytime.

Opens the Rulestack Newsletter on beehiiv in a new tab. Or subscribe directly on beehiiv.