Refactor code structure for improved readability and maintainability

This commit is contained in:
ash66
2026-05-14 18:09:15 +08:00
parent 10d04c4083
commit 35cd927d02
105 changed files with 9043 additions and 7720 deletions

View File

@@ -1,6 +1,6 @@
# AI+合规智能中枢后端
`backend` 已承接原 `src` 的完整 FastAPI 后端能力,当前正式入口为 `app.main:app`
`backend` 是当前正式使用的 FastAPI 后端目录,入口为 `app.main:app`
## 启动
@@ -9,10 +9,10 @@ pip install -r backend/requirements.txt
PYTHONPATH=backend uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
```
也可以直接使用根目录脚本:
也可以直接使用根目录统一脚本:
```bash
./start_api.sh
./dev.sh start api --foreground
```
## 主要接口
@@ -45,6 +45,5 @@ backend/
## 说明
- `backend/app/api/main.py` 来自原 `src/api/main.py`,已切换为 `app.*` 导入。
- 路由前缀保持为 `/api/v1`,以兼容当前前端。
-`backend/app/api/routes/docs.py``rag.py``compliance.py``status.py` 仍保留在仓库中,但不再作为主路由入口。