Establish a safe foundation before implementing the geology RAG system
Some checks failed
secret-scan / scan (push) Has been cancelled
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
This commit is contained in:
26
backend/README.md
Normal file
26
backend/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# 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 读取逻辑只允许存在于后端配置层。
|
||||
1
backend/app/adapters/bailian/.gitkeep
Normal file
1
backend/app/adapters/bailian/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
backend/app/adapters/parsers/.gitkeep
Normal file
1
backend/app/adapters/parsers/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
backend/app/api/v1/.gitkeep
Normal file
1
backend/app/api/v1/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
backend/app/core/.gitkeep
Normal file
1
backend/app/core/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
backend/app/domain/.gitkeep
Normal file
1
backend/app/domain/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
backend/app/persistence/.gitkeep
Normal file
1
backend/app/persistence/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
backend/app/ports/.gitkeep
Normal file
1
backend/app/ports/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
backend/app/prompts/.gitkeep
Normal file
1
backend/app/prompts/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
backend/app/services/.gitkeep
Normal file
1
backend/app/services/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
backend/app/tools/.gitkeep
Normal file
1
backend/app/tools/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
backend/app/workers/.gitkeep
Normal file
1
backend/app/workers/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
backend/migrations/.gitkeep
Normal file
1
backend/migrations/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
backend/tests/contract/.gitkeep
Normal file
1
backend/tests/contract/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
backend/tests/integration/.gitkeep
Normal file
1
backend/tests/integration/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
backend/tests/unit/.gitkeep
Normal file
1
backend/tests/unit/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
Reference in New Issue
Block a user