fastapi-backend-best-practiceslisted
Install: claude install-skill TeiNam/my_harness_for_claude_code
# FastAPI Backend Best Practices
## Overview
A practical guide for Async-first FastAPI backend development.
All code is async/await based, choosing appropriate modeling patterns according to business complexity.
## Reference Guide
Read and apply references suited to business needs:
| File | Content | When to read |
|------|---------|--------------|
| `project-structure/README.md` | Project layout, config, Lifespan, DI | Starting a new project, structural refactoring |
| `async-patterns/README.md` | Async patterns, concurrency, background tasks, SSE/WebSocket | Designing async processing, performance optimization |
| `domain-modeling/README.md` | Pydantic modeling for CRUD/CQRS/Event-Driven/Saga/DDD | Domain model design, structuring business logic |
| `api-design/README.md` | Routers, middleware, error handling, pagination, versioning | API endpoint design, error handling |
| `testing/README.md` | httpx AsyncClient, fixtures, mocking, integration testing | Writing tests, TDD |
| `security/README.md` | JWT, OAuth2, CORS, Rate Limiting, input validation | Implementing auth, security checks |
| `deployment/README.md` | Docker, uvicorn tuning, health checks, monitoring | Deployment, performance tuning, operations |
> **Mounting DB Skill**: Database implementations (ORM, drivers, migrations, query optimization) rely on mounting a separate DB skill. This skill only provides DB-agnostic Repository Protocols and domain patterns.
## Core Principles
### 1. Async-First
```python