Files
RAG/backend/README.md
YoVinchen ec1acb36b5
Some checks failed
secret-scan / scan (push) Has been cancelled
Establish a safe foundation before implementing the geology RAG system
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
2026-07-12 14:42:11 +08:00

27 lines
1.0 KiB
Markdown
Raw Permalink 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.
# 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 读取逻辑只允许存在于后端配置层。