fastapi-backend-template
๐ Production-ready FastAPI backend template with async support, PostgreSQL, Redis, comprehensive testing, Docker setup and modern development practices
pythonapidockerredistemplateboilerplatejwtauthenticationbackendasyncdocker-composerest-api
FreeRepo
Overview
FastAPI Clean Project is a production-ready boilerplate for building backend APIs with FastAPI, PostgreSQL and Redis. It provides a clean architecture with async support, JWT authentication, comprehensive testing, structured logging and Docker deployment setup, making it suitable for teams building scalable web applications or microservices that need security, observability and maintainable code from the start.
Features
async-first designjwt authenticationpassword hashing with bcryptrate limiting with rediscors configurationaudit loggingip filteringcomprehensive test suitetransaction-based test isolationasync test fixturesstructured logginghealth check endpointsrequest/response loggingsensitive data maskingdocker compose setupmulti-stage dockerfileuv package managermakefile commandsenvironment-based configurationhot reloadpgadmin integrationredis cachingalembic migrationsrole-based access controlsql injection protectionerror handlingapi documentation toggleperformance monitoringcorrelation ids
Feature Flags
userDashboardauthenticationblogemailspaymentsfileUploadsauthorizationteamsOrgsnotificationsapiDocscachingrateLimitingmapsrateLimitloggingauditLogginghealthCheckerrorHandlingcorsdockertestingmigrationsmonitoringperformanceMonitoring
Recommended Use Cases
production-ready api backendmicroservicesrest api developmentasync web applicationsscalable backend systems
Frontend
None
Backend
fastapipythonsqlmodelalembicpostgresqlredis
Auth Providers
jwt
Deployment Targets
dockerdocker-compose
Payment Providers
None
Quick Facts
โญ Stars
0
๐ด Forks
0
๐งพ License
mit
๐ Active
Yes
๐ Last Commit
2025-09-18T14:12:53.000Z
GitHub
Stack
Framework
fastapi
Language
python
Database
postgresql
Auth
jwt, bcrypt
ORM
sqlmodel
Testing
pytest
Monitoring
loguru
Logging
loguru
CI
pre-commit
Data Layer
Databases
postgresql, redis
ORM
sqlmodel
UI Stack
Developer Experience
Docker
Yes
Tests
Yes
Quickstart
Yes
env.example
Yes
CI
github-actions, pre-commit, ruff
Pricing
Classification
free
Selected
โ
Notes
MIT licensed open source project