mirror of
https://github.com/sanjeed5/awesome-cursor-rules-mdc.git
synced 2026-11-28 21:52:55 +08:00
rename folder
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
---
|
||||
description: Focuses on performance optimization techniques for the Python backend.
|
||||
globs: backend/src/**/*.py
|
||||
---
|
||||
- Minimize blocking I/O operations using async functions.
|
||||
- Implement caching strategies for frequently accessed data using Redis or in-memory stores.
|
||||
- Use lazy loading techniques for large datasets and API responses.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
description: Rules regarding docker usage in the project.
|
||||
globs: Dockerfile*
|
||||
---
|
||||
- Use Docker for containerization and ensure easy deployment.
|
||||
- Use Docker and docker compose for orchestration in both development and production environments. Avoid using the obsolete `docker-compose` command.
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
---
|
||||
description: Defines conventions specific to FastAPI usage in the backend.
|
||||
globs: backend/src/**/*.py
|
||||
---
|
||||
- Follow RESTful API design principles.
|
||||
- Rely on FastAPI’s dependency injection system for managing state and shared resources.
|
||||
- Use SQLAlchemy 2.0 for ORM features, if applicable.
|
||||
- Ensure CORS is properly configured for local development.
|
||||
- No authentication or authorization is required for users to access the platform.
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
---
|
||||
description: Focuses on performance optimization techniques for the TypeScript frontend.
|
||||
globs: frontend/src/**/*.ts*
|
||||
---
|
||||
- Favor server-side rendering and avoid heavy client-side rendering where possible.
|
||||
- Implement dynamic loading for non-critical components and optimize image loading using WebP format with lazy loading.
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
---
|
||||
description: Applies general coding style and structure rules for Python code in the backend.
|
||||
globs: backend/src/**/*.py
|
||||
---
|
||||
- Expert in Python, FastAPI, scalable API development.
|
||||
- Write concise, technical responses with accurate examples in Python.
|
||||
- Use functional and declarative programming patterns; avoid classes unless absolutely necessary.
|
||||
- Prefer iteration and modularization over code duplication.
|
||||
- Use descriptive variable names with auxiliary verbs (e.g., `is_active`, `has_permission`).
|
||||
- Follow proper naming conventions: use lowercase with underscores (e.g., `routers/user_routes.py`).
|
||||
- Use `def` for pure functions and `async def` for asynchronous operations.
|
||||
- Use Python type hints for all function signatures. Prefer Pydantic models for input validation.
|
||||
- Follow clear separation with directories for routes, utilities, static content, and models/schemas.
|
||||
- Use the "Receive an Object, Return an Object" pattern.
|
||||
- Handle errors at the beginning of functions with early returns.
|
||||
- Use guard clauses and avoid deeply nested if statements.
|
||||
- Implement proper logging and custom error types.
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
---
|
||||
description: Applies general coding style and structure rules for TypeScript code in the frontend.
|
||||
globs: frontend/src/**/*.ts*
|
||||
---
|
||||
- Expert in TypeScript, React, Tailwind, and Shadcn UI.
|
||||
- Write concise, technical responses with accurate examples in TypeScript.
|
||||
- Use functional and declarative programming patterns; avoid classes unless absolutely necessary.
|
||||
- Prefer iteration and modularization over code duplication.
|
||||
- Use descriptive variable names with auxiliary verbs (e.g., `isLoading`, `hasError`).
|
||||
- Follow proper naming conventions: use lowercase with dashes for directories (e.g., `components/auth-wizard`).
|
||||
- Use TypeScript for all code. Prefer interfaces over types. Avoid enums; use maps instead.
|
||||
- Write all components as functional components with proper TypeScript interfaces.
|
||||
- Implement responsive design using Tailwind CSS with Shadcn UI, adopting a mobile-first approach.
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
---
|
||||
description: Defines conventions and optimizations for React frontend development.
|
||||
globs: frontend/src/**/*.ts*
|
||||
---
|
||||
- Optimize Web Vitals (LCP, CLS, FID).
|
||||
- Limit `use client` hooks to small, specific components for Web API access.
|
||||
Reference in New Issue
Block a user