finalsoa_react Cursor Rules — Cursor Rules | Neura Market
    Neura MarketNeura Market/Cursor
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsBlogVideosGuidesCoursesCommunityExtensionsTrendingGenerate
    CursorRulesfinalsoa_react Cursor Rules
    Back to Rules
    Frontend

    finalsoa_react Cursor Rules

    KhangSoDzach April 15, 2026
    0 copies 0 downloads

    - **Backend:** FastAPI (Python 3.12+), SQLModel, SQLAlchemy, Pydantic v2.

    Rule Content
    # SkyHome Project Rules & Coding Standards
    
    ## 1. Tech Stack Context
    - **Backend:** FastAPI (Python 3.12+), SQLModel, SQLAlchemy, Pydantic v2.
    - **Database:** PostgreSQL (psycopg2-binary), sử dụng SQLModel để định nghĩa Models và Schemas.
    - **Frontend:** React 18 (Vite + TypeScript), Chakra UI, Axios, React Hook Form, TanStack Query.
    - **Deployment:** Vercel (Frontend & Serverless Backend), Render (Alternative Backend).
    
    ## 2. Backend Coding Standards (FastAPI)
    - **Structure:** - Routes: `backend/app/api/routes/`.
      - Models (DB): `backend/app/models/`.
      - Schemas (Pydantic): `backend/app/schemas/`.
      - Core logic: `backend/app/core/`.
    - **Naming:** Sử dụng `snake_case` cho hàm, biến và file Python.
    - **Rules:**
      - Luôn sử dụng `async def` cho các endpoint API.
      - Sử dụng `SQLModel` thay vì SQLAlchemy thuần khi định nghĩa bảng để tận dụng type-hinting.
      - Endpoint prefix luôn là `/api/v1`.
      - Luôn bao gồm xử lý lỗi với `HTTPException` và logging.
    
    ## 3. Frontend Coding Standards (React + TS)
    - **Structure:**
      - Components: `src/components/`.
      - Pages: `src/pages/`.
      - API Services: `src/services/api.ts`.
      - Themes: `src/theme/`.
    - **Naming:** - Component & File: `PascalCase` (ví dụ: `AdminDashboard.tsx`).
      - Biến & Hàm: `camelCase`.
    - **Rules:**
      - Sử dụng Functional Components và Hooks.
      - Sử dụng Chakra UI cho styling để đảm bảo tính đồng nhất giao diện.
      - Quản lý API calls thông qua file `src/services/api.ts`, không gọi trực tiếp axios trong component.
      - Luôn định nghĩa Interface/Type cho dữ liệu trả về từ API.
    
    ## 4. Deployment & GitHub Integration
    - Backend có tích hợp `mangum` để chạy dạng Serverless trên Vercel.
    - Khi sửa đổi Backend, hãy kiểm tra tính tương thích với file `vercel.json` và `render.yaml`.
    - Luôn giữ file `requirements.txt` và `package.json` cập nhật khi thêm thư viện mới.
    
    ## 5. Interaction Instructions for AI
    - Khi code tính năng mới, hãy kiểm tra file `@backend/app/api/main.py` và `@src/services/api.ts` để đảm bảo route được đăng ký đúng.
    - Luôn ưu tiên viết Unit Test (Sử dụng `pytest` cho backend và `playwright` cho frontend).
    - Nếu gặp lỗi, hãy đọc nội dung file `@DEPLOYMENT_GUIDE.md` để hiểu quy trình sửa lỗi hệ thống.

    Tags

    reacttypescriptpythonfastapi

    Comments

    More Rules

    View all
    Web Development

    Next.js 15 + TypeScript Cursor Rules

    Comprehensive .cursorrules file for Next.js 15 App Router projects with TypeScript, enforcing server components by default, proper use of "use client" directive, and App Router conventions.

    C
    Community
    Backend Development

    Python FastAPI Best Practices Rules

    Cursor rules for Python FastAPI projects enforcing async patterns, Pydantic v2 models, dependency injection, and proper error handling.

    C
    Community
    Frontend Development

    React + TypeScript Component Rules

    Rules for consistent React component development with TypeScript interfaces, proper hook patterns, and component composition.

    C
    Community
    AI/ML

    Cursor Agent Mode Configuration

    Rules optimizing Cursor Agent mode behavior including multi-file editing context, session management, and autonomous task completion patterns.

    C
    Cursor Team
    Frontend Development

    Tailwind CSS + shadcn/ui Rules

    Cursor rules for projects using Tailwind CSS with shadcn/ui component library, enforcing consistent utility class usage and component patterns.

    C
    Community
    Backend Development

    Go Backend Service Rules

    Rules for Go backend services enforcing idiomatic Go patterns, proper error handling, and clean architecture conventions.

    C
    Community

    Stay up to date

    Get the latest Cursor prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for Cursor and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.