关于 fastapi-fullstack
一个 Python 全栈应用模板,采用 FastAPI 后端和 React 前端,并使用 PostgreSQL 与 SQLAlchemy。支持通过 Docker 或手动方式设置开发环境。
主要功能
- 01FastAPI 和 Python 后端
- 02React 前端
- 03PostgreSQL 数据库
- 04SQLAlchemy ORM
- 05Docker 或手动设置
适用场景
- 01启动 Python Web 应用
- 02开发搭配 FastAPI 的 React 前端
- 03使用 Docker Compose 运行全栈应用
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ rebyteai-template/ rebyte-skills --skill fastapi-fullstack安装后在 Claude Code 中输入/fastapi-fullstack确认已加载。
详细介绍
FastAPI 全栈
一个使用 FastAPI 后端的 Python 全栈应用。
技术栈
- 后端:FastAPI、Python
- 前端:React
- 数据库:PostgreSQL
- ORM:SQLAlchemy
前置条件
- Python 3.11+
- Docker(推荐)
设置
1. 克隆模板
git clone --depth 1 https://github.com/tiangolo/full-stack-fastapi-template.git .
如果目录不为空:
git clone --depth 1 https://github.com/tiangolo/full-stack-fastapi-template.git _temp_template
mv _temp_template/* _temp_template/.* . 2>/dev/null || true
rm -rf _temp_template
2. 移除 Git 历史记录(可选)
rm -rf .git
git init
3. 使用 Docker 设置(推荐)
docker compose up -d
4. 或手动设置
cd backend
pip install -r requirements.txt
开发
使用 Docker:
docker compose up -d
手动设置:
cd backend
uvicorn main:app --reload
评论
支持 Markdown