Files
Neo-ZQYY/apps/backend/README.md

43 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# apps/backend - FastAPI 后端
为微信小程序提供 RESTful API连接 zqyy_app 业务数据库,通过 FDW 只读访问 ETL 数据。
## 内部结构
```
apps/backend/
├── app/
│ ├── main.py # FastAPI 入口,启用 OpenAPI 文档
│ ├── config.py # 配置加载
│ ├── database.py # zqyy_app 数据库连接
│ ├── routers/ # 路由模块
│ ├── middleware/ # 中间件(鉴权、日志等)
│ └── schemas/ # Pydantic 请求/响应模型
├── tests/ # 后端测试
├── pyproject.toml # 依赖声明
└── README.md
```
## 启动
```bash
# 确保已在根目录执行 uv sync --all-packages
cd apps/backend
uv run uvicorn app.main:app --host 127.0.0.1 --port 8000 --reload
```
API 文档自动生成于 http://localhost:8000/docs
## 依赖
- fastapi>=0.115, uvicorn[standard]>=0.34
- psycopg2-binary>=2.9, python-dotenv>=1.0
- neozqyy-sharedworkspace 引用)
## Roadmap
- [ ] 用户管理与微信登录
- [ ] RBAC 权限中间件
- [ ] 任务审批流 API
- [ ] FDW 数据查询接口(助教业绩、财务日报等)