mcpField
F
fastapi-fullstack

fastapi-fullstack

github.com/rebyteai-template开发1785 次安装19 周前更新
代码仓库

关于 fastapi-fullstack

一个 Python 全栈应用模板,采用 FastAPI 后端和 React 前端,并使用 PostgreSQL 与 SQLAlchemy。支持通过 Docker 或手动方式设置开发环境。

主要功能

  1. 01FastAPI 和 Python 后端
  2. 02React 前端
  3. 03PostgreSQL 数据库
  4. 04SQLAlchemy ORM
  5. 05Docker 或手动设置

适用场景

  1. 01启动 Python Web 应用
  2. 02开发搭配 FastAPI 的 React 前端
  3. 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