fastapi-fullstack
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFastAPI Full Stack
FastAPI全栈项目
A Python full-stack application with FastAPI backend.
一个基于FastAPI后端的Python全栈应用。
Tech Stack
技术栈
- Backend: FastAPI, Python
- Frontend: React
- Database: PostgreSQL
- ORM: SQLAlchemy
- 后端: FastAPI, Python
- 前端: React
- 数据库: PostgreSQL
- ORM: SQLAlchemy
Prerequisites
前置要求
- Python 3.11+
- Docker (recommended)
- Python 3.11+
- Docker(推荐)
Setup
设置步骤
1. Clone the Template
1. 克隆模板
bash
git clone --depth 1 https://github.com/tiangolo/full-stack-fastapi-template.git .If the directory is not empty:
bash
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_templatebash
git clone --depth 1 https://github.com/tiangolo/full-stack-fastapi-template.git .如果目录非空:
bash
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_template2. Remove Git History (Optional)
2. 移除Git历史记录(可选)
bash
rm -rf .git
git initbash
rm -rf .git
git init3. Setup with Docker (Recommended)
3. 使用Docker设置(推荐)
bash
docker compose up -dbash
docker compose up -d4. Or Setup Manually
4. 或手动设置
bash
cd backend
pip install -r requirements.txtbash
cd backend
pip install -r requirements.txtDevelopment
开发运行
With Docker:
bash
docker compose up -dManual:
bash
cd backend
uvicorn main:app --reload使用Docker:
bash
docker compose up -d手动运行:
bash
cd backend
uvicorn main:app --reload