full-stack-fastapi-template
fastapiMIT活跃维护用 FastAPI + React + PostgreSQL 搭好的全栈项目脚手架,自带 JWT 登录、Docker Compose 和 CI 配置,省去从零搭建后端接口、前端页面和部署流程的麻烦。
Full-stack web application template with FastAPI, React, SQLModel, PostgreSQL, Vite, Tailwind CSS, shadcn/ui, FastAPI Cloud, and Docker Compose.
README 里没有找到可直接复制的安装命令,请到 README 或官方文档查看安装方式。
项目说明
这个项目的说明还在生成中,先参考下面「最近发版」和 README。
- 0.12.0最新正式版2026-08-12 · 2026-08-12 08:51 UTC
- 0.11.12026-08-11 · 2026-08-11 20:10 UTC
查看更新说明
Refactors
- ♻️ Simplify Docker Compose deployment. PR #2435 by @tiangolo.
- ♻️ Migrate to
DATABASE_URLinstead of separate variables. PR #2184 by @patrick91.
Internal
- ⬆ Bump the npm-packages group across 1 directory with 33 updates. PR #2433 by @dependabot[bot].
- 0.11.02026-08-11 · 2026-08-11 09:36 UTC
查看更新说明
Features
- ✨ Add react-email for email templates. PR #2421 by @alejsdev.
- 🔧 Use FastAPI entrypoint. PR #2360 by @tiangolo.
- ♻️ Add library-skills for FastAPI and SQLModel. PR #2354 by @tiangolo.
Fixes
Refactors
- ♻️ Remove Copier project generation. PR #2430 by @tiangolo.
- ♻️ Simplify CORS configuration. PR #2429 by @tiangolo.
- ♻️ Use
FASTAPI_ENVfor development. PR #2427 by @tiangolo. - ♻️ Run database setup explicitly before startup, no need for prestart. PR #2426 by @tiangolo.
- ♻️ Require explicit SECRET_KEY. PR #2425 by @tiangolo.
- ♻️ Simplify uv workspace setup. PR #2423 by @tiangolo.
- ♻️ Use FastAPI entrypoint in Compose. PR #2420 by @tiangolo.
- ♻️ Require non-empty Compose configuration. PR #2418 by @tiangolo.
- ♻️ Simplify optional environment configuration. PR #2417 by @tiangolo.
- ♻️ Simplify Copier environment configuration. PR #2416 by @tiangolo.
- ♻️ Simplify environment defaults. PR #2415 by @tiangolo.
- ♻️ Simplify local development workflow. PR #2414 by @tiangolo.
- ♻️ Simplify environment configuration. PR #2413 by @tiangolo.
- ♻️ Simplify Traefik deployment, make it part of the stack. PR #2412 by @tiangolo.
- ♻️ Serve frontend from FastAPI. PR #2393 by @tiangolo.
- 🔧 Refactor PostgreSQL env var config. PR #2392 by @tiangolo.
- ♻️ Refactor models to improve types. PR #2356 by @tiangolo.
- 🔧 Add FastAPI VS Code extension to recommended extensions. PR #2206 by @tiangolo.
- ♻️ Update meta titles. PR #2179 by @alejsdev.
Upgrades
- ⬆️ Upgrade FastAPI version. PR #2357 by [@tiangolo](https://github.
- 0.10.02026-01-23 · 2026-01-23 16:47 UTC
查看更新说明
Features
- ✅ Add items and admin tests, and refactor existing ones. PR #2146 by @alejsdev.
- ✨ Add created_at field to User and Item models and update endpoints. PR #2144 by @alejsdev.
- 🔧 Migrate from npm to Bun. PR #2097 by @alejsdev.
- 🔧 Set up node monorepo. PR #2095 by @alejsdev.
- 🧑💻 Implement uv workspaces. PR #2090 by @alejsdev.
- 🔧 Add recommended VS Code extensions. PR #1386 by @tobiase.
- ✨ Use pwdlib with Argon2 by default, adding logic (and tests) to autoupdate old passwords using Bcrypt. PR #2104 by @tiangolo.
- 🔨 Generate frontend SDK on pre-commit, remove custom workflow. PR #2111 by @tiangolo.
Fixes
- 🐛 Add user authentication check in admin route to restrict access for non-superusers. PR #2145 by @alejsdev.
- 🐛 Handle non-existing user IDs in
read_user_by_id. PR #1396 by @saltie2193.
Refactors
- 🔥 Remove debugpy from recommended extensions, it's included by the Python extension. PR #2143 by @tiangolo.
- 🔧 Update the frontend build context for prod with the new top level setup. PR #2108 by @tiangolo.
- 🚚 Rename Docker Compose files to new names,
compose.yml. PR #2106 by @tiangolo. - 🔒️ Ensure authentication takes constant time, to avoid enumeration attacks. PR #2105 by @tiangolo.
- ✅ Fix incorrect mocking in unit tests (issue #1780). PR #1781 by @vicaya.
- 🐛Update
items.pyto return status code403in case of insufficient permissions. PR #1543 by @jpizquierdo. - ✅ Use proper
is_activefield intest_user.py. PR #1479 by @nauanbek. - ♻️ Simplify reset password logic by removing duplicate code. PR #1440 by @youneshenniwrites.
Upgrades
- ⬆ Bump postgres from 17 to 18. PR #1910 by @dependabot[bot].
- ⬆ Bump traefik from 3.0 to 3.6. PR #1973 by @dependabot[bot].
Docs
Internal
- 🎨 Format Python scripts te
- 0.9.02025-12-08 · 2025-12-08 19:14 UTC
查看更新说明
Features
- ✨ Add meta title support to all pages. PR #2039 by @alejsdev.
- 🛂 Migrate frontend to Shadcn. PR #2010 by @alejsdev.
Fixes
- 🐛 Fix
EMAILS_FROM_NAMEtype to bestrinstead ofEmailStr. PR #1940 by @martin0258. - 🐛 Fix
parse_corsfunction to be consistent for both empty string and empty list. PR #1672 by @rolkotaki. - 🐛 Close sidebar drawer on user selection. PR #1515 by @dtellz.
- 🐛 Fix required password validation when editing user fields. PR #1508 by @jpizquierdo.
Refactors
- ♻️ Update password max length. PR #1447 by @michaelAlvarino.
- 🚚 Move backend tests outside the
appdirectory. PR #1862 by @YuriiMotov. - ✨ Add ImportMetaEnv and ImportMeta interfaces for Vite environment variables. PR #1860 by @alejsdev.
- 🔧 Update
tsconfig.jsonand fix errors. PR #1859 by @alejsdev. - ♻️ Remove disabled attribute from Save button in ChangePassword component. PR #1844 by @alejsdev.
- 👷🏻♀️ Update CI for client generation. PR #1573 by @alejsdev.
- ♻️ Remove redundant field in inherited class. PR #1520 by @tzway.
- 🎨 Add minor UI tweaks in Skeletons and other components. PR #1507 by @alejsdev.
- 🎨 Add minor UI tweaks. PR #1506 by @alejsdev.
Upgrades
- ⬆ Bump @types/react from 19.1.12 to 19.1.13 in /frontend. PR #1888 by @dependabot[bot].
- ⬆ Bump @tanstack/router-plugin from 1.131.41 to 1.131.43 in /frontend. PR #1887 by @dependabot[bot].
- ⬆ Bump pydantic from 2.11.7 to 2.11.9 in /backend. PR #1891 by @dependabot[bot].
- ⬆ Bump @chakra-ui/react from 3.26.0 to 3.27.0 in /frontend. PR #1890 by @dependabot[bot].
- ⬆ Bump axios from 1.12.0 to 1.12.2 in /frontend. PR #1889 by @dependabot[bot].
- ⬆ Bump @types/node from 24.3.1 to 24.4.0 in /frontend. PR #1886 by @dependabot[bot].
- ⬆ Bump @tanstack/router-devtools from 1.131.41 to 1.131.42 in /frontend. PR [#1881](h
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Full Stack FastAPI Template
Technology Stack and Features
- ⚡ FastAPI for the Python backend API.
- 🧰 SQLModel for the Python SQL database interactions (ORM).
- 🔍 Pydantic, used by FastAPI, for the data validation and settings management.
- 💾 PostgreSQL as the SQL database.
- 🚀 React for the frontend.
- 🧩 Built into the backend application and served by FastAPI on the same domain as the API.
- 💃 Using TypeScript, hooks, Vite, and other parts of a modern frontend stack.
- 🎨 Tailwind CSS and shadcn/ui for the frontend components.
- 🤖 An automatically generated frontend client.
- 🧪 Playwright for end-to-end testing.
- 🦇 Dark mode support.
- ☁️ FastAPI Cloud for deployment.
- 🐋 Docker Compose for local services and self-hosted deployment.
- 📞 Traefik as a reverse proxy with automatic HTTPS.
- 🔒 Secure password hashing by default.
- 🔑 JWT (JSON Web Token) authentication.
- 📫 Email-based password recovery.
- ✉️ React Email for email templates.
- 📬 Mailpit for local email testing during development.
- ✅ Tests with Pytest.
- 🏭 CI (continuous integration) and CD (continuous deployment) based on GitHub Actions.
Dashboard Login

Dashboard - Admin

Dashboard - Items

Dashboard - Dark Mode

React Email Templates

Mailpit - Local Email Testing

Interactive API Documentation

How to Use It
Click the Use this template button at the top of this page to create a new repository.
Backend Development
Backend docs: backend/README.md.
Frontend Development
Frontend docs: frontend/README.md.
Deployment
FastAPI Cloud deployment: deployment.md.
Self-hosted deployment with Docker Compose: deployment-docker-compose.md.
Development
General development docs: development.md.
This includes the local FastAPI and Vite workflow, Docker Compose services, .env configuration, and more.
Release Notes
Check the file release-notes.md.
License
The Full Stack FastAPI Template is licensed under the terms of the MIT license.