重构 API 为 8 领域 + 应用层架构
将后端模块拆分为 domains、applications、shared 三层,结算计算器移入 domain 纯函数目录,API 路径与测试保持不变。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
21
README.md
21
README.md
@@ -61,8 +61,27 @@ API 文档:http://localhost:3000/api/docs
|
||||
## 项目结构
|
||||
|
||||
```
|
||||
apps/api/src/
|
||||
├── domains/ # 8 个业务领域
|
||||
│ ├── identity/ # 身份与权限(auth + users)
|
||||
│ ├── agent/ # 代理网络
|
||||
│ ├── ledger/ # 账务账本(wallet)
|
||||
│ ├── catalog/ # 赛事目录(matches)
|
||||
│ ├── odds/ # 盘口赔率(markets)
|
||||
│ ├── betting/ # 注单引擎
|
||||
│ ├── settlement/ # 结算引擎(含 domain/ 纯函数)
|
||||
│ └── operations/ # 运营支撑(audit/cashback/content/i18n)
|
||||
├── applications/ # 三端应用层(编排,不含领域规则)
|
||||
│ ├── player/
|
||||
│ ├── admin/
|
||||
│ └── agent/
|
||||
├── shared/ # 基础设施
|
||||
│ ├── prisma/
|
||||
│ └── common/
|
||||
├── app.module.ts
|
||||
└── main.ts
|
||||
|
||||
apps/
|
||||
api/ NestJS 单体后端
|
||||
player/ 玩家 H5 前台
|
||||
admin/ 平台后台
|
||||
agent/ 代理后台
|
||||
|
||||
Reference in New Issue
Block a user