This has evolved into this:
https://github.com/smeubank/ai-pattern-garden
The bootstrap for cursor rules is still a good idea, but it will be much easier to maintain once the above project is more fleshed out.
A comprehensive template for configuring AI assistants in Cursor IDE with modern web development best practices.
This template provides a structured set of rules and guidelines for AI assistants working with modern web development projects. It includes coding standards, business logic patterns, feature development workflows, and comprehensive documentation organization.
Perfect for: TypeScript/Next.js projects, but adaptable to any modern web development stack.
This template uses Cursor's frontmatter configuration system to control when rules are applied:
These core rules are automatically loaded in every conversation:
guidelines.mdc- Core LLM persona and project guidelinescursor.mdc- Main project navigation and contextcoding-guidelines.mdc- TypeScript and Next.js coding standardscommon-patterns.mdc- Reusable code patterns and conventionsarchitecture.mdc- Project architecture and technology stackmonitoring.mdc- Error tracking and performance monitoring
These files are loaded on-demand when relevant:
feature-development.mdc- PRFAQ β PRD β GTM workflowbusiness-logic.mdc- Domain-specific business rulesllms/document-scopes.mdc- Documentation organization guidellms/documentation-style-guide.mdc- Writing standards
To modify which rules are always applied:
-
Edit frontmatter in any
.mdcfile:--- alwaysApply: true # Always load this file ---
or
--- title: [File Title] # Load on-demand only ---
-
Restart Cursor for changes to take effect
-
Consider context window - too many always-applied files may impact performance
-
Copy the template to your project:
# Option 1: Clone this repository git clone https://github.com/your-username/cursor-template.git cd cursor-template # Option 2: Download as ZIP and extract to your project
-
Customize for your project:
# Copy the .cursor directory to your project root cp -r .cursor /path/to/your/project/ -
Replace placeholder content:
- Update
[Your Project Name]with your actual project name - Replace
[Your Company]with your organization name - Update
[Your Name]in LICENSE file with your name - Customize technology stack references
- Update business logic examples with your domain
- Update
-
Configure rule loading (optional):
- Review
alwaysApplysettings in.cursor/rules/*.mdcfiles - Adjust based on your project size and context window preferences
- Review
-
Test with your AI assistant in Cursor IDE
.cursor/
βββ rules/ # Core AI assistant rules
β βββ README.md # Template overview and customization guide
β βββ coding-guidelines.md # TypeScript and framework standards
β βββ business-logic.md # Domain-specific business rules template
β βββ project-context.md # Project-specific information template
βββ project/ # Project organization and documentation
βββ README.md # Project documentation guide
βββ dir-name/ # Flexible documentation collection space
β βββ README.md # Organization instructions
βββ features/ # Feature development templates
βββ 001-template/ # PRFAQ β PRD β GTM β Implementation workflow
βββ PRFAQ.md # Problem definition and solution validation
βββ PRD.md # Product requirements document
βββ GTM.md # Go-to-market strategy
βββ IMPLEMENTATION.md # Technical implementation and PR description
Replace these placeholders throughout the files:
[Your Project Name]β Your actual project name[Your Company/Organization]β Your organization name[Your Backend Choice]β Your database/backend technology[Your UI Library]β Your component library choice[Your Monitoring Solution]β Your error tracking service
Update technology references in:
.cursor/rules/coding-guidelines.md- Framework and language standards.cursor/rules/project-context.md- Development environment and tools.cursor/rules/business-logic.md- Database and API patterns
Customize the business logic template:
- Replace generic examples with your domain-specific patterns
- Update validation schemas with your data structures
- Modify workflow examples to match your business processes
Use the feature development templates:
- Copy
001-template/to create new features:002-your-feature-name/ - Follow the PRFAQ β PRD β Implementation β GTM workflow
- Customize the templates with your specific processes
- TypeScript-first coding standards and patterns
- Next.js App Router best practices and conventions
- Database patterns with error handling and monitoring
- Component architecture guidelines for scalable UI
- Testing strategies for comprehensive coverage
- Performance optimization patterns and monitoring
- Security standards for web applications
- Accessibility compliance guidelines (WCAG 2.1 AA)
- Feature development structured workflow (PRFAQ β PRD β GTM)
- Code review guidelines and checklists
- Documentation standards for maintainable projects
- Error tracking and performance monitoring setup
- Deployment patterns and environment management
- Monorepo support with clear directory structures
- Documentation organization for complex projects
- Team collaboration guidelines and processes
- Quality assurance checklists and standards
- Framework: Next.js 14+ with App Router
- Language: TypeScript with strict configuration
- Database: Supabase (PostgreSQL)
- Styling: Tailwind CSS
- UI Library: ShadCN/UI
- Monitoring: Sentry
- Deployment: Vercel
- Frontend: React, Vue, Angular, Svelte
- Backend: Node.js, Python, Go, .NET
- Database: PostgreSQL, MySQL, MongoDB, Prisma
- Styling: CSS Modules, Styled Components, Emotion
- Deployment: AWS, GCP, Azure, Netlify
# Copy template
cp -r .cursor /path/to/saas-app/
# Customize for SaaS context
# - Update business logic for subscription management
# - Modify user roles and permissions
# - Add billing and payment processing patterns# Copy template
cp -r .cursor /path/to/ecommerce-site/
# Customize for e-commerce context
# - Update business logic for inventory management
# - Modify user flows for shopping and checkout
# - Add product catalog and order processing patterns# Copy template
cp -r .cursor /path/to/cms-project/
# Customize for CMS context
# - Update business logic for content workflows
# - Modify user roles for editors and admins
# - Add publishing and content approval patterns- Context-aware suggestions based on your project patterns
- Consistent coding standards enforcement
- Business logic validation and best practices
- Performance optimization recommendations
- Clear guidelines for every aspect of development
- Feature development workflow templates
- Project organization and team collaboration guides
- Quality assurance and testing strategies
- Patterns that grow with your project
- Monorepo organization support
- Modular component architecture
- Performance and monitoring built-in
We welcome contributions to improve this template!
- Fork the repository
- Create a feature branch:
git checkout -b feature/improvement-name - Make your changes (follow the existing documentation style)
- Test with your AI assistant to ensure functionality
- Submit a pull request with a clear description of improvements
- Additional technology stack templates
- More business domain examples
- Enhanced development workflow patterns
- Documentation improvements
- Bug fixes and optimizations
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by modern web development best practices
- Built for the Cursor IDE AI assistant ecosystem
- Thanks to the developer community for feedback and contributions
- Issues: Use GitHub issues for bug reports and feature requests
- Discussions: Use GitHub discussions for questions and community support
- Documentation: Check the
.cursor/rules/README.mdfor detailed customization instructions
Happy coding with AI assistance! π