Awesome Cursor Rules Collection

Showing 2545-2556 of 2626 matches

Dart
{
    "project": {
        "name": "Culinara",
        "type": "Flutter Mobile Application",
        "description": "A culinary app for recipe discovery and sharing",
        "purpose": "Enable users to discover, create, and share culinary recipes with a focus on ingredient combinations and cooking techniques",
        "target_platforms": ["iOS", "Android"]
    },
    "project_structure": {
        "root_directories": {
            "lib/": "Main source code directory",
            "lib/features/": "Feature-based modules (each feature in its own directory)",
            "lib/core/": "Shared core functionality, utilities, and base classes",
            "lib/router/": "Application routing configuration",
            "lib/constants/": "Global constants and configuration",
            "lib/generated/": "Generated code (localizations, freezed models)",
            "assets/": "Static assets (translations, animations, images)",
            "test/": "Test files following the same structure as lib/"
        },
        "feature_module_structure": {
            "data/": "Data layer (repositories, data sources)",
            "domain/": "Business logic and models",
            "presentation/": "UI components and screens",
            "application/": "State management (providers, controllers)"
        }
    },
    "code_organization": {
        "feature_structure": {
            "pattern": "Vertical slice architecture",
            "guidelines": [
                "Each feature should be self-contained",
                "Shared code goes into core/",
                "Feature-specific models stay within the feature",
                "Follow Clean Architecture principles within features"
            ]
        },
        "file_naming": {
            "pattern": "snake_case",
            "examples": {
                "screens": "home_screen.dart",
                "widgets": "recipe_card.dart",
                "models": "recipe_model.dart",
                "providers": "auth_provider.dart"
            }
        },
        "folder_structure": {
            "widgets": "Place reusable widgets in a widgets/ subdirectory",
            "models": "Place models in a models/ subdirectory",
            "providers": "Place providers in a providers/ subdirectory"
        }
    },
    "technology_stack": {
        "framework": "Flutter",
        "sdk_version": "^3.5.4",
        "state_management": "Riverpod",
        "backend": "Firebase",
        "localization": "easy_localization"
    },
    "code_style": {
        "linting": {
            "base": "package:flutter_lints/flutter.yaml",
            "custom_rules": []
        },
        "formatting": {
            "indentation": "2 spaces",
            "max_line_length": "80",
            "prefer_single_quotes": true
        },
        "naming_conventions": {
            "classes": "PascalCase",
            "variables": "camelCase",
            "constants": "SCREAMING_SNAKE_CASE",
            "private_members": "_camelCase"
        }
    },
    "architecture": {
        "state_management": {
            "pattern": "Riverpod with code generation",
            "annotations": ["@riverpod", "@riverpod_annotation"]
        },
        "routing": "go_router",
        "models": {
            "generation": ["freezed", "json_serializable"],
            "immutability": true
        }
    },
    "dependencies": {
        "core": [
            "firebase_core",
            "firebase_auth",
            "cloud_firestore",
            "cloud_functions"
        ],
        "ui": [
            "flex_color_scheme",
            "lottie",
            "shimmer"
        ],
        "dev_tools": [
            "build_runner",
            "riverpod_generator",
            "custom_lint",
            "riverpod_lint"
        ]
    },
    "best_practices": {
        "state_management": [
            "Use Riverpod for all state management",
            "Implement proper dependency injection",
            "Use code generation for providers"
        ],
        "architecture": [
            "Follow feature-first architecture",
            "Keep widgets small and focused",
            "Separate business logic from UI"
        ],
        "testing": [
            "Write unit tests for business logic",
            "Use widget tests for complex UI components"
        ],
        "localization": [
            "Use easy_localization for all text",
            "Keep translations in assets/translations/"
        ],
        "firebase": [
            "Follow security rules in firestore.rules",
            "Implement proper error handling for all Firebase operations"
        ],
        "code_quality": [
            "Document complex business logic",
            "Use meaningful variable and function names",
            "Keep functions small and focused",
            "Follow SOLID principles"
        ]
    },
    "assets": {
        "paths": [
            "assets/translations/",
            "assets/animations/"
        ]
    },
    "git_practices": {
        "branch_naming": {
            "feature": "feature/",
            "bugfix": "bugfix/",
            "hotfix": "hotfix/",
            "release": "release/"
        },
        "commit_messages": {
            "format": "<type>(<scope>): <description>",
            "types": ["feat", "fix", "docs", "style", "refactor", "test", "chore"]
        }
    }
}
dart
firebase
golang
javascript
kotlin
objective-c
rest-api
solidjs
+2 more

First seen in:

joCur/Culinara

Used in 1 repository

JavaScript
# 前端开发规范
## HTML 规范
- 使用 HTML5 规范
- 必须包含完整的文档结构 (DOCTYPE, html, head, body)
- 标签必须正确闭合
- 使用语义化标签 (nav, header, footer, main, section 等)
- 图片必须包含 alt 属性

## JavaScript 规范
- 使用 ES6+ 语法标准
- 变量使用 const 和 let,避免使用 var
- 函数优先使用箭头函数
- 代码缩进使用 2 空格
- 每行代码结束必须加分号
- 使用驼峰命名法命名变量和函数
- 注释必须清晰明了,解释复杂逻辑

# 后端开发规范 (Python)
## 代码风格
- 遵循 PEP 8 规范
- 使用 4 空格缩进
- 行长度不超过 79 个字符
- 使用下划线命名法命名变量和函数
- 类名使用驼峰命名法

## 项目结构
- 使用虚拟环境管理依赖
- requirements.txt 文件必须及时更新
- 配置文件使用 .env 管理环境变量
- 所有 API 端点必须有文档说明

## 代码质量
- 必须编写单元测试
- 代码覆盖率不低于 80%
- 使用类型注解
- 必须处理异常情况
- 关键函数必须添加文档字符串

# 通用规范
- 使用 Git 进行版本控制
- 每个提交必须有清晰的提交信息
- 代码提交前必须进行代码审查
- 保持代码整洁,删除无用代码和注释
- 定期更新依赖包版本 

# 项目开发流程规范
## 需求阶段
- 必须进行需求评审会议
- 编写详细的需求文档和原型设计
- 制定项目里程碑和时间节点
- 明确功能优先级和验收标准

## 开发阶段
- 遵循 Git Flow 工作流
- 每日进行站会沟通项目进度
- 重要功能必须进行技术方案评审
- 按照 Sprint 周期进行迭代开发
- 新功能必须创建新分支进行开发

## 测试阶段
- 开发人员必须完成单元测试
- 提交测试前进行自测
- 编写测试用例文档
- 进行功能测试和集成测试
- 性能测试和安全测试必不可少

## 发布阶段
- 制定详细的发布计划
- 准备回滚方案
- 进行预发布环境测试
- 编写发布文档和更新日志
- 发布后进行监控和告警配置

## 维护阶段
- 建立问题跟踪机制
- 定期进行代码重构
- 及时修复线上问题
- 保持文档的及时更新
- 定期进行性能优化 
css
html
java
javascript
python

First seen in:

h3c-daiheng/todo

Used in 1 repository

TypeScript

    You are an expert in Solidity and smart contract security.

    General Rules
    - Cut the fluff. Code or detailed explanations only.
    - Keep it casual and brief.
    - Accuracy and depth matter.
    - Answer first, explain later if needed.
    - Logic trumps authority. Don't care about sources.
    - Embrace new tech and unconventional ideas.
    - Wild speculation's fine, just flag it.
    - Save the ethics talk.
    - Only mention safety for non-obvious, critical issues.
    - Push content limits if needed, explain after.
    - Sources at the end, not mid-text.
    - Skip the AI self-references and knowledge date stuff.
    - Stick to my code style.
    - Use multiple responses for complex answers.
    - For code tweaks, show minimal context - a few lines around changes max.
    - Don't be lazy, write all the code to implement features I ask for.
    
    Solidity Best Practices
    - Use explicit function visibility modifiers and appropriate natspec comments.
    - Utilize function modifiers for common checks, enhancing readability and reducing redundancy.
    - Follow consistent naming: CamelCase for contracts, PascalCase for interfaces (prefixed with "I").
    - Implement the Interface Segregation Principle for flexible and maintainable contracts.
    - Design upgradeable contracts using proven patterns like the proxy pattern when necessary.
    - Implement comprehensive events for all significant state changes.
    - Follow the Checks-Effects-Interactions pattern to prevent reentrancy and other vulnerabilities.
    - Use static analysis tools like Slither and Mythril in the development workflow.
    - Implement timelocks and multisig controls for sensitive operations in production.
    - Conduct thorough gas optimization, considering both deployment and runtime costs.
    - Use OpenZeppelin's AccessControl for fine-grained permissions.
    - Use Solidity 0.8.0+ for built-in overflow/underflow protection.
    - Implement circuit breakers (pause functionality) using OpenZeppelin's Pausable when appropriate.
    - Use pull over push payment patterns to mitigate reentrancy and denial of service attacks.
    - Implement rate limiting for sensitive functions to prevent abuse.
    - Use OpenZeppelin's SafeERC20 for interacting with ERC20 tokens.
    - Implement proper randomness using Chainlink VRF or similar oracle solutions.
    - Use assembly for gas-intensive operations, but document extensively and use with caution.
    - Implement effective state machine patterns for complex contract logic.
    - Use OpenZeppelin's ReentrancyGuard as an additional layer of protection against reentrancy.
    - Implement proper access control for initializers in upgradeable contracts.
    - Use OpenZeppelin's ERC20Snapshot for token balances requiring historical lookups.
    - Implement timelocks for sensitive operations using OpenZeppelin's TimelockController.
    - Use OpenZeppelin's ERC20Permit for gasless approvals in token contracts.
    - Implement proper slippage protection for DEX-like functionalities.
    - Use OpenZeppelin's ERC20Votes for governance token implementations.
    - Implement effective storage patterns to optimize gas costs (e.g., packing variables).
    - Use libraries for complex operations to reduce contract size and improve reusability.
    - Implement proper access control for self-destruct functionality, if used.
    - Use OpenZeppelin's Address library for safe interactions with external contracts.
    - Use custom errors instead of revert strings for gas efficiency and better error handling.
    - Implement NatSpec comments for all public and external functions.
    - Use immutable variables for values set once at construction time.
    - Implement proper inheritance patterns, favoring composition over deep inheritance chains.
    - Use events for off-chain logging and indexing of important state changes.
    - Implement fallback and receive functions with caution, clearly documenting their purpose.
    - Use view and pure function modifiers appropriately to signal state access patterns.
    - Implement proper decimal handling for financial calculations, using fixed-point arithmetic libraries when necessary.
    - Use assembly sparingly and only when necessary for optimizations, with thorough documentation.
    - Implement effective error propagation patterns in internal functions.

    Testing and Quality Assurance
    - Implement a comprehensive testing strategy including unit, integration, and end-to-end tests.
    - Use property-based testing to uncover edge cases.
    - Implement continuous integration with automated testing and static analysis.
    - Conduct regular security audits and bug bounties for production-grade contracts.
    - Use test coverage tools and aim for high test coverage, especially for critical paths.

    Performance Optimization
    - Optimize contracts for gas efficiency, considering storage layout and function optimization.
    - Implement efficient indexing and querying strategies for off-chain data.

    Development Workflow
    - Utilize Hardhat's testing and debugging features.
    - Implement a robust CI/CD pipeline for smart contract deployments.
    - Use static type checking and linting tools in pre-commit hooks.

    Documentation
    - Document code thoroughly, focusing on why rather than what.
    - Maintain up-to-date API documentation for smart contracts.
    - Create and maintain comprehensive project documentation, including architecture diagrams and decision logs.
    
    UI and Frontend Development
    - Utilize Next.js 14's app router for efficient routing and improved performance.
    - Implement server-side rendering (SSR) and static site generation (SSG) where appropriate to optimize loading times.
    - Use React 18's concurrent features for improved user experience in complex UIs.
    - Leverage TypeScript for type safety and improved developer experience.
    - Utilize Tailwind CSS for rapid UI development and consistent styling.
    - Implement responsive design using Tailwind's utility classes.
    - Use ESLint with the Next.js configuration to maintain code quality and consistency.
    - Implement proper error boundaries to gracefully handle and display errors in the UI.
    - Utilize React's Context API or state management libraries for complex state management.
    - Implement code splitting and lazy loading to optimize bundle size and initial load time.
    - Use Next.js Image component for optimized image loading and better Core Web Vitals.
    - Implement accessibility (a11y) best practices, including proper ARIA attributes and keyboard navigation.
    - Utilize CSS modules or styled-components for component-scoped styling when needed.
    - Implement proper form validation and error handling in user inputs.
    - Use React hooks effectively, creating custom hooks for reusable logic.
    - Implement proper loading states and skeleton screens for asynchronous operations.
    - Utilize Next.js API routes for backend functionality when appropriate.
    - Implement proper SEO practices, including meta tags and structured data.
    - Use React.memo, useMemo, and useCallback for performance optimization where necessary.
    - Implement proper state management for forms, considering libraries like react-hook-form for complex forms.
    - Utilize PostCSS features for advanced CSS processing and optimization.

    Web3 and Blockchain Integration
    - Use ethers.js or viem for interacting with Ethereum and other EVM-compatible blockchains.
    - Implement proper error handling for blockchain interactions, including network issues and user rejections.
    - Use @ethsign/sp-sdk for integrating smart contract interactions and wallet connections.
    - Implement proper state management for blockchain data, considering caching strategies.
    - Use @tableland/sdk for decentralized data storage and retrieval when appropriate.
    - Implement proper loading and error states for blockchain transactions.
    - Use environment variables (dotenv) for storing sensitive information like API keys and contract addresses.
    - Implement proper transaction confirmation flows, including pending and success/failure states.
    - Use viem for type-safe and efficient Ethereum interactions when applicable.
    - Implement proper gas estimation and management for transactions.
    - Use Web3Modal or similar libraries for supporting multiple wallet providers.
    - Implement proper handling of network changes and chain switching.
    - Use ethers.js BigNumber or similar for precise numerical operations with blockchain data.
    - Implement proper event listening and real-time updates for blockchain state changes.
    - Use appropriate data encoding/decoding methods when interacting with smart contracts.
bun
css
eslint
golang
handlebars
javascript
less
next.js
+6 more

First seen in:

brolag/block-bounties

Used in 1 repository

GLSL
🦀 --placeholder-- 🐍
dockerfile
glsl
python
shell
ursisterbtw/ghostty-config

Used in 1 repository

Python
You are an expert in Python development, automation, and GUI design with a focus on physics-related applications. You are well-versed in libraries such as PyQt5 for GUI development and matplotlib for visualization. You prioritize clean, maintainable code that adheres to PEP 8 standards and is structured for scalability and readability.

Key Principles:
- Write clear, modular, and maintainable Python code, adhering to good coding conventions.
- Prioritize a clean and extendable folder structure for project organization.
- Follow object-oriented programming principles where appropriate but avoid over-engineering.
- Ensure code is user-friendly and well-documented to assist non-expert developers.
- Avoid unnecessary dependencies; focus on core libraries like PyQt5, numpy, and matplotlib.

Automation and GUI Development:
- Design an intuitive and user-friendly interface using PyQt5.
- Automate sample preparation processes such as "auto contour detection," "auto close packing," and "auto rotation of all samples."
- Use appropriate layouts, widgets, and event handling in the GUI to enhance usability.
- Separate GUI logic from backend processing to ensure modularity and ease of updates.

Visualization:
- Use matplotlib for creating low-level visualizations and customizing plots.
- Ensure plots include proper labels, titles, legends, and units for clarity.
- Generate dynamic plots that integrate seamlessly with the PyQt5 GUI for real-time feedback.

Error Handling and Robustness:
- Implement clear error messages and exception handling in both the backend and GUI layers.
- Validate inputs and outputs to prevent unexpected behavior during the automation process.
- Use logging for debugging and tracking issues during execution.

Performance Optimization:
- Optimize algorithms for automation processes to handle larger datasets efficiently.
- Use numpy for numerical operations to improve performance.
- Profile code to identify and resolve bottlenecks.

Testing and Extensibility:
- Write testable code and include basic unit tests for critical functionality.
- Provide a clear guide for extending features and maintaining the codebase.
- Ensure the code is compatible with Python environments used in Cursor or VSCode.

Key Conventions:
1. Structure the project with distinct directories for GUI components, backend logic, and utilities.
2. Include clear comments and docstrings in the codebase for maintainability.
3. Create reusable functions and classes for shared tasks such as contour detection and rotation.
4. Use version control (e.g., git) to track changes and collaborate effectively.

Dependencies:
- PyQt5 (for GUI development)
- matplotlib (for visualization)
- numpy (for numerical computations)

Focus Areas:
- Automating repetitive and tedious processes in a physics lab environment.
- Ensuring a seamless integration between automation algorithms and the user-facing GUI.
- Providing a clean and professional development experience suitable for both novices and experts.
css
golang
less
python

First seen in:

HongXunyang/laue_project

Used in 1 repository

TypeScript
# LMS MVP Project Rules
# This file defines the rules and processes for our Learning Management System project

# Technology Stack Requirements
technologies:
  frontend:
    - framework: "Next.js@15.0.0"
    - styling: "tailwindcss@latest"
    - ui:
      - "shadcn-ui@latest"
      - "aceternity-ui@latest"
      - "magic-ui@latest"
      - "vaul@latest"
      - "sonner@latest"
      - "cmdk@latest"
    - state: "nuqs@latest"
    - forms: "@hookform/resolvers@latest"
    - validation: "zod@latest"
    - animation:
      - "framer-motion@latest"
      - "@legendapp/motion@latest"
      - "@formkit/auto-animate@latest"
  
  backend:
    - cms: "payload@3.0.0"
    - orm: "drizzle-orm@latest"
    - database: "neon@latest"
    - auth:
        current: "payload-auth@3.0.0"
        future: "clerk@latest"
    - ai: "@vercel/ai@latest"
    - payments: "stripe@latest"
    - uploads: "uploadthing@latest"
    - email: "resend@latest"
    - realtime: "pusher@latest"

  deployment:
    - platform: "vercel@latest"
    - monitoring:
      - "sentry@latest"
      - "@google-cloud/logging@latest"
      - "@google-cloud/opentelemetry-cloud-monitoring-exporter@latest"
      - "@google-cloud/opentelemetry-cloud-trace-exporter@latest"
    - analytics: "vercel-analytics@latest"

  compatibility:
    notes:
      - "Payload CMS 3.0 requires Next.js 15 for optimal performance"
      - "Server Actions are fully supported in Next.js 15"
      - "App Router is the recommended approach"
      - "React Server Components are fully utilized"
      - "nuqs provides URL-based state management compatible with RSC"

# State Management Guidelines
state:
  principles:
    - "Prefer server-side state management over client-side"
    - "Use URL state for shareable and bookmarkable UI states"
    - "Leverage React Server Components for data fetching"
    - "Minimize client-side JavaScript"

  urlState:
    usage:
      - "Search parameters and filters"
      - "Pagination state"
      - "Tab selections"
      - "Modal states"
      - "Sort orders"
      - "View preferences"
    
    implementation:
      - "Use nuqs for type-safe URL state management"
      - "Define searchParams types with Zod schemas"
      - "Implement default values for all URL parameters"
      - "Handle URL parameter validation"
    
    benefits:
      - "SEO-friendly state management"
      - "Shareable URLs with complete state"
      - "Reduced client-side JavaScript"
      - "Better caching capabilities"
      - "Native browser history support"

  serverState:
    patterns:
      - "Use Server Components for data fetching"
      - "Implement server actions for mutations"
      - "Cache responses appropriately"
      - "Handle loading and error states"

  clientState:
    limitations:
      - "Restrict to ephemeral UI state only"
      - "Use React.useState for temporary form state"
      - "Avoid redundant client-side state"
      - "Prefer URL state when possible"

# Collections Structure
collections:
  core:
    - Tenants
    - Users
    - Courses
    - Modules
    - Lessons
    - Quizzes
    - Assignments
    - Submissions

  gamification:
    - Points
    - Badges
    - Achievements
    - Streaks
    - Leaderboard

  communication:
    - Notifications
    - Collaborations
    - Announcements
    - SupportTickets

  settings:
    - TenantSettings
    - StudentSettings
    - LearningPaths

# File Structure
structure:
  app:
    - "(auth): Authentication routes"
    - "(dashboard): Protected dashboard routes"
    - "api: API routes when necessary"
    - "public: Static assets"
    
  components:
    - "ui: Reusable UI components"
    - "forms: Form components"
    - "layouts: Layout components"
    
  lib:
    - "db: Database configuration"
    - "utils: Utility functions"
    - "validation: Schema validation"
    
  types:
    - "Global type definitions"

# Code Standards
standards:
  general:
    - "Use TypeScript strict mode"
    - "Implement proper error handling"
    - "Add comprehensive logging"
    - "Document all public APIs"
    - "Follow SOLID principles"

  nextjs:
    - "Use server components by default"
    - "Implement proper data fetching patterns"
    - "Optimize for performance"
    - "Follow app router best practices"

  database:
    - "Use Drizzle migrations"
    - "Implement proper indexing"
    - "Handle database errors gracefully"
    - "Use transactions where needed"

  security:
    - "Implement proper authentication"
    - "Use role-based access control"
    - "Sanitize all inputs"
    - "Protect sensitive data"

  testing:
    - "Write tests for critical paths"
    - "Maintain good test coverage"
    - "Use proper test isolation"
    - "Mock external dependencies"

# Multi-Agent Development Process
agents:
  architect:
    role: "System Design & Architecture"
    responsibilities:
      - "Review and approve architectural decisions"
      - "Ensure scalability and performance"
      - "Maintain system consistency"
      - "Plan data structures and relationships"
    triggers:
      - "New feature proposal"
      - "Architecture changes"
      - "Performance optimization requests"
      - "Database schema updates"

  developer:
    role: "Code Implementation"
    responsibilities:
      - "Write clean, maintainable code"
      - "Implement features according to specs"
      - "Handle error cases and edge conditions"
      - "Optimize database queries"
    triggers:
      - "New feature request"
      - "Bug fix needed"
      - "Code optimization required"
      - "Performance issues"

  reviewer:
    role: "Code Review & Quality"
    responsibilities:
      - "Review code for best practices"
      - "Check for security vulnerabilities"
      - "Ensure code style consistency"
      - "Verify state management patterns"
    checks:
      - "Code style compliance"
      - "Security best practices"
      - "Performance implications"
      - "Test coverage"
      - "URL state management"

  tester:
    role: "Testing & Validation"
    responsibilities:
      - "Write and maintain tests"
      - "Verify feature functionality"
      - "Regression testing"
      - "Load testing"
    testTypes:
      - "Unit tests"
      - "Integration tests"
      - "E2E tests"
      - "Performance tests"
      - "Load tests"

  security:
    role: "Security Compliance"
    responsibilities:
      - "Review security implications"
      - "Ensure data protection"
      - "Audit authentication/authorization"
      - "Monitor security events"
    checks:
      - "Authentication flows"
      - "Data encryption"
      - "API security"
      - "Input validation"
      - "Rate limiting"

# Development Workflow
workflow:
  featureImplementation:
    steps:
      1:
        agent: "architect"
        action: "Review feature proposal"
        output: "Architecture decision document"
        stateConsiderations:
          - "Determine if state should be URL-based"
          - "Plan server component structure"
          - "Identify client/server state boundaries"
          - "Consider data persistence needs"
      
      2:
        agent: "developer"
        action: "Implement feature"
        requirements:
          - "Follow Next.js 15 app router patterns"
          - "Use server actions over API routes"
          - "Implement URL state management with nuqs"
          - "Add proper loading and error states"
          - "Implement proper error handling"
          - "Add logging and monitoring"
      
      3:
        agent: "reviewer"
        action: "Code review"
        checks:
          - "Code quality"
          - "Performance"
          - "Security"
          - "Documentation"
          - "State management"
      
      4:
        agent: "tester"
        action: "Testing"
        requirements:
          - "Unit tests for utilities"
          - "Integration tests for API"
          - "E2E tests for critical flows"
          - "Load testing for scalability"
      
      5:
        agent: "security"
        action: "Security review"
        focus:
          - "Data protection"
          - "Authentication"
          - "Authorization"
          - "Rate limiting"

  bugFix:
    steps:
      1:
        agent: "developer"
        action: "Reproduce and fix"
        requirements:
          - "Document reproduction steps"
          - "Add regression test"
      
      2:
        agent: "reviewer"
        action: "Review fix"
        checks:
          - "Fix completeness"
          - "No new issues introduced"
      
      3:
        agent: "tester"
        action: "Verify fix"
        requirements:
          - "Test fix effectiveness"
          - "Run regression tests"

# Error Handling
errors:
  levels:
    - "fatal: System crash level"
    - "error: Operation failure"
    - "warn: Potential issues"
    - "info: General information"
    - "debug: Debug information"
  
  handling:
    - "Use custom error classes"
    - "Implement proper error boundaries"
    - "Log errors with context"
    - "Provide user-friendly messages"

# Deployment Guidelines
deployment:
  vercel:
    configuration:
      - "Use Edge Functions where appropriate"
      - "Configure proper caching strategies"
      - "Set up proper environment variables"
      - "Configure deployment regions"
    monitoring:
      - "Set up error tracking with Sentry"
      - "Configure OpenTelemetry for tracing"
      - "Implement custom logging"
      - "Monitor Core Web Vitals"

  database:
    neon:
      - "Configure connection pooling"
      - "Set up read replicas"
      - "Implement query optimization"
      - "Configure automated backups"

  security:
    measures:
      - "Implement rate limiting"
      - "Set up CORS policies"
      - "Configure CSP headers"
      - "Enable WAF protection"

# Performance Requirements
performance:
  metrics:
    - "Time to First Byte (TTFB) < 100ms"
    - "First Contentful Paint (FCP) < 1.5s"
    - "Largest Contentful Paint (LCP) < 2.5s"
    - "First Input Delay (FID) < 100ms"
    - "Cumulative Layout Shift (CLS) < 0.1"

  optimization:
    - "Implement proper code splitting"
    - "Use React Suspense boundaries"
    - "Optimize images and assets"
    - "Minimize client-side JavaScript"
    - "Utilize edge caching"

# Commit Guidelines
commits:
  format: "type(scope): description"
  types:
    - "feat: New feature"
    - "fix: Bug fix"
    - "docs: Documentation"
    - "style: Code style"
    - "refactor: Code refactor"
    - "test: Testing"
    - "chore: Maintenance"

# Backup and Recovery
backup:
  database:
    - "Automated daily backups"
    - "Point-in-time recovery"
    - "Cross-region replication"
    - "Backup retention policy"

  assets:
    - "Media file backups"
    - "Document versioning"
    - "Metadata backup"
    - "Recovery procedures"

  monitoring:
    - "Backup success monitoring"
    - "Recovery testing schedule"
    - "Audit logging"
    - "Alert configuration"

# Authentication Strategy
auth:
  phase1:
    provider: "Payload Built-in Auth"
    features:
      - "Email/password authentication"
      - "Role-based access control"
      - "Session management"
      - "Password reset flow"
      - "Email verification"
    implementation:
      - "Use Payload's built-in auth system"
      - "Implement custom auth endpoints in Next.js"
      - "Set up proper session handling"
      - "Configure secure password policies"
      - "Set up email templates for auth flows"

  phase2:
    provider: "Clerk"
    features:
      - "Social authentication"
      - "Multi-factor authentication"
      - "User management dashboard"
      - "Advanced security features"
      - "Authentication analytics"
    migration:
      - "Plan user data migration strategy"
      - "Set up Clerk webhooks"
      - "Update auth middleware"
      - "Migrate existing users"
      - "Update frontend components"

  security:
    - "Implement CSRF protection"
    - "Set secure cookie policies"
    - "Configure rate limiting"
    - "Set up proper session timeouts"
    - "Implement audit logging"

# UI and Animation Patterns
ui_patterns:
  floating:
    description: "Elements that float and respond to user interaction"
    implementations:
      - "Floating navigation with Framer Motion"
      - "Hover cards using shadcn/ui + Aceternity"
      - "Animated tooltips with Magic UI"
      - "Context menus with radix-ui animations"
    libraries:
      - "framer-motion"
      - "aceternity-ui"
      - "magic-ui"
      - "vaul"

  morphing:
    description: "Elements that transform and change shape"
    implementations:
      - "Shape-shifting buttons with Framer Motion"
      - "Expanding cards using Aceternity UI"
      - "Transitioning layouts with Motion One"
      - "Fluid backgrounds with Magic UI"
    libraries:
      - "framer-motion"
      - "aceternity-ui"
      - "motion-one"
      - "magic-ui"

  micro_interactions:
    description: "Small, subtle animations that provide feedback"
    implementations:
      - "Button click effects with tailwindcss-animate"
      - "Input focus states with shadcn/ui"
      - "Loading spinners with Lucide icons"
      - "Progress indicators with Sonner"
    libraries:
      - "tailwindcss-animate"
      - "shadcn-ui"
      - "lucide-react"
      - "sonner"

  scroll_animations:
    description: "Animations triggered by scroll events"
    implementations:
      - "Parallax effects with Framer Motion"
      - "Scroll-triggered reveals with Aceternity"
      - "Smooth transitions with Motion One"
      - "Intersection animations with Magic UI"
    libraries:
      - "framer-motion"
      - "aceternity-ui"
      - "motion-one"
      - "magic-ui"

animation_patterns:
  layout:
    description: "Page and layout transition animations"
    implementations:
      - "Page transitions with Framer Motion"
      - "Route changes using Next.js + Motion One"
      - "Modal animations with Vaul"
      - "List reordering with Auto Animate"
    libraries:
      - "framer-motion"
      - "motion-one"
      - "vaul"
      - "@formkit/auto-animate"

  feedback:
    description: "User feedback animations"
    implementations:
      - "Loading states with Lucide"
      - "Success/error animations with Sonner"
      - "Progress indicators with shadcn/ui"
      - "Notification toasts with Magic UI"
    libraries:
      - "lucide-react"
      - "sonner"
      - "shadcn-ui"
      - "magic-ui"

  interaction:
    description: "User interaction animations"
    implementations:
      - "Hover effects with tailwindcss-animate"
      - "Click responses with Framer Motion"
      - "Drag and drop with Motion One"
      - "Gesture animations with Magic UI"
    libraries:
      - "tailwindcss-animate"
      - "framer-motion"
      - "motion-one"
      - "magic-ui"

# Component Animation Guidelines
component_animations:
  principles:
    - "Use subtle animations by default"
    - "Ensure animations are accessible (respect reduced-motion)"
    - "Keep animations under 300ms for micro-interactions"
    - "Use spring animations for natural feel"
    - "Maintain consistent animation patterns"

  performance:
    - "Use CSS transforms over position properties"
    - "Animate on compositor-only properties"
    - "Implement proper will-change hints"
    - "Use requestAnimationFrame for JS animations"
    - "Lazy load heavy animation libraries"

  accessibility:
    - "Respect prefers-reduced-motion"
    - "Ensure animations don't cause vestibular issues"
    - "Provide alternative static states"
    - "Keep animations subtle and purposeful"
    - "Allow animation opt-out"
analytics
clerk
dockerfile
drizzle-orm
golang
java
javascript
less
+12 more

First seen in:

thorski1/LouMinouS

Used in 1 repository