FastAPI React 项目模板

这个 cookiecutter 模板可以快速搭建基于 FastAPI 和 React 的项目,并包含 JWT 身份验证、数据库管理、消息队列等现代化技术栈。该模板采用了 Python 3.8,并整合了 PostgreSQL、SQLAlchemy 和 Docker 等工具,简化了项目启动流程。

主要特点:

  • 基于 JWT 的身份验证(使用 PyJWT 和 TypeScript)
  • 使用 SQLAlchemy 作为 ORM 进行数据库交互
  • 集成 Redis 作为消息代理
  • 使用 Celery 进行任务监控
  • 包含数据库迁移工具
  • 提供后端测试,支持测试数据库和事务回滚
  • 遵循 Airbnb 风格指南
  • 使用 Traefik 作为反向代理
  • 集成 React 前端,并在同一端口运行
  • 使用 Flower 管理 Celery 任务
  • 提供与 FastAPI 后端一致的基于令牌的身份验证

快速开始:

  1. 安装 cookiecutter: pip3 install cookiecutter
  2. 使用 cookiecutter 生成项目: cookiecutter gh:tiangolo/full-stack-fastapi-postgresql
folder
fastapi-react:Fast FastAPI + React项目的Cookiecutter模板。 使用PostgreSQL,SQLAlchemy和Docker 预估大小:105个文件
file
README.md 3KB
file
Dockerfile 230B
file
tsconfig.json 472B
file
manifest.json 492B
file
index.html 2KB
file
favicon.ico 3KB
file
.dockerignore 30B
file
package.json 2KB
file
index.css 366B
file
.eslintrc.js 1KB
file
.prettierrc.js 85B
file
nginx.conf 521B
file
Dockerfile 192B
file
alembic.ini 2KB
file
script.py.mako 494B
file
alembic.ini 2KB
file
.gitignore 45B
file
README.md 12KB
file
LICENSE 1KB
file
cookiecutter.json 345B
zip 文件大小:2.39MB