A complete collection of 36 production-ready cursor rules for building modern web applications. These rules are written in MDC format with proper metadata headers and auto-attachment patterns to enhance your development experience in Cursor.
This repository contains comprehensive cursor rules covering the complete modern web development stack, from core development practices to frontend frameworks, backend services, databases, authentication, payments, and more.
_meta-guide.mdc- Guide for writing effective cursor rules with proper structuredirect-tone.mdc- Communication style for direct, efficient AI responsesauto-commit.mdc- Git commit conventions and best practices
typescript.mdc- Strict TypeScript configuration, advanced patterns, and utility typesnextjs.mdc- Next.js App Router, Server Components, API routes, and performance optimizationreact.mdc- Modern React patterns, hooks, context, and performance optimization
tailwind.mdc- Utility-first CSS framework with responsive design patternsshadcn.mdc- Component library with theming and accessibilityframer-motion.mdc- Animation library with gestures, transitions, and performance
react-hook-form.mdc- Form handling with validation and performance optimizationzod-v4.mdc- Modern Zod v4 schema validation with type inference
tanstack-query.mdc- Data synchronization, caching, and mutationssupabase.mdc- Backend-as-a-service with real-time features and authentication
drizzle.mdc- Type-safe SQL ORM with migrations and advanced queries
clerk.mdc- Complete authentication solution with organizations and webhooksbetter-auth.mdc- Modern authentication with session management
inngest.mdc- Event-driven functions and background jobstrigger.mdc- Workflow automation and job processingcloudflare-workers.mdc- Edge computing with KV, D1, and R2 storage
tinybird.mdc- Real-time analytics with ClickHouse and API endpoints
stripe.mdc- Payment processing, subscriptions, webhooks, and marketplace features
mcps.mdc- Model Context Protocols for enhanced AI development
api-design.mdc- RESTful API design standards and best practicestesting-strategy.mdc- Comprehensive testing practices (unit, integration, E2E)dependency-injection.mdc- DI patterns and IoC container usagenaming-conventions.mdc- Consistent naming for variables, functions, classesimport-ordering.mdc- Standards for organizing import statementscomment-style.mdc- Code commenting and documentation practiceserror-messages.mdc- Guidelines for clear, actionable error messagesasync-error-handling.mdc- Best practices for async/await error handling
security.mdc- Web application security best practices and OWASP guidelinesperformance.mdc- Performance optimization for fast, efficient applications
accessibility.mdc- Web accessibility (a11y) best practices and WCAG complianceseo.mdc- SEO optimization for Next.js applications
project-structure.mdc- File organization and project structure patternsenvironment-management.mdc- Environment configuration and secrets management
- Clone this repository to your project root
- Copy the
.cursor/rules/directory to your project - The rules will automatically attach based on file patterns
git clone https://github.com/jesseoue/cursor-rules.git
cd your-project
cp -r ../cursor-rules/.cursor .- Direct Tone - Always active for efficient communication
- TypeScript - Always included for type safety
Most rules auto-attach based on file patterns:
- React components (
.tsx,.jsx) - API routes (
/api/**,/routes/**) - Database schemas (
schema.ts,drizzle.config.ts) - Test files (
*.test.ts,*.spec.ts) - Configuration files (
tailwind.config.js, etc.)
- Testing Strategy - Activates in test files and test directories
- API Design - Activates in API route files
- Zod v4 - Activates in TypeScript files for validation
- Battle-tested patterns and best practices
- Security considerations and error handling
- Performance optimization guidelines
- Modern framework versions and patterns
- Full TypeScript support with proper type definitions
- Zod v4 schema validation patterns
- Type-safe database operations
- Latest Next.js App Router patterns
- 36 specialized rules covering all aspects of development
- Code quality and architecture guidelines
- Security, performance, and accessibility standards
- Testing strategies from unit to E2E
- SEO optimization and project organization
- API design and error handling standards
- Enhanced autocomplete and intelligent suggestions
- Consistent patterns and clean architecture
- Direct communication style for efficient AI assistance
- Proper rule organization and discovery
Includes a complete package.json.template with all necessary dependencies:
- Frameworks: Next.js, React, TypeScript
- Styling: Tailwind CSS, Shadcn/ui, Framer Motion
- Forms: React Hook Form, Zod v4 validation
- Data: Tanstack Query, Drizzle ORM, Supabase
- Auth: Clerk, Better Auth
- Payments: Stripe
- Backend: Inngest, Trigger.dev, Cloudflare Workers
- Analytics: Tinybird
- Development: ESLint, Prettier, Testing frameworks
- Performance: Optimization patterns for React, Next.js, and animations
- Security: Authentication, authorization, and data validation
- Accessibility: ARIA attributes, keyboard navigation, and screen readers
- Testing: Comprehensive testing strategies and utilities
- Error Handling: Clear error messages and async error patterns
- Code Quality: Naming conventions, import ordering, and documentation
- Architecture: Dependency injection and API design patterns
- Comprehensive Coverage - 36 rules covering every aspect of modern web development
- Production Tested - Patterns used in real-world applications
- Performance Focused - Optimization best practices throughout
- Developer Experience - Enhanced autocomplete and intelligent suggestions
- Modern & Updated - Latest framework versions and current best practices
- Quality Focused - Code quality, testing, and architecture guidelines
Use the included _meta-guide.mdc for guidelines on writing effective cursor rules:
- Simple XML structure for LLM optimization
- Proper frontmatter with descriptions and file patterns
- Focus on essential requirements without over-structuring
- Clear examples and practical guidance
Feel free to submit issues and enhancement requests! These rules are designed to evolve with the modern web development landscape.
MIT License - feel free to use these rules in your projects!
Happy coding with enhanced AI assistance! π