Rule

0 installs · 0 said it worked

PatrickJS@patrickjs·
CodingRule· for Cursor

Cursor rules guiding Next.js and TypeScript app development

Cursor rule file with Next.js App Router, TypeScript and Tailwind best practices for structure, components, performance, data fetching, routing, forms and state.

People use this for

  • nextjs typescript cursor rules
  • app router best practices
  • nextjs tailwind project structure
  • typescript nextjs coding standards
  • build nextjs app with typescript and zod forms
Name
cursor-rules-guiding-nextjs-and-typescript-app-development
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/cursor-rules-guiding-nextjs-and-typescript-app-development-9zr6/export/mdc" -o .cursor/rules/cursor-rules-guiding-nextjs-and-typescript-app-development.mdc

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

Download cursor-rules-guiding-nextjs-and-typescript-app-development.mdc
Manual install

Save cursor-rules-guiding-nextjs-and-typescript-app-development.mdc as .cursor/rules/cursor-rules-guiding-nextjs-and-typescript-app-development.mdc for this project or ~/.cursor/rules/cursor-rules-guiding-nextjs-and-typescript-app-development.mdc for every project, then start a new session.

Rule


description: "Next.js with TypeScript and Tailwind UI best practices" globs: /*.tsx, /*.ts, src//*.ts, src//*.tsx alwaysApply: false

Next.js Best Practices

Project Structure

  • Use the App Router directory structure
  • Place components in app directory for route-specific components
  • Place shared components in components directory
  • Place utilities and helpers in lib directory
  • Use lowercase with dashes for directories (e.g., components/auth-wizard)

Components

  • Use Server Components by default
  • Mark client components explicitly with 'use client'
  • Wrap client components in Suspense with fallback
  • Use dynamic loading for non-critical components
  • Implement proper error boundaries
  • Place static content and interfaces at file end

Performance

  • Optimize images: Use WebP format, size data, lazy loading
  • Minimize use of 'useEffect' and 'setState'
  • Favor Server Components (RSC) where possible
  • Use dynamic loading for non-critical components
  • Implement proper caching strategies

Data Fetching

  • Use Server Components for data fetching when possible
  • Implement proper error handling for data fetching
  • Use appropriate caching strategies
  • Handle loading and error states appropriately

Routing

  • Use the App Router conventions
  • Implement proper loading and error states for routes
  • Use dynamic routes appropriately
  • Handle parallel routes when needed

Forms and Validation

  • Use Zod for form validation
  • Implement proper server-side validation
  • Handle form errors appropriately
  • Show loading states during form submission

State Management

  • Minimize client-side state
  • Use React Context sparingly
  • Prefer server state when possible
  • Implement proper loading states

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.