A production-ready, highly opinionated FastAPI and PostgreSQL template designed to save you 2 weeks of boilerplate setup at the start of your next project.
It enforces good practices like Dependency Injection, clean architecture, and modern configuration management using CUE.
💡 Note: The codebase in this repository was entirely written by a human. The README documentation itself was generated by AI.
- Modern Tooling & Quality: Uses
uvfor blazing-fast dependency management,justas a modern command runner, andpre-commithooks to keep your code clean automatically. - Type Checking: Uses
tyinstead ofmypyfor fast, seamless static type checking. - Config Generation with CUE: Automatically generate
.envfiles, NGINX configs, anddocker-composeYAMLs for different environments (dev, e2e, prod) using CUE. - Clean Architecture: Built-in Dependency Injection
containers.py. SQLAlchemy tables intables.pymapped cleanly to domain models inmodels.py. - Ready-to-use Auth: Simple, pre-built
login.pyandregister.pyendpoints out of the box, powered byJWTTokenService. - Database & Migrations: PostgreSQL setup with Alembic migrations running seamlessly in containers.
- Dockerized: Extremely small Dockerfile optimized for fast builds and deployments.
- Testing: E2E testing setup (
test_endpoints) and integration tests powered bypytest.
Before you start, make sure you have the following installed:
1. Generate configurations and environments:
just export-cue2. Run the application locally: (it runs db and migrations)
just run