ifixkart-admin/.agents/skills/fastapi_architecture/SKILL.md
Adithiyan bbd3a3e959 feat: initial commit — full platform snapshot
- 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
2026-10-13 12:59:47 +05:30

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

  1. Router Separation: Place routes inside domain-specific submodules and register them on the main router.
  2. Pydantic Schemas: Separate request body schemas, response schemas, and database entity models.
  3. Dependency Injection: Use Depends for database sessions, security authentication, and permissions.
  4. Error Handling: Throw structured HTTPExceptions with clear detail messages rather than generic exceptions.
  5. Types and Documentation: Add typing annotations and descriptions to all endpoint parameters for auto-generated OpenAPI documentation.