// the find
rafsaf/minimal-fastapi-postgres-template
minimal-fastapi-postgres-template based on official template but rewritten
A FastAPI + PostgreSQL starter template with auth baked in: JWT access tokens, database-persisted refresh tokens, async SQLAlchemy 2.0, and Alembic migrations. Aimed at developers who want a sane starting point rather than building auth and session management from scratch every time.
Refresh tokens stored in the database rather than as JWTs — means you can actually revoke them, which most templates skip. Async SQLAlchemy 2.0 with proper `Mapped`/`mapped_column` typed columns, so you get real IDE autocomplete instead of column attribute guessing. Test setup runs migrations against a real database per test session (not mocked), and uses pytest-xdist to parallelize across CPUs — the 100% coverage requirement is enforced, not aspirational. Tracks Python 3.14 and PostgreSQL 18 actively; the README links to a v7 blog post explaining the update rationale.
The 'minimal' in the name is doing a lot of work — you still get a full auth system, JWT handling, bcrypt password hashing, and Alembic wiring out of the box, which is either a feature or a problem depending on what you actually need. Open registration by default (the README acknowledges this but leaves it to you to fix, which is the kind of thing that bites people in staging). No rate limiting or brute-force protection on the login endpoint — database-persisted refresh tokens protect against replay but there's nothing slowing down password guessing. The step-by-step Pet example adds noise you'll delete immediately; useful once, annoying to clean up.