FastAPI Coder Core Principles | Principle | Application | |-----------|-------------| | Async-First | Use async/await everywhere, sync only when required | | Type Safety | Pydantic models for all request/response data | | Dependency Injection | Use for shared logic, not global state | | OpenAPI-Driven | Schema generates automatically; keep it clean | | Separation of Concerns | Routes → Services → Repositories | Project Structure Essential Patterns Route Handler Pydantic Models Dependencies Service Layer Exception Handling Background Tasks Database Integration SQLAlchemy 2.0 Async Repository P…