Awesome Cursor Rules Collection

Showing 757-768 of 1033 matches

TypeScript
You must rewrite the file according to the user's instructions

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.

Syntax and Formatting
- Use the "function" keyword for pure functions.
- Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements.
- Use declarative JSX.

UI and Styling
- Use style modules with sass to stylize components (e.g Button.module.scss), use tailwind for global styles.
- Implement responsive design; use a mobile-first approach.
- Use framer motion and gsap for animations always try to be performant and efficient.

Performance Optimization
- Minimize 'use client', 'useEffect', and 'setState'; favor React Server Components (RSC).
- Wrap client components in Suspense with fallback.
- Use dynamic loading for non-critical components.
- Optimize images: use WebP format, include size data, implement lazy loading.

Folder Structure
- components: ui, layout, booking, etc; ui and sections have an entry point index.ts file that exports the component.
- app: (pages, api, layout, loading, not-found, etc)
- src: (assets, components, app, hooks, constants, lib, styles, types, utils, validations, etc)

Key Conventions
- Use 'nuqs' for URL search parameter state management.
- Optimize Web Vitals (LCP, CLS, FID).
- Limit 'use client':
  - Favor server components and Next.js SSR.
  - Use only for Web API access in small components.
  - Avoid for data fetching or state management.

Follow Next.js docs for Data Fetching, Rendering, and Routing.

React SOLID Principles and Best Practices
- Single Responsibility Principle (SRP):
  - Create focused components with a single purpose.
  - Extract complex logic into custom hooks (e.g., useDataFetching, useFormValidation).
  - Separate UI rendering from business logic.

- Open-Closed Principle (OCP):
  - Design components to be easily extendable without modifying existing code.
  - Use composition and higher-order components for reusability.

- Liskov Substitution Principle (LSP):
  - Ensure child components can replace parent components without breaking the application.
  - Use TypeScript to enforce proper prop types and interfaces.

- Interface Segregation Principle (ISP):
  - Create small, specific interfaces rather than large, general ones.
  - Use TypeScript to define clear prop interfaces for components.

- Dependency Inversion Principle (DIP):
  - Depend on abstractions, not concretions.
  - Use dependency injection to provide services to components.

Custom Hooks Best Practices
- Create custom hooks to encapsulate and reuse stateful logic.
- Name custom hooks with the 'use' prefix (e.g., useAuth, useCart).
- Keep hooks focused on a single concern or feature.
- Use TypeScript to define clear return types for custom hooks.

Component Structure
- Separate presentational and container components when appropriate.
- Use custom hooks to manage component logic and state.
- Keep components small and focused on a single responsibility.
- Extract reusable logic into utility functions or custom hooks.
css
javascript
next.js
react
sass
scss
solidjs
tailwindcss
+1 more

First seen in:

jordiparadelo/Japp-Media

Used in 1 repository

TypeScript
agents:
  - reference: "./architect_agent.cursornb"
  - reference: "./devops_agent.cursornb"
  - reference: "./frontend_agent.cursornb"
  - reference: "./backend_agent.cursornb"
  - reference: "./database_agent.cursornb"
  - reference: "./testing_agent.cursornb"
  - reference: "./scrum_master_agent.cursornb"
  - reference: "./docs_agent.cursornb"

workflows:
  - reference: "./workflows.cursornb"

tech_stack:
  - reference: "./tech_stack.cursornb"

recommendations:
  - "Follow the user’s requirements carefully and to the letter."
  - "Plan development tasks in detail using pseudocode before writing actual code."
  - "Ensure the code follows best practices, DRY principles, and is bug-free."
  - "Write complete, thoroughly verified, and fully functional code with no placeholders."
  - "Use descriptive variable and function names, including handle prefixes for events."
  - "Prioritize code readability over performance."
  - "Always include required imports and name components properly."
  - "Avoid guessing if an answer is unclear—state it explicitly."

logging_instructions:
  - "All agents must maintain a log file in the './docs/agents/' directory."
  - "Logs must include progress updates, design choices, issues encountered, and resolutions."
  - "Document issues to prevent them from recurring in future development cycles."
  - "Maintain a clear list of ToDos and unresolved tasks requiring future attention."

code_guidelines:
  languages:
    - ReactJS
    - NextJS
    - JavaScript
    - TypeScript
    - TailwindCSS
    - HTML
    - CSS

  implementation_rules:
    - "Use early returns for readability."
    - "Prefer Tailwind classes for HTML styling; avoid CSS files."
    - "Use descriptive names for constants, functions, and events (prefix events with 'handle')."
    - "Implement accessibility features like tabindex, aria-labels, and keyboard events."
    - "Use TypeScript types and constants instead of functions where appropriate."
css
dockerfile
java
javascript
next.js
react
shell
tailwindcss
+1 more
fernandovazquezgalvan/agile-pm

Used in 1 repository

TypeScript
You are an expert in TypeScript, Node.js, Next.js 14 App Router, React, Shadcn UI, Radix UI, Tailwind, Tailwind Aria, Supabase/Postgres with Supabase Client API.

Key Principles

- Write concise, technical responses with accurate TypeScript examples.
- Use functional, declarative programming. Avoid classes.
- Prefer iteration and modularization over duplication.
- Use descriptive variable names with auxiliary verbs (e.g., isLoading).
- Use lowercase with dashes for directories (e.g., components/auth-wizard).
- Favor named exports for components.
- Use the Receive an Object, Return an Object (RORO) pattern.

TypeScript Usage

- Use "function" keyword for pure functions.
- Use TypeScript for all code. Prefer types over interfaces. Avoid enums, use maps.
- File structure: Exported component, subcomponents, helpers, static content, types.
- Avoid unnecessary curly braces in conditional statements.
- For single-line statements in conditionals, omit curly braces.
- Use concise, one-line syntax for simple conditional statements (e.g., if (condition) doSomething()).

Error Handling and Validation

- Prioritize error handling and edge cases:
  - Handle errors and edge cases at the beginning of functions.
  - Use early returns for error conditions to avoid deeply nested if statements.
  - Place the happy path last in the function for improved readability.
  - Avoid unnecessary else statements; use if-return pattern instead.
  - Use guard clauses to handle preconditions and invalid states early.
  - Implement proper error logging and user-friendly error messages.
  - Consider using custom error types or error factories for consistent error handling.

React/Next.js

- Use functional components and TypeScript interfaces.
- Use declarative TSX.
- Use function, not const, for components.
- Use Shadcn UI, Radix, and Tailwind Aria for components and styling.
- Implement responsive design with Tailwind CSS.
- Use mobile-first approach for responsive design.
- Place static content and interfaces at file end.
- Use content variables for static content outside render functions.
- Minimize 'use client', 'useEffect', and 'setState'. Favor RSC - server components.
- Use Zod for form validation.
- Wrap client components in Suspense with fallback.
- Use dynamic loading for non-critical components.
- Optimize images: WebP format, size data, lazy loading.
- Model expected errors as return values: Avoid using try/catch for expected errors in Server Actions. Use useActionState to manage these errors and return them to the client.
- Use error boundaries for unexpected errors: Implement error boundaries using error.tsx and global-error.tsx files to handle unexpected errors and provide a fallback UI.
- Use useActionState with react-hook-form for form validation.
- Code in services/ dir always throw user-friendly errors that tanStackQuery can catch and show to the user.

Components

- When you need a component, do this:
  - think carefully about the component
  - generate a prompt
  - then with the prompt create a clickable link: [component name](https://v0.dev/chat?q={prompt})
  - make sure prompt is url encoded

Data Access & Authentication/Authorisation

- Use Supabase as the backend database. My setup is a production server and a local running development server.
  - Use Supabase Authentication and Authorization
  - Use Supabase Client API for database operations
  - Use Supabase local CLI for migrations

Key Conventions

1. Rely on Next.js App Router for state changes.
2. Prioritize Web Vitals (LCP, CLS, FID).
3. Minimize 'use client' usage:
   - Prefer server components and Next.js SSR features.
   - Use 'use client' only for Web API access in small components.
   - Avoid using 'use client' for data fetching or state management.

Refer to Next.js documentation for Data Fetching, Rendering, and Routing best practices.

Refer to Supabase documentation for authentication, database features
css
javascript
nestjs
next.js
plpgsql
postgresql
radix-ui
react
+4 more

First seen in:

keremk/mentopanda

Used in 1 repository

TypeScript
  You are an expert in TypeScript, Preact, React, Shadcn UI, Radix UI, Tailwind, AG Grid, and Plotly.js.

  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: types, exported component, sub-components, helpers, static content.

  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.
  - Use strict mode in TypeScript for better type safety.

  Syntax and Formatting
  - Prefer arrow functions over the "function" keyword.
  - Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements.
  - Use declarative JSX.
  - Use Prettier for consistent code formatting.
  - Prefer all lowercase comments without periods, except acronyms, proper nouns, or to avoid confusion with variable names.

  UI and Styling
  - Use Shadcn UI, Radix, and Tailwind for components and styling.
  - Implement responsive design with Tailwind CSS.

  Performance Optimization
  - Minimize the use of useState and useEffect; prefer Preact Signals, context and reducers for state management.
  - Use dynamic loading for non-critical components.
  - Implement code splitting and lazy loading for non-critical components dynamic imports.
  - Avoid unnecessary re-renders by memoizing components and using useMemo and useCallback hooks appropriately.

  State Management
  - Prefer Preact Signals, otherwise, use Context and useReducer for managing global state.

  Error Handling and Validation
  - Prioritize error handling and edge cases:
  - Handle errors at the beginning of functions.
  - Use early returns for error conditions to avoid deeply nested if statements.
  - Avoid unnecessary else statements; use if-return pattern instead.
  - Implement global error boundaries to catch and handle unexpected errors.

  Security
  - Sanitize user inputs to prevent XSS attacks.



css
html
javascript
nestjs
preact
prettier
radix-ui
react
+3 more

First seen in:

yuri-rage/ap-preact-demo

Used in 1 repository

TypeScript
{
  "sourceCode": {
    "organization": {
      "components": "src/components",
      "pages": "src/app",
      "lib": "src/lib",
      "styles": "src/styles",
      "types": "src/types",
      "hooks": "src/hooks"
    }
  },
  "libraries": {
    "@headlessui/react": {
      "required": true,
      "usage": "For accessible UI components like dropdowns, modals, etc.",
      "alternatives": "not allowed without team discussion"
    },
    "@heroicons/react": {
      "required": true,
      "usage": "For all icon needs in the application",
      "alternatives": "not allowed without team discussion"
    },
    "clsx": {
      "required": true,
      "usage": "For class name construction",
      "alternatives": "not allowed"
    },
    "tailwind-merge": {
      "required": true,
      "usage": "For merging Tailwind classes",
      "alternatives": "not allowed"
    }
  },
  "components": {
    "naming": {
      "pattern": "PascalCase",
      "examples": ["Button", "UserMenu", "ProfileCard"]
    },
    "structure": {
      "location": "src/components/[domain]/[ComponentName].tsx",
      "exports": "named exports only",
      "imports": "absolute imports with @/ alias"
    },
    "exports": {
      "required": "Every component directory must have an index.ts file",
      "rules": [
        "Use named exports instead of default exports",
        "Export all components through index.ts",
        "Group related components in the same directory",
        "Keep exports clean and alphabetically ordered"
      ],
      "pattern": "export { ComponentName } from './ComponentName'",
      "examples": {
        "singleComponent": [
          "// components/Button/index.ts",
          "export { Button } from './Button'"
        ],
        "multipleComponents": [
          "// components/Form/index.ts",
          "export { Form } from './Form'",
          "export { FormField } from './FormField'",
          "export { FormLabel } from './FormLabel'"
        ]
      }
    },
    "props": {
      "naming": "camelCase",
      "interface": "ComponentNameProps",
      "required": ["proper TypeScript types", "JSDoc comments for complex props"]
    }
  },
  "hooks": {
    "useEffect": {
      "avoid": true,
      "allowedCases": [
        "data fetching (when not possible with React Query or similar)",
        "managing subscriptions/event listeners",
        "integrating with non-React libraries",
        "managing focus/scroll position"
      ],
      "alternatives": {
        "urlParams": "use server components or router events",
        "dataFetching": "use React Query or SWR",
        "formHandling": "use react-hook-form or similar",
        "stateUpdates": "use event handlers or state management libraries",
        "apiCalls": "use React Query mutations or similar"
      }
    }
  },
  "serverComponents": {
    "searchParams": {
      "rules": [
        "Server components using searchParams must be async",
        "Always await searchParams and destructure values",
        "Use pattern: const { param1, param2 } = await searchParams"
      ],
      "example": "export default async function Page({ searchParams }) {\n  const { value } = await searchParams;\n}"
    }
  },
  "dataFetching": {
    "rules": [
      "Always use Axios instead of fetch",
      "Use React Query for data fetching and caching",
      "Use React Query mutations for data mutations",
      "Configure Axios instance with base URL and interceptors",
      "Handle errors globally through Axios interceptors"
    ],
    "avoid": [
      "Direct fetch calls",
      "Manual loading/error states",
      "Direct API calls without React Query"
    ],
    "examples": {
      "query": "const { data, isLoading } = useQuery(['key'], () => api.get('/endpoint'))",
      "mutation": "const { mutate } = useMutation((data) => api.post('/endpoint', data))",
      "axios": "import { api } from '@/lib/axios';"
    }
  },
  "styling": {
    "approach": "Tailwind CSS utility classes",
    "className": {
      "merging": "use cn() utility",
      "ordering": ["layout", "spacing", "typography", "colors", "states"]
    },
    "responsive": {
      "approach": "mobile-first",
      "breakpoints": ["sm", "md", "lg", "xl", "2xl"]
    },
    "darkMode": {
      "support": "required for all components",
      "implementation": "use dark: variant"
    }
  },
  "icons": {
    "source": "@heroicons/react only",
    "sizing": {
      "default": "20/solid for general UI",
      "navigation": "24/outline for navigation",
      "mini": "20/solid for compact UI"
    },
    "naming": {
      "pattern": "IconName + 'Icon'",
      "example": "ChevronDownIcon"
    }
  },
  "classNames": {
    "merging": {
      "utility": "cn() from @/lib/utils",
      "pattern": "cn('base-classes', conditional && 'conditional-classes')"
    },
    "organization": {
      "order": [
        "layout classes",
        "spacing classes",
        "typography classes",
        "color classes",
        "state classes"
      ]
    }
  },
  "documentation": {
    "required": [
      "component description",
      "props documentation",
      "usage examples",
      "accessibility notes"
    ],
    "format": "TSDoc/JSDoc style comments",
    "location": "above component definition"
  },
  "performance": {
    "imports": {
      "icons": "import individual icons, no bulk imports",
      "components": "use dynamic imports for large components"
    },
    "rendering": {
      "optimization": [
        "use memo for expensive computations",
        "avoid unnecessary re-renders",
        "lazy load off-screen content"
      ]
    }
  },
  "routing": {
    "structure": {
      "app": "src/app",
      "layouts": "src/app/**/layout.tsx",
      "pages": "src/app/**/page.tsx",
      "loading": "src/app/**/loading.tsx",
      "error": "src/app/**/error.tsx"
    },
    "naming": {
      "pattern": "kebab-case for folders",
      "dynamic": "[param] for dynamic segments"
    },
    "pageOrganization": {
      "structure": {
        "pageRoot": "page.tsx should be the only component directly in the page directory",
        "directories": {
          "_components": "Page-specific UI components",
          "_hooks": "Page-specific custom hooks",
          "_api": "Page-specific API clients and data fetching",
          "_utils": "Page-specific utility functions",
          "_types": "Page-specific TypeScript types and interfaces",
          "_constants": "Page-specific constants and configuration"
        },
        "featureRoot": {
          "description": "For multi-page features (e.g., auth with login, register pages)",
          "sharedDirectories": {
            "_shared": {
              "description": "Root directory for shared code within the feature",
              "structure": {
                "api": "Shared API clients",
                "hooks": "Shared hooks",
                "types": "Shared types",
                "utils": "Shared utilities",
                "components": "Shared components",
                "constants": "Shared constants"
              }
            }
          },
          "pageDirectories": {
            "_components": "Page-specific components only",
            "_hooks": "Page-specific hooks only",
            "_api": "Page-specific API calls only"
          }
        }
      },
      "example": {
        "multiPageFeature": {
          "path": "src/app/auth",
          "structure": [
            "_shared/",
            "_shared/api/auth-api.ts",
            "_shared/api/index.ts",
            "_shared/hooks/use-auth.ts",
            "_shared/hooks/index.ts",
            "_shared/types/auth-types.ts",
            "_shared/types/index.ts",
            "login/",
            "login/_components/",
            "login/_components/LoginForm.tsx",
            "login/_components/index.ts",
            "login/page.tsx",
            "register/",
            "register/_components/",
            "register/_components/RegisterForm.tsx",
            "register/_components/index.ts",
            "register/page.tsx"
          ]
        }
      },
      "rules": [
        "Keep page.tsx focused on layout and data fetching",
        "Every directory must have an index.ts file for exports",
        "Use _shared directory at feature root for code shared between pages",
        "Keep page-specific code in respective page directories",
        "Use named exports consistently across all files",
        "Keep directory structure flat within each directory",
        "Each directory should focus on a single responsibility"
      ],
      "exports": {
        "pattern": "Always use index.ts for exports",
        "examples": {
          "_shared/api": "export { authApi } from './auth-api'",
          "_shared/hooks": "export { useAuth } from './use-auth'",
          "login/_components": "export { LoginForm } from './LoginForm'"
        }
      }
    }
  },
  "stateManagement": {
    "local": "use React.useState",
    "shared": "use Zustand for global state",
    "server": "use React Query for server state",
    "forms": "use react-hook-form"
  },
  "testing": {
    "framework": "Jest + React Testing Library",
    "coverage": "minimum 80%",
    "requirements": [
      "basic rendering",
      "prop variations",
      "user interactions",
      "accessibility"
    ]
  },
  "accessibility": {
    "compliance": "WCAG 2.1 AA",
    "requirements": [
      "proper ARIA attributes",
      "keyboard navigation",
      "screen reader support",
      "sufficient color contrast"
    ]
  }
} 
css
handlebars
javascript
jest
less
react
shell
solidjs
+3 more
ozanturhan/cursor-project

Used in 1 repository

TypeScript
The Following is a next.js 15 project, react 19, typescript, shadcn ui, tailwind css project. It is an ai resume builder. 
It is called "ResumeLM".


Database Structure
- Tables follow a relational structure with UUID primary keys and timestamps.

Tables:
1. profiles
   - Stores user's base information and resume components
   - Contains JSON fields for complex data (work_experience, education, skills, etc.)
   - One-to-one relationship with auth.users

2. jobs
   - Stores job listings with requirements and details
   - Public read access, user-specific write access
   - Contains salary_range as JSONB for flexible structure
   - Tracks application status and requirements

3. resumes
   - Stores both base and tailored resumes
   - Links to jobs table for tailored resumes
   - Contains same fields as profiles for resume content
   - Uses JSONB for section_order and section_configs
   - section_configs controls visibility and display of resume sections

Key Relationships:
- profiles.user_id → auth.users.id
- resumes.user_id → auth.users.id
- resumes.job_id → jobs.id (optional, for tailored resumes)

JSON Fields Structure:
- work_experience: Array of work history with descriptions and technologies
- education: Array of educational background with achievements
- skills: Array of skill categories with grouped items
- projects: Array of projects with highlights and technologies
- certifications: Array of professional certifications
- section_configs: Object controlling section display properties

Row Level Security (RLS):
- profiles: User can only access own profile
- jobs: Public read, user-specific write
- resumes: User can only access own resumes

Design System: Soft Gradient Minimalism

Core Principles:
- Layered Depth: Multiple translucent layers create visual hierarchy
- Organic Motion: Subtle animations suggest liveliness without distraction
- Purposeful White Space: Generous spacing improves content digestion
- Consistent Interaction: Predictable hover and active states across components

Visual Hierarchy:
1. Background Layer
   - Base: Neutral gradient (rose-50/50 → sky-50/50 → violet-50/50)
   - Floating Orbs: Translucent gradients with slow animations
   - Mesh Overlay: Subtle grid pattern (#8882)

2. Content Layer
   - Glass Cards: bg-white/40 with backdrop-blur-md
   - Border: border-white/40
   - Shadow: shadow-xl with backdrop-blur-xl

3. Interactive Elements
   - Hover State: Duration 500ms
   - Transform: -translate-y-1
   - Background Shift: bg-white/50

Color Palette:
Primary:
  - Teal: from-teal-600 to-cyan-600
  - Purple: from-purple-600 to-indigo-600 (Base Resumes)
    - Accent: {
      bg: "purple-50",
      border: "purple-200",
      hover: "purple-300",
      text: "purple-600"
    }
  - Pink: from-pink-600 to-rose-600 (Tailored Resumes)
    - Accent: {
      bg: "pink-50",
      border: "pink-200",
      hover: "pink-300",
      text: "pink-600"
    }

Background:
  - Gradients: pink-200/20, violet-200/20, blue-200/20, teal-200/20
  - Overlays: teal-50/10, cyan-50/10, purple-50/10, indigo-50/10

Specific Resume Type Colors:
- Base Resumes:
  - Gradient: from-purple-600 to-indigo-600
  - Icon Background: from-purple-600/10 to-indigo-600/10
  - Border: border-purple-600/10
  - Text: text-purple-600
  - Hover States: purple-700

- Tailored Resumes:
  - Gradient: from-pink-600 to-rose-600
  - Icon Background: from-pink-600/10 to-rose-600/10
  - Border: border-pink-600/10
  - Text: text-pink-600
  - Hover States: pink-700

Typography:
- Headers: text-3xl, font-semibold with gradient text
- Body: Base 16px, text-muted-foreground for secondary text
- Font Stack: 'Inter', system-ui, -apple-system, sans-serif

Animation Timings:
- Hover Transitions: 500ms
- Background Orbs: 8s/9s ease-in-out infinite
- Transform Origin: Center

Component Patterns:
- Card Structure: rounded-2xl with nested content padding
- Content Areas: Relative positioning with gradient overlays
- Interactive Areas: Clear hover states with smooth transitions

Responsive Behavior:
- Mobile First: Base layout with single column
- Breakpoints: md:p-8 lg:p-10 lg:grid-cols-12
- Max Width: 2000px with centered content

Z-Index Layers:
- Background: z-0
- Content: z-10
- Overlays: Relative to parent
css
golang
javascript
nestjs
next.js
react
shadcn/ui
shell
+2 more

First seen in:

olyaiy/resume-ai

Used in 1 repository

TypeScript
{
  "version": "2.0.0",
  "projectType": ["nextjs", "fullstack", "ai-powered"],
  "ai": {
    "assistant": {
      "mode": "intelligent-complete",
      "capabilities": [
        "context-aware-suggestions",
        "code-generation",
        "documentation-assistance"
      ]
    },
    "openai": {
      "preferredModel": "gpt-4o",
      "maxTokens": 4096,
      "temperature": 0.7
    }
  },
  "codeStyle": {
    "javascript": {
      "indent": 2,
      "maxLineLength": 100,
      "trailingCommas": true,
      "semicolons": true
    },
    "typescript": {
      "strictNullChecks": true,
      "noImplicitAny": true
    }
  },
  "linting": {
    "eslint": {
      "extends": [
        "next/core-web-vitals",
        "plugin:react-hooks/recommended",
        "plugin:@typescript-eslint/recommended"
      ],
      "rules": {
        "no-unused-vars": "warn",
        "react/prop-types": "off",
        "@typescript-eslint/explicit-module-boundary-types": "off"
      }
    }
  },
  "frameworks": {
    "nextjs": {
      "appDir": true,
      "serverComponents": true,
      "preferredRouter": "app"
    },
    "react": {
      "preferredHooks": ["useState", "useEffect", "useCallback"],
      "avoidUnsafeLifecycles": true
    }
  },
  "backend": {
    "supabase": {
      "authStrategy": "row-level-security",
      "preferredClient": "supabase-js-v2"
    },
    "node": {
      "engineVersion": ">=18.0.0",
      "preferredPackageManager": "pnpm"
    }
  },
  "security": {
    "sensitiveData": {
      "masking": true,
      "envFileProtection": true
    },
    "openai": {
      "apiKeyHandling": "strict-environment-variables"
    }
  },
  "performance": {
    "optimization": {
      "imageOptimization": true,
      "serverSideRendering": true,
      "staticGeneration": true
    }
  },
  "ignore": [
    "node_modules/**",
    ".next/**",
    "/.git",
    "/.env.local",
    "/.env.production"
  ],
  "extensions": {
    "recommended": [
      "tsx",
      "ts",
      "js",
      "jsx",
      "json",
      "md"
    ],
    "disabled": [
      "lock files",
      "system files"
    ]
  },
  "codeQuality": {
    "testing": {
      "unitTesting": "jest",
      "e2eTestingFramework": "playwright"
    },
    "documentation": {
      "generator": "typedoc",
      "commentStyle": "tsdoc"
    }
  }
}
css
eslint
java
javascript
jest
next.js
npm
openai
+5 more

First seen in:

while-basic/meme-social

Used in 1 repository

TypeScript
You are an expert in modern full-stack development with Typescript, React, Remix, TailwindCSS.
You are thoughtful, give nuanced answers, and are brilliant at reasoning. You carefully provide accurate, factual, thoughtful answers.

# Technologies

- Typescript for frontend and backend
- React for frontend
- Remix for Backend for frontend
- TailwindCSS for styling
- Radix UI for accessible UI components
- Github Actions for CI/CD
- pnpm for package manager

# Guidelines

## Communication

- Ask questions when you need to, don't make assumptions.
- Summarize your changes distinctly and ask follow up questions.
- Fully implement all requested functionality.
- Leave NO todo’s, placeholders or missing pieces.
- Ensure code is complete! Verify thoroughly finalised.

## Documentation

- Suggest adding/extending/modifying documentation in a root `docs/` folder
- Create user flow diagrams for complex interactions.

## Javascript/Typescript

- Utilize Typescript and avoid using any!
- Prefer types over interfaces
- Prefer object params for a function in most cases (except when there is only 1 param)
- kebab-case for filenames and folder-names
- camelCase for functions and variables
- PascalCase for React component functions
- Handle errors and edge cases gracefully
- Use typed error responses
- Add sensible logging where appropriate
- Use `const` for immutable variables.
- Use template strings for string interpolation.
- Use functional and declarative programming patterns; avoid classes.
- Avoid enums; use maps instead.

## React

- Write functional components
- Don't use `React.FC`
- Don't add too much boilerplate to the components – keep it clean
- Inline component prop types if they are used only once
- Always add loading and error states to data fetching components
- Use Error Boundaries for React component error catching (in Remix)

## Accessibility

- Use semantic elements (e.g., <header>, <main>, <footer>, <article>, <section>).
- Make sure that all interactive elements are focusable and usable with the keyboard
- Use `tabindex` where sensible
- Don't duplicate information for screen readers
- Use `aria-hidden` where sensible
- Implement keyboard shortcuts where sensible (ESC, Enter, Tab, Arrow keys)
- Use ARIA roles and attributes to enhance accessibility.
- Ensure sufficient color contrast for text.
- Use focus styles to indicate focus state.
- Use landmarks (e.g., <nav>, <main>, <aside>) for screen readers.

## Styling

- Implement responsive design with Tailwind CSS; use a mobile-first approach.
- Use `clsx` for combining styles and conditional styles

## Routing and rendering

- Do data fetching in `loader` functions
- Move as much logic as possible to the `loader` functions
  - Filtering, sorting, pagination, etc
- Use `cacheHeader` from `pretty-cache-header` to set cache headers
  - Always set sMaxage and stale-while-revalidate
-
css
java
javascript
npm
pnpm
radix-ui
react
remix
+2 more
madebyarthouse/arthouse-starter-kit

Used in 1 repository

TypeScript
In this project we have a /web for frontend and a /Api for backend.

/web is a vite react project with tailwindcss and shadcn/ui.

/Api is a .NET 8 project with sqlite and entity framework.

# API Implementation Guide

You are a C#, .NET Core and integration expert, focusing on building clean, maintainable APIs using modern best practices.

## Core Setup

### Entity Framework + SQLite
```csharp
// Models/Note.cs
public class Note
{
    public int Id { get; set; }
    public required string Title { get; set; }
    public required string Content { get; set; }
    public DateTime CreatedAt { get; set; }
}

// Data/AppDbContext.cs
public class AppDbContext : DbContext
{
    public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) { }
    
    public DbSet<Note> Notes { get; set; }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        base.OnModelCreating(modelBuilder);

        modelBuilder.Entity<Note>(entity =>
        {
            entity.Property(e => e.Title).IsRequired();
            entity.Property(e => e.Content).IsRequired();
            entity.Property(e => e.CreatedAt).IsRequired();
        });

        // Seed data with fixed date to avoid migration issues
        modelBuilder.Entity<Note>().HasData(
            new Note
            {
                Id = 1,
                Title = "Welcome",
                Content = "Welcome to this workshop!",
                CreatedAt = new DateTime(2024, 1, 1, 0, 0, 0, DateTimeKind.Utc)
            }
        );
    }
}
```

### Controller Pattern
```csharp
[ApiController]
[Route("api/[controller]")]
public class NotesController : ControllerBase
{
    private readonly AppDbContext _context;

    public NotesController(AppDbContext context)
    {
        _context = context;
    }

    [HttpGet]
    public async Task<ActionResult<IEnumerable<Note>>> GetNotes()
    {
        return await _context.Notes.ToListAsync();
    }

    [HttpGet("{id}")]
    public async Task<ActionResult<Note>> GetNote(int id)
    {
        var note = await _context.Notes.FindAsync(id);
        if (note == null) return NotFound();
        return note;
    }

    [HttpPost]
    public async Task<ActionResult<Note>> CreateNote(Note note)
    {
        note.CreatedAt = DateTime.UtcNow;
        _context.Notes.Add(note);
        await _context.SaveChangesAsync();
        return CreatedAtAction(nameof(GetNote), new { id = note.Id }, note);
    }
}
```

### Program.cs Setup
```csharp
var builder = WebApplication.CreateBuilder(args);

// Add services
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

// Configure CORS
builder.Services.AddCors(options =>
{
    options.AddPolicy("AllowAll",
        builder => builder
            .AllowAnyOrigin()
            .AllowAnyMethod()
            .AllowAnyHeader());
});

// Add SQLite
builder.Services.AddDbContext<AppDbContext>(options =>
    options.UseSqlite(builder.Configuration.GetConnectionString("DefaultConnection")));

var app = builder.Build();

// Apply migrations on startup
using (var scope = app.Services.CreateScope())
{
    var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
    db.Database.Migrate();
}

// Configure pipeline
if (app.Environment.IsDevelopment())
{
    app.UseSwagger();
    app.UseSwaggerUI();
}

app.UseHttpsRedirection();
app.UseCors("AllowAll");
app.MapControllers();
```

### Configuration (appsettings.json)
```json
{
  "ConnectionStrings": {
    "DefaultConnection": "Data Source=app.db"
  },
  "Kestrel": {
    "Endpoints": {
      "Http": {
        "Url": "http://localhost:5001"
      }
    }
  }
}
```

## Project Structure
```
Api/
├── Controllers/
│   └── NotesController.cs
├── Models/
│   └── Note.cs
├── Data/
│   └── AppDbContext.cs
├── Migrations/
│   └── XXXXXX_InitialCreate.cs
├── Properties/
│   └── launchSettings.json
├── Program.cs
└── appsettings.json
```

## Development Workflow

### Database Management
- SQLite database is stored in `app.db`
- To reset database:
  1. Stop application
  2. Delete `app.db`
  3. Restart application (migrations will run automatically)

### Adding New Features
1. Create/modify models in `Models/`
2. Update `AppDbContext` if needed
3. Add new migration: `dotnet ef migrations add MigrationName`
4. Create/update controllers in `Controllers/`

### External API Integration
When integrating with external APIs:
1. Create interfaces in `Services/`
2. Implement service classes
3. Register services in `Program.cs`
4. Use dependency injection in controllers

Example:
```csharp
public interface IExternalService
{
    Task<Data> GetDataAsync();
}

public class ExternalController : ControllerBase
{
    private readonly IExternalService _service;

    public ExternalController(IExternalService service)
    {
        _service = service;
    }

    [HttpGet]
    public async Task<ActionResult<Data>> GetData()
    {
        return await _service.GetDataAsync();
    }
}
``` 


# Web Implementation Guide

This guide outlines the key technologies and patterns to follow when implementing features in this repository.

## Core Technologies

### TanStack Query
- Use TanStack Query for all data fetching and state management
- Implement custom hooks for data fetching using `useQuery` and `useMutation`
- Follow the pattern:
```typescript
export function useData() {
  return useQuery({
    queryKey: ['data'],
    queryFn: async () => {
      const response = await fetch('/api/data');
      return response.json();
    }
  });
}
```

### Tailwind CSS
- Use Tailwind CSS for all styling
- Follow the project's design system using custom colors and variables
- Utilize the `cn()` utility for conditional class names:
```typescript
import { cn } from "@/lib/utils";

export function Component({ className, ...props }) {
  return (
    <div className={cn("base-classes", className)} {...props}>
      {/* content */}
    </div>
  );
}
```

### shadcn/ui Components
- All shadcn/ui components are pre-installed and ready to use, if not, install by npx shadcn@latest add [component]
- Import components from `@/components/ui`
- Follow the component patterns:
```typescript
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";

export function Form() {
  return (
    <div>
      <Input placeholder="Enter text" />
      <Button>Submit</Button>
    </div>
  );
}
```

#### Available Components
1. **Directly Installable Components**
   ```bash
   npx shadcn@latest add accordion alert alert-dialog aspect-ratio avatar badge button card checkbox collapsible command context-menu dialog drawer dropdown-menu form hover-card input label menubar navigation-menu popover progress radio-group scroll-area select separator sheet skeleton slider switch table tabs textarea toast toggle toggle-group tooltip
   ```

2. **Composite Components** (built using other components)
   - Breadcrumb
   - Calendar
   - Carousel
   - Chart
   - Combobox (uses Command component)
   - Data Table (uses Table component)
   - Date Picker (uses Calendar component)
   - Input OTP
   - Pagination
   - Resizable
   - Sidebar
   - Sonner

When implementing new features, prefer using these pre-built components over creating custom ones. For composite components, refer to the shadcn documentation for implementation patterns.

## Best Practices

1. **Component Structure**
   - Keep components small and focused
   - Use TypeScript interfaces for props
   - Implement proper error boundaries
   - Use React.Suspense for loading states

2. **Data Fetching**
   - Always use TanStack Query hooks
   - Implement proper error handling
   - Use suspense mode when appropriate
   - Cache invalidation strategies

3. **Styling**
   - Use Tailwind CSS classes
   - Follow the design system
   - Maintain consistent spacing
   - Use responsive design patterns

4. **State Management**
   - Use TanStack Query for server state
   - React state for UI state
   - Context for theme/auth

5. **Performance**
   - Implement proper memoization
   - Use dynamic imports for code splitting
   - Optimize images and assets
   - Monitor bundle size

## File Structure
```
src/
├── components/
│   ├── ui/          # shadcn/ui components
│   └── features/    # feature-specific components
├── hooks/           # custom hooks
├── lib/            # utilities and helpers
└── pages/          # route components
```

## Example Implementation

```typescript
// src/features/users/use-users.ts
export function useUsers() {
  return useQuery({
    queryKey: ['users'],
    queryFn: async () => {
      const response = await fetch('/api/users');
      return response.json();
    }
  });
}

// src/features/users/users-list.tsx
import { useUsers } from './use-users';
import { Card } from '@/components/ui/card';

export function UsersList() {
  const { data, isLoading } = useUsers();

  if (isLoading) return <div>Loading...</div>;

  return (
    <div className="grid gap-4">
      {data.map((user) => (
        <Card key={user.id}>
          <CardHeader>
            <CardTitle>{user.name}</CardTitle>
          </CardHeader>
        </Card>
      ))}
    </div>
  );
}
```


bun
c#
css
html
javascript
react
rest-api
shadcn/ui
+4 more
WilliamAvHolmberg/bilberry-workshop

Used in 1 repository

Java
You are an expert in Java programming, Spring Boot, Spring Framework, Maven, JUnit, and related Java technologies.

Uygulama bir Gateway uygulamasıdır. Reactive programlama kullanılmaktadır. Tüm fonksiyonları buna göre hazırla.
Uygulamanın ana paket adı "tr.com.khg.services.gateway" dir ve src/main/java/tr/com/khg/services/gateway altında bulunur.

Kod yerleşimi
- Configuration sınıfları src/main/java/tr/com/khg/services/gateway/config altında bulunur.
- Entity sınıfları src/main/java/tr/com/khg/services/gateway/entity altında bulunur.
- Repository sınıfları src/main/java/tr/com/khg/services/gateway/repository altında bulunur.
- Service sınıfları src/main/java/tr/com/khg/services/gateway/service altında bulunur.
- Controller sınıfları src/main/java/tr/com/khg/services/gateway/web/rest altında bulunur.
- Model sınıfları src/main/java/tr/com/khg/services/gateway/model altında bulunur.
- Request sınıfları src/main/java/tr/com/khg/services/gateway/model/request altında bulunur.
- Response sınıfları src/main/java/tr/com/khg/services/gateway/model/response altında bulunur.

Gateway filter tanımlama
- Spring Cloud Gateway ile filter tanımlama yapılacaktır.
- Yeni eklenecek yeni tip filter tanımı için yeni bir entity tanımlanacak ve Route entity'si ile ilişkilendirilecektir.
- Filter entity'nin adı RouteXFilter gibi olacaktır.
- Route sınıfı içine OneToMany olarak eklenecek ve clearFilters metotu içinde clear edilecektir.
- Entity paketinde bulunan Enums paketinde bulunan FilterType enum'u içine yeni bir tip eklenecektir.
- Eklenen filter için repository paketi altına yeni bir repository tanımlanacak.
- Repository içine deleteByRoute adında bir method tanımlanacak. Ve bu metot modifying ve transactional olacak.
- Bu filtreyi ekleme için Filtre Adına uygun şekilde bir ekleme sınıfı tanımlanacak. Örneğin isim NewFilter gibi olacaktır.
- Yeni bir route ekleme isteğinde kullanılan RouteRequest sınıfının içinde bulunan Filter tipindeki sınıf içine yeni filtre ekleme sınıfı eklenecektir.
- Listeleme için Filter Response sınıfı oluşturulacak. RouteResponse sınıfının içinde bulunan FiltersResponse tipindeki sınıf içine yeni filtre listeme sınıfı eklenecektir.
- Utils atında bulunan FilterUtils sınıfı içine yeni eklenen filtre için metot eklenecektir.
- Route service içinde route ekleme ve güncelleme metotları içine yeni eklenen filtreyi diğer filtrelerde oluduğu gibi ekleme işlemi ve güncelleme işlemini yapılacak şekilde güncellenecektir.
- Route service içinde createRouteFromRequest metotu içinde yeni varsayılan bir route tanımı içine yeni eklenen filtrede eklenecektir. Aynı fonksiyon içinde route değişkenine filtre utils sınıfı ile oluşturulan yeni filtre listesi setlenecektir.
- Route service içinde updateRouteFromRequest metotu içinde repository içindeki deleteByRoute ile var olan filtreler silinecek ve yeni eklenen filtreler eklenecektir.
- Route service içinde bulunan createRouteDefinition metotu içinde yeni eklenen filtre eğer istek içinde gönderilmişse route definition içinde set edilecektir.
- Route service içinde bulunan mapToRouteResponse metotu içine yeni eklenen filter'ı response içinde gösterecek şekilde güncellenecektir.

Code Style and Structure
- Write clean, efficient, and well-documented Java code with accurate Spring Boot examples.
- Use Spring Boot best practices and conventions throughout your code.
- Implement RESTful API design patterns when creating web services.
- Use descriptive method and variable names following camelCase convention.
- Structure Spring Boot applications: controllers, services, repositories, models, configurations.
- Tüm component, service, restcontroller sınıflarında yoksa RequiredArgsConstructor anotasyonu eklenecek ve dependency injection yaparken inject edilecek sınıf private final ile eklenecektir.

Spring Boot Specifics
- Use Spring Boot starters for quick project setup and dependency management.
- Implement proper use of annotations (e.g., @SpringBootApplication, @RestController, @Service).
- Utilize Spring Boot's auto-configuration features effectively.
- Implement proper exception handling using @ControllerAdvice and @ExceptionHandler.

Naming Conventions
- Use PascalCase for class names (e.g., UserController, OrderService).
- Use camelCase for method and variable names (e.g., findUserById, isOrderValid).
- Use ALL_CAPS for constants (e.g., MAX_RETRY_ATTEMPTS, DEFAULT_PAGE_SIZE).

Java and Spring Boot Usage
- Use Java 17 or later features when applicable (e.g., records, sealed classes, pattern matching).
- Leverage Spring Boot 3.x features and best practices.
- Use Spring Data JPA for database operations when applicable.
- Implement proper validation using Bean Validation (e.g., @Valid, custom validators).

Configuration and Properties
- Use application.properties or application.yml for configuration.
- Implement environment-specific configurations using Spring Profiles.
- Use @ConfigurationProperties for type-safe configuration properties.

Dependency Injection and IoC
- Use constructor injection over field injection for better testability.
- Leverage Spring's IoC container for managing bean lifecycles.

Testing
- Test yazarken, `throws` ifadesi yerine `@SneakyThrows` anotasyonunu kullanın.
- Write unit tests using JUnit 5 and Spring Boot Test.
- Use MockMvc for testing web layers.
- Implement integration tests using @SpringBootTest.
- Use @DataJpaTest for repository layer tests.

Performance and Scalability
- Implement caching strategies using Spring Cache abstraction.
- Use async processing with @Async for non-blocking operations.
- Implement proper database indexing and query optimization.

Security
- Implement Spring Security for authentication and authorization.
- Use proper password encoding (e.g., BCrypt).
- Implement CORS configuration when necessary.

Logging and Monitoring
- Use SLF4J with Logback for logging.
- Implement proper log levels (ERROR, WARN, INFO, DEBUG).
- Use Spring Boot Actuator for application monitoring and metrics.

API Documentation
- Use Springdoc OpenAPI (formerly Swagger) for API documentation.

Data Access and ORM
- Use Spring Data JPA for database operations.
- Implement proper entity relationships and cascading.
- Use database migrations with Flyway.
- Flyway migration dosyalarının isimleri src/main/resources/db/migration altında bulunan en büyük sayılı migration dosyasının sayısından bir fazlası XX olmak kaydıyla V1_XX__Migration_Name.sql olmalıdır. Migration adının her kelimesi büyük harf ile başlayan ve aralarında alt çizgi ile ayrılmış olmalıdır.
- Migration dosyaları Postgresql'e göre yazılacak ve id için bigserial tipi kullanılacaktır.

Build and Deployment
- Use Maven for dependency management and build processes.
- Implement proper profiles for different environments (dev, test, prod).
- Use Docker for containerization if applicable.

Follow best practices for:
- RESTful API design (proper use of HTTP methods, status codes, etc.).
- Microservices architecture (if applicable).
- Asynchronous processing using Spring's @Async or reactive programming with Spring WebFlux.

Adhere to SOLID principles and maintain high cohesion and low coupling in your Spring Boot application design.
Always keep the code clean, well-documented, and easy to maintain.

## RFC Kuralları
- Gateway Predicate testleri için RFC'ler RFC-00X formatında numaralandırılır
- Her yeni predicate için sıradaki numara kullanılır
- RFC'ler docs/rfc/ klasörü altında tutulur
- RFC dosya adı formatı: RFC-XXX-Name.md

## RFC İçerik Yapısı
1. Durum bilgisi (Taslak, İnceleme, Onaylandı, Uygulandı)
2. Özet
3. Test gereksinimleri
   - Test edilecek sınıflar
   - Test senaryoları
   - Test ortamı gereksinimleri
   - Örnek test kodları
4. Test coverage gereksinimleri
5. Gelecek adımlar
6. Referanslar

## RFC Mapping
- RFC-001: After Route Predicate Factory Tests
- RFC-002: Before Route Predicate Factory Tests

## Test Paket Yapısı
- Entity testleri: src/test/java/tr/com/khg/services/gateway/entity
- Repository testleri: src/test/java/tr/com/khg/services/gateway/repository
- Request/Response model testleri: src/test/java/tr/com/khg/services/gateway/model
- Test fixture'ları: src/test/java/tr/com/khg/services/gateway/utils/TestFixtures.java

## Test Adlandırma Kuralları
- Test sınıfı adı: TestedClass + Test (örn: RouteAfterPredicationTest)
- Test metodu adı: when + Scenario + then + ExpectedResult
- Test fixture metodu adı: create + EntityName (örn: createTestRoute)

## Test Coverage Gereksinimleri
- Entity sınıfları: minimum %90
- Repository sınıfları: minimum %85
- Request/Response modelleri: minimum %90

## Test Teknolojileri
- JUnit 5
- AssertJ
- Mockito
- H2 Database (test veritabanı)
- @DataJpaTest (repository testleri için)
- @SpringBootTest (entegrasyon testleri için)

## Test Kuralları ve Yapısı

### Gateway Predicate Testleri
- Her predicate için ayrı bir RFC dokümanı oluşturulmalı (RFC-00X formatında)
- Her RFC için ayrı bir test sınıfı yazılmalı
- Test sınıfları integration test olarak tasarlanmalı
- WebTestClient kullanılarak HTTP istekleri test edilmeli
- MockServer ile hedef servisler simüle edilmeli

### Test Sınıfı Yapısı
```java
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class RoutePredicateTest {
  @Autowired private WebTestClient webTestClient;
  @Autowired private RouteService routeService;
  @Autowired private ApiProxyRepository apiProxyRepository;
  @Autowired private RouteRepository routeRepository;
  @Autowired private RouteDefinitionLocator routeDefinitionLocator;
  @Autowired private RouteDefinitionWriter routeDefinitionWriter;
  @Autowired private ApplicationEventPublisher eventPublisher;

    private ClientAndServer mockServer;
    private final String testProxyName = "test-proxy";

  @BeforeEach
  void setUp() {
    apiProxyRepository.deleteByName(testProxyName);
    apiProxyRepository.save(
        ApiProxy.builder().name(testProxyName).uri("http://localhost:8081").build());
    mockServer = ClientAndServer.startClientAndServer(8081);
  }

  @AfterEach
  void tearDown() {
    routeRepository.deleteAll();
    routeDefinitionLocator
        .getRouteDefinitions()
        .flatMap(
            routeDefinition ->
                routeDefinitionWriter
                    .delete(Mono.just(routeDefinition.getId()))
                    .onErrorResume(e -> Mono.empty()))
        .blockLast();

    eventPublisher.publishEvent(new RefreshRoutesEvent(this));

    mockServer.stop();
  }
}
```

### Test Metot Adlandırma
- Format: when[Senaryo]_then[BeklenenSonuç]
- Örnek: whenRouteActivationTimeIsInFuture_thenRouteShouldBeInactive()

### Test Senaryoları İçeriği
1. Pozitif test senaryoları
2. Negatif test senaryoları
3. Edge case'ler
4. Zaman bazlı senaryolar (gerektiğinde)
5. Hata durumları

### Test Ortam Gereksinimleri
- Spring Boot Test ortamı (@SpringBootTest)
- H2 test veritabanı
- MockServer (hedef servis simülasyonu)
- WebTestClient
- TestContainers (gerektiğinde)

### Test Coverage Hedefleri
- Integration testleri: minimum %85
- Unit testler: minimum %90
- Entity testleri: minimum %90
- Repository testleri: minimum %85
- Controller testleri: minimum %85

### Test Fixture Kullanımı
- src/test/java/tr/com/khg/services/gateway/utils/TestFixtures.java içinde tanımlanmalı
- Her entity için ayrı factory metotları olmalı
- Test verisi oluşturma metotları statik olmalı
```java
public class TestFixtures {
    public static Route createTestRoute() {
        // Test route oluşturma
    }

    public static ApiProxy createTestProxy() {
        // Test proxy oluşturma
    }
}
```

### Test Temizliği
- Her test öncesi veritabanı temizlenmeli
- Test sonrası kaynaklar serbest bırakılmalı
- MockServer her test sonrası resetlenmeli

### Test Dokümantasyonu
- Her test sınıfı için JavaDoc yazılmalı
- Karmaşık test senaryoları için metot seviyesinde açıklama eklenmeli
- Test hazırlık ve temizlik adımları belgelenmeli

### Test Kategorileri
1. Entity Testleri
   - JPA ilişkileri
   - Entity validasyonları
   - Lifecycle metotları

2. Repository Testleri
   - CRUD operasyonları
   - Özel sorgu metotları
   - Pagination

3. Integration Testleri
   - Predicate davranışları
   - Route yönetimi
   - Filter zincirleri

4. Performance Testleri
   - Yük testleri
   - Stress testleri
   - Response time ölçümleri

### Test Araçları ve Teknolojiler
- JUnit 5
- AssertJ
- Mockito
- H2 Database
- WebTestClient
- MockServer
- TestContainers (gerektiğinde)
- Spring Boot Test
- @DataJpaTest
- @SpringBootTest

### Test Raporlama
- JaCoCo test coverage raporları
- Surefire test raporları
- Failsafe integration test raporları
bun
docker
golang
java
postgresql
react
rest-api
solidjs
+1 more

First seen in:

khg-development/gateway

Used in 1 repository