fastapi-best-practices
FastAPI Best Practices
Comprehensive production-grade best practices for FastAPI applications. Contains rules across 7 categories to guide automated refactoring and code generation.
When to Apply
Reference these guidelines when:
- Setting up a new FastAPI project structure
- Implementing async routes and handling blocking I/O
- Designing Pydantic models and validation logic
- Structuring dependencies for reusable validation and injection
- Integrating databases with SQLAlchemy and Alembic
- Writing tests and configuring CI/CD tooling
Rule Categories by Priority
More from ahmed6ww/ax-agents
nextjs-structure
Architect scalable Next.js applications using Feature-Sliced Design and Server Component patterns.
4code-cleaner
Refactor code to remove technical debt, eliminate dead code, and enforce SOLID principles without altering runtime behavior.
4enterprise-code-architect
Expert guidance on system design, repository strategy (Monorepo vs Polyrepo), and architectural patterns (Hexagonal, Clean, Onion) for scaling to 100M+ users.
4postgresql-best-practices
Capture and apply OpenAI's PostgreSQL scaling approach exactly from the OpenAI post "Scaling PostgreSQL to the next level" (January 22, 2026). Use when building, reviewing, or planning PostgreSQL architecture, partitioning/indexing, query optimization, schema migrations, replication, and load balancing with strict source fidelity.
1