- Backend: FastAPI app with all models, services, schemas, routes - Admin Panel: Next.js dashboard with all modules (CRM, POS, repairs, warranties, billing, notifications, etc.) - Ecommerce: storefront (submodule) + product catalog - AI Agents: .agents/ skill library for Antigravity IDE - Docs: architecture, billing, notification gateway markdown - Submodules: Backend/OpenWA, Ecommerce/File 2/storefront
1 KiB
1 KiB
| name | description |
|---|---|
| FastAPI Architecture | Enforces standards for FastAPI route controllers, Pydantic data schemas, and dependency injection. |
Skill: FastAPI Architecture
1. Purpose
Maintain a uniform, scalable structure in the backend application, ensuring separation of routing, business logic, and database access.
2. When to Use
Before editing or adding backend controllers, routers, or schemas.
3. Step-by-Step Checklist
- Router Separation: Place routes inside domain-specific submodules and register them on the main router.
- Pydantic Schemas: Separate request body schemas, response schemas, and database entity models.
- Dependency Injection: Use
Dependsfor database sessions, security authentication, and permissions. - Error Handling: Throw structured HTTPExceptions with clear detail messages rather than generic exceptions.
- Types and Documentation: Add typing annotations and descriptions to all endpoint parameters for auto-generated OpenAPI documentation.