full-stack-fastapi-template README

The project's README from github.com/fastapi/full-stack-fastapi-template. As one markdown file: README.md.

Full Stack FastAPI Template

Test Docker Compose Test Backend

Technology Stack and Features

Dashboard Login

Dashboard login screenshot

Dashboard - Admin

Admin dashboard screenshot

Dashboard - Items

Items dashboard screenshot

Dashboard - Dark Mode

Dark mode dashboard screenshot

React Email Templates

Email templates screenshot

Mailpit - Local Email Testing

Mailpit screenshot

Interactive API Documentation

API docs

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.

full-stack-fastapi-template (fastapi/full-stack-fastapi-template)

Searching Database…

这是什么?这是一个全栈 Web 应用模板,内置 FastAPI Python 后端、React/TypeScript 前端、PostgreSQL 数据库和 Docker Compose,并已预先配置好身份验证、管理后台和部署设置。
这是我需要安装的库,还是需要复制的项目?这是一个 GitHub 仓库模板:点击“Use this template”即可创建你自己的仓库副本,它不是可以用 pip 或 npm 安装的软件包。
怎样才能把它运行起来?先点击“Use this template”创建你自己的仓库,然后按照单独的 backend/README.md 和 frontend/README.md 指南进行本地开发,这些指南都基于 Docker Compose。
试用之前需要先安装什么,Python、Node 还是 Docker?你需要 Docker Compose 来启动 Postgres、Traefik 和 Mailpit 等本地服务,还需要 Python 运行 FastAPI 后端,以及 JS/TS 工具链(Vite)来运行 React 前端。
在基于它开发正式项目之前,有哪些需要注意的地方?前端附带一个自动生成的 API 客户端,因此每当你修改后端接口时,都需要重新生成该客户端,以保持前后端同步。
它到底在哪里运行?只能在本地吗,还是也能部署?它通过 Docker Compose 在本地运行以便开发,也可以部署到 FastAPI Cloud,或者使用 Docker Compose 自托管并通过 Traefik 运行,Traefik 负责反向代理和自动 HTTPS。
管理后台开箱即用包含哪些内容?这是一个可直接使用的后台,包含登录、用户管理和条目管理页面,并内置深色模式支持。
这里的身份验证是如何工作的?默认使用基于 JWT 的身份验证和安全的密码哈希,并附带基于邮件的密码找回流程。
开发时如何测试邮件?Mailpit 会在本地捕获发出的邮件,因此无需真实的邮件服务器,你就能预览 React Email 模板(例如密码找回邮件)。
测试和 CI/CD 由什么负责?Playwright 负责端到端测试,Pytest 负责后端测试,两者都已接入 GitHub Actions,用于持续集成和持续部署。
Creator
fastapi
Size
6.9 MB
Stars
46K
Age
7y
Commits · 90 Days