FastAPI-Template
A production-ready FastAPI backend template with clean architecture. 一个功能完整、架构清晰的企业级FastAPI后端模板,专为团队开发设计,开箱即用。
pythonapitemplateboilerplatedatabaseauthenticationasyncswaggeropenapiuvicornstarlettepydantic
Overview
This is an enterprise-grade FastAPI backend template designed for team development that helps you ship fast with a complete, well-structured codebase. Built on FastAPI, Tortoise ORM, PostgreSQL/SQLite and Python 3.11+, it includes three-layer architecture, JWT authentication with RBAC permissions, rate limiting, file management, Redis caching and comprehensive security features like password policies and audit logging, making it suitable for building scalable admin systems, e-commerce platform
Features
three-layer-architecturerbac-permissionsuser-managementrole-managementmenu-managementfile-managementdepartment-managementaudit-loggingjwt-authenticationtoken-refresh-mechanismrate-limitingpassword-strength-validationcors-protectionxss-protectioncsrf-protectionclickjacking-protectiondatabase-migrationshealth-checksredis-cachingconnection-poolingasync-supporttype-annotationsapi-documentationenvironment-validation
Feature Flags
userDashboardauthenticationsubscriptionsbloglandingpagepaymentsfileUploadsstoragerealtimeauthorizationteamsOrgsloggingErrorTrackingjobsQueuenotificationsgraphqlapiDocscachingrateLimitingformsValidationmultitenancy
Recommended Use Cases
enterprise-backend-servicesadmin-management-systemsecommerce-platformsmobile-app-apissaas-platformsmulti-tenant-systems
Frontend
None
Backend
fastapiuvicornstarlettepydantictortoise-ormaerichpyjwtslowapilogururedis
Auth Providers
jwt
Deployment Targets
dockerself-hosted
Payment Providers
None
Quick Facts
Stack
Framework
fastapi
Language
python
Database
postgresql, sqlite
Auth
jwt
ORM
tortoise-orm
Testing
pytest
Data Layer
Databases
postgresql, sqlite, redis
ORM
tortoise-orm
UI Stack
Developer Experience
Docker
Yes
Tests
Yes
Quickstart
Yes
env.example
Yes
Pricing
Classification
free
Selected
—
Notes
Open source project under MIT license