← ClaudeAtlas

fastapi-backend-best-practiceslisted

Best practices guide for FastAPI asynchronous backend development. Includes project structure, async patterns, domain modeling (CRUD/CQRS/Event-Driven/Saga), API design, testing, security, and deployment. Database implementation is delegated to a separate DB skill, and this skill provides DB-agnostic patterns and interfaces. Use this skill in the following situations: - FastAPI project creation, design, code review, and refactoring requests - Questions related to Python async backend API development - Pydantic modeling, domain model design, Repository interface design - Keywords such as "FastAPI", "backend API", "async server", "async pattern" - Microservices, CQRS, Event-Driven Architecture design - API Authentication/Authorization, middleware, error handling, performance optimization - pytest-asyncio based testing, Docker deployment
TeiNam/my_harness_for_claude_code · ★ 0 · API & Backend · score 74
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