just.another.template

This template includes a comprehensive set of Cursor rules to enhance your development experience with AI assistance.

What are Cursor Rules?

Cursor Rules are specialized knowledge files that guide Cursor's AI assistant in understanding your codebase and generating code that follows your project's conventions and best practices.

These rules help the AI provide more contextually appropriate suggestions, maintain consistency across your codebase, and implement patterns that align with modern development standards.

Included Rules

nextjs.mdc

Best practices for Next.js with the App Router architecture

ui.mdc

UI Component Guidelines for consistent and accessible interfaces

storage.mdc

File Storage & S3 compatible API implementation patterns

drizzle.mdc

Database Schema & Migration patterns with Drizzle ORM

docker.mdc

Container Configuration for local development and production

typescript.mdc

TypeScript Patterns & Configuration best practices

stripe.mdc

Stripe Integration patterns for payments and subscriptions

Rule Structure

Each Cursor rule file (.mdc) contains guidelines and code examples that help the AI understand how to work with specific technologies or patterns in your project.

# Example Cursor Rule Structure

You are an expert in TypeScript, Node.js, Next.js App Router, React, Shadcn UI, Radix UI and Tailwind.
  
Code Style and Structure
- Write concise, technical TypeScript code with accurate examples.
- Use functional and declarative programming patterns; avoid classes.
- Prefer iteration and modularization over code duplication.
- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
- Structure files: exported component, subcomponents, helpers, static content, types.
  
Naming Conventions
- Use lowercase with dashes for directories (e.g., components/auth-wizard).
- Favor named exports for components.
  
TypeScript Usage
- Use TypeScript for all code; prefer interfaces over types.
- Avoid enums; use maps instead.
- Use functional components with TypeScript interfaces.

Using Cursor Rules

To use Cursor rules in your development workflow:

  1. Install Cursor: Make sure you have the latest version of Cursor installed from cursor.sh
  2. Open the project: Open this template in Cursor IDE
  3. AI Assistance: Use Cmd+K or Ctrl+K to open the AI command palette
  4. Ask questions: The AI will use the rules to provide tailored responses for this specific codebase

Creating Custom Rules

You can create your own custom rules to help Cursor AI better understand your project structure and coding standards:

  1. Create a new .mdc file in the .cursor/rules/ directory
  2. Write your rules using the Markdown format, providing clear guidelines and examples
  3. Focus on specific aspects of your codebase that would benefit from AI assistance
  4. Include examples of both good and bad patterns to help the AI understand your preferences

Benefits

  • Faster Development: Leverage AI to write code that follows your established patterns
  • Consistency: Maintain consistent code style and architecture across your project
  • Onboarding: Help new team members understand your codebase faster with AI-assisted guidance
  • Knowledge Transfer: Codify best practices and patterns in a way that can be easily referenced and applied
  • Reduced Mental Load: Let the AI handle boilerplate while you focus on solving the core problems