docs: API architecture ADRs, tech spec, and marketing capability tracker

Persist the modular-monolith decision (ADR 0001 handler/service/repo,
ADR 0002 keep REST) with the companion tech spec and the api-architecture
OpenSpec capability. Replace the finished mock-migration tracker with
docs/TBD-marketing.md listing the backend-less marketing domains still on
fixtures (coupons, favorites, account stats, seckill, collective, integral,
reviews). README and AGENTS.md point at the new docs.
This commit is contained in:
Chengdong Zhang
2026-09-18 16:00:31 +08:00
parent c51e96ae41
commit e10cae5789
9 changed files with 341 additions and 10 deletions
+5 -7
View File
@@ -13,6 +13,8 @@ apps/
packages/
shared/ @vmall/sharedTS 类型、API client、en/zh 语言包、共享样式
openspec/ OpenSpec 规范(specs/ 为归档后的能力规范)
docs/adr/ Architecture Decision Records(英文)
docs/tech-specs/ 内部技术规格(英文)
scripts/
seed-demo.mjs 演示数据脚本
```
@@ -71,15 +73,11 @@ openspec validate --all --strict # 规范校验
## 商城的 mock 边界
`apps/mall` 通过 `apps/mall/plugins/api.ts``liveDomains` 按域选择适配器。已有 API 的域全部走真实后端:catalog、currency、content、brands、shops、auth、cart、orders、shipments、invoices。
`apps/mall` 通过 `apps/mall/plugins/api.ts``liveDomains` 按域选择适配器。已有 API 的域全部走真实后端:catalog、currency、content、brands、shops、auth、cart、orders、shipments、invoices、addresses
仍来自 `~/mock/data` 的部分是**有意保留**的展示内容,不是待办:
仍来自 `~/mock/data` 的部分都是没有后端能力的营销/账户域,逐项记录在 `docs/TBD-marketing.md`(优惠券、收藏、账户统计、秒杀、拼团、积分商城、评价等)。每一项都是一次新的能力建设,不是适配层切换。
- **收货地址**`MOCK_ADDRESSES`):`Address` 内嵌在订单里,结算直接在请求体里携带,不需要地址表
- **优惠券、收藏、账户统计**:纯展示,不参与交易。
- **seckill / collective / integral 营销页**:纯展示内容。
- **商品评价**:没有评价模型,所以商城不再展示任何评价——卡片上的评价数与详情页的评价页签、评分、回复都已移除,而不是继续展示虚构的评论者与评分。评价是独立功能,不是迁移的一部分。
- **fixed-data 适配器本身**`Mock API adapter` 规范要求它仍能服务每个域,因此它是回滚路径,删除它会破坏回滚。
- **fixed-data 适配器本身**:`Mock API adapter` 规范要求它仍能服务每个域,因此它是回滚路径,删除它会破坏回滚
## 环境变量(后端)