AcademyRulesDevelopment

Next.js App Router rules for Cursor

Web development teams building Next.js sites with the App Router.

  • Recommendedour rating
  • 40,892repository stars
  • CC0-1.0licence
  • 4 months agolast update
mkdir -p .cursor/rules && curl -fsSL https://raw.githubusercontent.com/PatrickJS/awesome-cursorrules/main/rules/nextjs-app-router-cursorrules-prompt-file.mdc -o .cursor/rules/nextjs-app-router.mdc
nextjs-app-router.mdc

Loading the file...

What it does

A short rules file for Cursor with best practices for the Next.js App Router. It favours server components by default, uses client components only when needed, and covers layouts, loading and error files, route handlers, metadata for SEO and image optimisation.

Use cases

  1. 01Structure pages with shared layouts and loading states
  2. 02Add error handling with error.js files
  3. 03Create route handlers for API endpoints

Questions about
Next.js App Router rules for Cursor.

What is Next.js App Router rules for Cursor used for?

Web development teams building Next.js sites with the App Router. A short rules file for Cursor with best practices for the Next.js App Router. It favours server components by default, uses client components only when needed, and covers layouts, loading and error files, route handlers, metadata for SEO and image optimisation.

How do I install Next.js App Router rules for Cursor?

Run this in your terminal: mkdir -p .cursor/rules && curl -fsSL https://raw.githubusercontent.com/PatrickJS/awesome-cursorrules/main/rules/nextjs-app-router-cursorrules-prompt-file.mdc -o .cursor/rules/nextjs-app-router.mdc

Is Next.js App Router rules for Cursor open source?

Yes. The code is on GitHub (PatrickJS/awesome-cursorrules) under the CC0-1.0 licence.

Is Next.js App Router rules for Cursor safe to use?

It passed our automatic scan for credential theft, hidden instructions and risky install commands. Third party open source software. Sabemos AI does not maintain it. Check the code and permissions before you connect it to company data.