Rule
0 installs · 0 said it worked
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 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.mdcThen open a new session; Cursor picks it up from .cursor/rules/.
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
appdirectory for route-specific components - Place shared components in
componentsdirectory - Place utilities and helpers in
libdirectory - 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.
Related rules
- Generate Next.js 14 and Tailwind components from design screenshots
A Cursor rules system prompt that turns design screenshots into TypeScript Next.js 14 App Router code styled with Tailwind CSS, covering components, data fetching, metadata, and error handling conventions.
Coding · @patrickjs
- Master prompt for building a district campaign field operations platform
A long master development prompt asking an AI to build a full-stack government district campaign management, field data collection, verification, and payment platform.
Coding · @maarifkhatri91
- Context7 agent that answers library questions from up-to-date docs
Agent instructions that force lookup of current library documentation via Context7 before answering framework or package questions, and check workspace versions for upgrades.
Coding · @joembolinas
- Universal agent rules for building React and Next.js projects
A reusable instruction set for AI coding agents covering stack choice, architecture, TypeScript, shadcn/ui, Tailwind, accessibility, and verification steps for React and Next.js projects.
Coding · @ramazanyusupov
- Cursor rules for building type-safe TanStack Router apps in React
Cursor rules that guide the AI to write TanStack Router v1 code in React and TypeScript, covering file-based routing, typed params, Zod search validation, loaders, auth guards, and preloading.
Coding · @patrickjs
License: CC0v1 · published Nov 29, 2026
Comments
No comments yet. If you tried this prompt, say how it went.