baseline: Clover 独立仓库首次基线提交

将 Clover 从上层产品包旧仓库中独立出来,建立专属版本控制。
当前状态=纵切片端到端已打通(登录→选品→出文出图→审核→下载包),
M1文案质量去套路化已验收。此提交作为后续按核销清单逐条修复的基线。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
yangqianqian
2026-06-16 11:30:22 +08:00
commit 6a2632da70
253 changed files with 27467 additions and 0 deletions

30
backend/README.md Normal file
View File

@@ -0,0 +1,30 @@
# Clover Backend
FastAPI + Celery + MySQL + MongoDB + Redis
## 目录结构
```
backend/
app/
api/v1/ # 路由层auth/products/tasks/review/delivery
services/ # 业务逻辑层(按模块拆分)
models/ # SQLAlchemy ORM 模型14张表
middleware/ # workspace_guard 等中间件
workers/ # Celery 任务只传task_idworker内解密key
constants/ # 策略命名中心文件,消除打架
utils/ # Fernet加密、SSE工具等
alembic/
versions/ # 001-004 migration 脚本
tests/ # TDD 测试用例
```
## 依赖(需装)
见 requirements.txt待 BE agent 填)
## 启动
见 docker-compose.yml待 BE agent 填)
## 铁律提醒
- API Key 绝不进 Celery 参数,只传 task_id
- FERNET_KEY 走环境变量
- 所有查询强制带 workspace_id