Some checks failed
secret-scan / scan (push) Has been cancelled
The project begins with architecture, data governance, reproducible evaluation, deployment boundaries, and secret-handling contracts so later code has measurable acceptance criteria. Constraint: Real provider credentials, workspace identities, and restricted geological data must never enter Git Rejected: Add placeholder runnable services in the design commit | would imply unverified implementation readiness Confidence: high Scope-risk: narrow Reversibility: clean Directive: Run make verify before every commit and update ADRs when architecture boundaries change Tested: Secret scan, Markdown links, YAML parse, shell syntax, and staged diff validation Not-tested: Application runtime is intentionally deferred to the implementation stage
27 lines
1.0 KiB
Markdown
27 lines
1.0 KiB
Markdown
# Backend
|
||
|
||
Python/FastAPI 后端代码位于本目录。实现阶段采用模块化单体,同一代码镜像分别运行 API 与持久化任务 Worker。
|
||
|
||
规划边界:
|
||
|
||
```text
|
||
backend/
|
||
├── app/
|
||
│ ├── api/v1/ HTTP/SSE 接口
|
||
│ ├── core/ 配置、安全、日志、遥测
|
||
│ ├── domain/ 领域实体与状态机
|
||
│ ├── ports/ 外部能力协议(依赖倒置边界)
|
||
│ ├── services/ 入库、检索、生成、评测用例
|
||
│ ├── adapters/ 百炼、解析器、文件存储等外部适配器
|
||
│ ├── persistence/ SQLAlchemy 模型与仓储
|
||
│ ├── workers/ PostgreSQL 任务队列消费者
|
||
│ ├── tools/ 模型探测、seed 与离线运维入口
|
||
│ └── prompts/ 版本化提示词
|
||
└── tests/
|
||
├── unit/
|
||
├── integration/
|
||
└── contract/
|
||
```
|
||
|
||
前端不得直接访问百炼;API Key 读取逻辑只允许存在于后端配置层。
|