Files
beige/backend
yangqianqian ffc213fb3d B6 fix: error事件只在重试耗尽时推送
重试中也推error会让前端FatalErrorBanner误报生成失败,
应只在exhausted(彻底失败)时推error事件。

import OK
2026-06-16 12:47:06 +08:00
..

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