feat(config-service): split config-service from iam for plugin/layout config
- new NestJS service on port 3011/gRPC 50059 (ADR-026) - owns 6 config_ tables (plugin/role-mapping/role-layout/layout-tpl/user-override/outbox) - GraphQL Federation 2 subgraph with DataLoader + RouterAuthGuard - gRPC ConfigService + admin REST CRUD + user REST API - three-layer merge: registry.defaultProps + roleMapping.widget_props + userOverride.props - Redis cache with 5min TTL - registered in apollo-router supergraph + docker-compose + port-allocation Implements M3 of v2.1 migration plan.
This commit is contained in:
@@ -37,21 +37,22 @@
|
||||
|
||||
## 3. NestJS BFF + 业务服务(3000-3099)
|
||||
|
||||
| 服务 | HTTP 端口 | gRPC 端口 | 说明 | 阶段 |
|
||||
| ------------- | --------- | --------- | ----------------------------------------------- | ------- |
|
||||
| apollo-router | 3000 | — | v2.1 GraphQL 聚合层(替代 BFF 手动聚合) | P3 |
|
||||
| iam | 3002 | 50052 | P2 启用 gRPC server(I1 裁决,2026-07-09 修正) | P2 ✅ |
|
||||
| teacher-bff | 3003 | — | BFF 不暴露 gRPC,对下游走 gRPC | P2 ✅ |
|
||||
| core-edu | 3004 | 50053 | 含原 classes 服务(合并后) | P3 |
|
||||
| content | 3005 | 50054 | Neo4j + ES | P4 |
|
||||
| data-ana | 3006 | 50055 | HTTP 保留作 Gateway 直连降级,gRPC 为 P4 主入口 | P4 |
|
||||
| msg | 3007 | 50056 | 通知中心 | P5 |
|
||||
| ai | 3008 | 50058 | LLM 网关 | P5 |
|
||||
| student-bff | 3009 | — | BFF 不暴露 gRPC | P3 |
|
||||
| parent-bff | 3010 | — | BFF 不暴露 gRPC | P4 |
|
||||
| ~~classes~~ | ~~3001~~ | ~~—~~ | 已合并入 core-edu(P3) | P1 历史 |
|
||||
| 服务 | HTTP 端口 | gRPC 端口 | 说明 | 阶段 |
|
||||
| -------------- | --------- | --------- | ----------------------------------------------- | ------- |
|
||||
| apollo-router | 3000 | — | v2.1 GraphQL 聚合层(替代 BFF 手动聚合) | P3 |
|
||||
| iam | 3002 | 50052 | P2 启用 gRPC server(I1 裁决,2026-07-09 修正) | P2 ✅ |
|
||||
| teacher-bff | 3003 | — | BFF 不暴露 gRPC,对下游走 gRPC | P2 ✅ |
|
||||
| core-edu | 3004 | 50053 | 含原 classes 服务(合并后) | P3 |
|
||||
| content | 3005 | 50054 | Neo4j + ES | P4 |
|
||||
| data-ana | 3006 | 50055 | HTTP 保留作 Gateway 直连降级,gRPC 为 P4 主入口 | P4 |
|
||||
| msg | 3007 | 50056 | 通知中心 | P5 |
|
||||
| ai | 3008 | 50058 | LLM 网关 | P5 |
|
||||
| student-bff | 3009 | — | BFF 不暴露 gRPC | P3 |
|
||||
| parent-bff | 3010 | — | BFF 不暴露 gRPC | P4 |
|
||||
| config-service | 3011 | 50059 | v2.1 M3 从 iam 拆分(ADR-026) | P3 |
|
||||
| ~~classes~~ | ~~3001~~ | ~~—~~ | 已合并入 core-edu(P3) | P1 历史 |
|
||||
|
||||
> **端口空闲**:3011-3099 预留扩展。
|
||||
> **端口空闲**:3012-3099 预留扩展。
|
||||
|
||||
---
|
||||
|
||||
@@ -82,9 +83,10 @@
|
||||
| data-ana | 50055 | AnalyticsService | P4 |
|
||||
| msg | 50056 | NotificationService / NotificationPreferenceService / NotificationTemplateService | P5 |
|
||||
| ai | 50058 | AiService | P5 |
|
||||
| config-service | 50059 | ConfigService | P3 |
|
||||
| ~~push-gateway~~ | ~~50057~~ | ~~PushService~~ | 豁免(见 §2) |
|
||||
|
||||
> **端口空闲**:50051、50057、50059-50099 预留扩展。
|
||||
> **端口空闲**:50051、50057、50060-50099 预留扩展。
|
||||
> **push-gateway 50057**:原计划预留,因 gRPC 豁免释放。50058 让给 ai 服务。
|
||||
|
||||
---
|
||||
@@ -116,12 +118,13 @@
|
||||
|
||||
## 7. 变更记录
|
||||
|
||||
| 日期 | 变更 | 决策者 |
|
||||
| ---------- | ------------------------------------------------------ | ------ |
|
||||
| 2026-07-09 | 初始创建,登记全部 15 服务 + 基础设施端口 | coord |
|
||||
| 2026-07-09 | 仲裁 admin-portal 3003 → 4003;MF 配置 3000 → 4000 | coord |
|
||||
| 2026-07-09 | 仲裁 push-gateway 豁免 gRPC,释放 50057;50058 让给 ai | coord |
|
||||
| 2026-07-09 | classes 3001 标记为历史(已合并入 core-edu) | coord |
|
||||
| 日期 | 变更 | 决策者 |
|
||||
| ---------- | --------------------------------------------------------- | ------ |
|
||||
| 2026-07-09 | 初始创建,登记全部 15 服务 + 基础设施端口 | coord |
|
||||
| 2026-07-09 | 仲裁 admin-portal 3003 → 4003;MF 配置 3000 → 4000 | coord |
|
||||
| 2026-07-09 | 仲裁 push-gateway 豁免 gRPC,释放 50057;50058 让给 ai | coord |
|
||||
| 2026-07-09 | classes 3001 标记为历史(已合并入 core-edu) | coord |
|
||||
| 2026-07-14 | M3 新增 config-service(3011/50059,ADR-026 从 iam 拆分) | coord |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user