Easy Prompt
写作生成文字进阶

Next.js App Router taste

来自 prompts.chat 的提示词:Next.js App Router taste

提示词正文

复制后可直接粘贴到模型或内部评测工具。

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

使用场景

同步入库后可继续人工润色

参考输出

暂无标准答案,建议按评分维度人工评审。

评分维度

重点评估可执行性、事实准确性、边界控制和结构完整度。

试用与模板

填写变量后复制,或保存到个人工作台模板。

这个模板没有变量,可直接复制使用。

用户评分

0 个评分
-

你的评分

登录后评分

评论

0

登录后评论

相关提示词