Rule

0 installs · 0 said it worked

PatrickJS@patrickjs·
CodingRule· for Cursor

Next.js App Router coding rules for Cursor

Cursor rules file guiding the AI to follow Next.js App Router best practices, folder structure, and conventions when writing code in a project.

People use this for

  • nextjs app router cursor rules
  • nextjs project coding conventions
  • write nextjs app router code
  • cursorrules for nextjs server components
  • set up nextjs folder structure for an app router project
Name
nextjs-app-router-coding-rules-for-cursor
Works with
Cursor
License
CC0(as observed at the source)
Version
v1 · updated Nov 29, 2026
Imported · UnclaimedCC0

Imported on Nov 29, 2026 from github.com . License observed at the source on Nov 29, 2026: CC0.

Are you the author?Claim this profileRequest removal

Use this rule

$ curl -fsSL "https://promptcommunity.dev/api/v1/posts/nextjs-app-router-coding-rules-for-cursor-b3u2/export/mdc" -o .cursor/rules/nextjs-app-router-coding-rules-for-cursor.mdc

Then open a new session; Cursor picks it up from .cursor/rules/.

Download nextjs-app-router-coding-rules-for-cursor.mdc
Manual install

Save nextjs-app-router-coding-rules-for-cursor.mdc as .cursor/rules/nextjs-app-router-coding-rules-for-cursor.mdc for this project or ~/.cursor/rules/nextjs-app-router-coding-rules-for-cursor.mdc for every project, then start a new session.

Rule


description: "Cursor rules for Next.js development with App Router integration." globs: */ alwaysApply: false

// Next.js App Router .cursorrules

// Next.js App Router best practices

const nextjsAppRouterBestPractices = [ "Use server components by default", "Implement client components only when necessary", "Utilize the new file-based routing system", "Use layout.js for shared layouts", "Implement loading.js for loading states", "Use error.js for error handling", "Utilize route handlers for API routes", ];

// Folder structure

const folderStructure = app/ layout.js page.js components/ lib/ styles/ public/;

// Additional instructions

const additionalInstructions = `

  1. Use TypeScript for type safety
  2. Implement proper metadata for SEO
  3. Utilize Next.js Image component for optimized images
  4. Use CSS Modules or Tailwind CSS for styling
  5. Implement proper error boundaries
  6. Follow Next.js naming conventions for special files
  7. Use environment variables for configuration `;

No result recorded yet. Added it? File a Tried-it report so the next person knows how it went in your editor.

Tried it

Reports from people who added this rule to their editor. They roll up into the badges above.

No one has filed a report yet. Try the prompt and be the first.

License: CC0v1 · published Nov 29, 2026

Comments

No comments yet. If you tried this prompt, say how it went.