This Introduction is the starting point. Use it to figure out where to go next.
FastAPI Template is a production-oriented FastAPI boilerplate. It ships the cross-cutting concerns most backends need: authentication, logging, rate limiting, health checks, pagination, testing, and CI. You start on domain logic, not infrastructure.
| Area | What ships out of the box |
|---|---|
| Structure | A consistent, domain-first layout with src/core/ for shared infrastructure. |
| Auth | JWT authentication and basic user management (register, login, /me). |
| Rate limiting | slowapi on the sensitive endpoints. |
| CORS and headers | Environment-driven CORS and security headers. |
| Logging | structlog: console in dev, JSON in prod, with a per-request X-Request-ID. |
| Health | /healthz (liveness) and /readyz (real DB probe). |
| Pagination | A reusable cursor-pagination Page[T] envelope. |
| Data | PostgreSQL and Alembic migrations, uv, and Docker. |
| Quality | pytest, Ruff, pre-commit, and a GitHub Actions CI pipeline. |
Pick the path that matches what you are doing.
- Read Technology Stack to understand which tools the template adopts.
- Read Project Structure to see how the code is organised.
- Start with Quickstart to spin up the stack.
- Then read Project Structure and Conventions so your new code follows the same rules.
- Read Local Development, Configuration, and Database & Migrations.
- Testing explains the test suite and policy.
- Contributing explains the conventions for proposing changes.
- Start at Contributing.
New here? Read Conventions next. It covers formatting, imports, and the Pydantic and SQLAlchemy style.