SpecialX
514e26ebb4
feat(portal-shell): implement portal-shell with apollo-router integration
...
M8: portal-shell unified frontend shell (Modular Monolith + micro-kernel).
- Apollo Client -> apollo-router (port 4010, RSC prefetch)
- 5 layouts: classic/focus/split/triple/canvas
- Registry + PluginLoader (dynamic import ssr:false)
- 3-layer props merge, Zustand PluginStore
- 4 widgets: grades/notification-bell/user-menu/class-selector
- config-service: new pluginConfig GraphQL resolver
- apollo-router: CORS + header propagation for portal-shell
- docker-compose.yml: portal-shell service block
2026-07-15 08:06:09 +08:00
SpecialX
47e950c664
feat(ai): temporal worker for lesson plan workflow
...
- deploy temporal server (postgresql + auto-setup + ui) in docker-compose
- new temporal/ module: workflow + activities + worker manager
- convert lesson plan 4-step orchestration to temporal workflow
- activities wrap existing analyze/recommend/generate/prepare_review steps
- worker injects failover_chain/content_client/data_ana_client via module globals
- start() uses temporal client.start_workflow, falls back to asyncio in dev
- register temporal ports 7233/8085 in port-allocation
Implements M6.5 of v2.1 migration plan (ADR-030).
2026-07-15 02:34:34 +08:00
SpecialX
1a5fa78fa6
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.
2026-07-15 02:13:03 +08:00
SpecialX
163bff6666
feat(infra): apollo router deployment and supergraph composition
...
M2: Apollo Router replaces BFF manual aggregation (ADR-037)
- Dockerfile: self-contained with rover + router, auto-compose on startup
- router.yaml: CORS, Router-Authorization header injection, traffic shaping
- supergraph.yaml: 6 subgraphs (iam/core-edu/content/msg/ai/data-ana)
- docker-compose: apollo-router on port 3000, depends on all subgraphs
- ROUTER_AUTH_SECRET added to secrets.example.env
- port-allocation.md: apollo-router registered on port 3000
2026-07-15 01:32:14 +08:00
SpecialX
3c2ea50c7f
feat(infra): proto-to-graphql generator + debezium outbox connector
...
- M0: parse proto to generate Federation 2 subgraph SDL
- M0.5: Debezium Connect monitors 4 outbox tables
- docker-compose: extend Debezium profiles to default+p3+p4+p5+p6
- package.json: add proto:gen-graphql script
2026-07-14 23:45:32 +08:00
SpecialX
a6b0c54fba
fix: 修复登录路由 + 端口冲突 + Prometheus 配置 + outbox 表结构 + 补充监控基础设施
...
1. teacher-portal 登录 JSON 解析错误修复
- 根因:next.config.js rewrites /api/auth/* → gateway /api/auth/*,
但 gateway 只在 /api/v1 路由组下注册代理,/api/auth/* 返回 404 纯文本
- 修复:rewrites 映射 /api/auth/* → /api/v1/iam/*(对齐 iam controller @Controller("v1/iam"))
2. msg / data-ana 端口冲突修复
- 根因:msg env.ts PORT 默认 3006,与 data-ana(config.py http_port=3006)冲突
- 修复:msg PORT 默认 3006→3007(对齐端口分配表 msg=3007, data-ana=3006)
3. Prometheus classes-service 3001 DOWN 修复
- 根因:classes 已合并入 core-edu(P3 裁决 C1),但 prometheus.yml 仍有 classes-service scrape 配置
- 修复:从 prometheus.yml 删除 classes-service job
4. iam outbox 表 aggregate_id 列长度修复
- 根因:iam_outbox.aggregate_id VARCHAR(32),但 UUID 是 36 字符,导致 "Data too long" 错误
- 修复:DDL 中 VARCHAR(32) → VARCHAR(36);ALTER TABLE 修复现有数据库
5. 补充未搭建的监控基础设施
- docker-compose.yml 新增 Alertmanager(9093)/ Loki(3100)/ Promtail(observability profile)
- prometheus.yml alertmanager target 更新为 edu-alertmanager:9093
验证:
- TS typecheck 19 项目全部通过
- 登录链路 teacher-portal → gateway → iam 验证通过
- Prometheus targets 不再有 classes-service
- 3 个新基础设施容器(alertmanager/loki/promtail)启动成功
AI identity: trae-main(基础设施修复会话)
2026-07-11 09:22:09 +08:00
SpecialX
f1e466a772
fix(infra): resolve NestJS dist build and Prometheus target issues
...
CI / quality-go (push) Failing after 5s
CI / quality-proto (push) Failing after 3s
CI / deploy (push) Has been skipped
CI / quality-ts (push) Failing after 50s
NestJS: disable incremental in 6 services tsconfig.json to fix dist
not emitted when nest-cli deleteOutDir conflicts with tsc tsbuildinfo.
classes/iam: import HealthModule in AppModule to fix /healthz 404.
classes: rewrite HealthController to Drizzle getDb from TypeORM DI.
teacher-bff: add /metrics endpoint for Prometheus scraping.
infra: add node/mysql/redis exporters to observability profile.
mysql-exporter v0.15.1 uses command-line flags not DATA_SOURCE_NAME.
prometheus: enable web.enable-lifecycle for hot reload.
2026-07-09 15:12:15 +08:00
SpecialX
1f901c5b20
feat(data-ana): implement complete CDC pipeline MySQL to ClickHouse
...
Debezium + Kafka + aiokafka consumer with table routing.
E2E verified: MySQL INSERT to ClickHouse upsert.
2026-07-09 13:02:59 +08:00
SpecialX
958b17c9d8
feat(infra): p6 hardening - metrics collection and registry mirror
...
- 4 services add collectDefaultMetrics for process metrics
- docker-compose.yml images prefixed with docker.m.daocloud.io
- Prometheus v0.51.0 (nonexistent) fixed to v2.51.0
- Grafana port remapped 3000 to 3030 to avoid teacher-portal conflict
- ClickHouse edu_analytics database initialized
- known-issues.md documents 7 new P6 scenario-to-rule mappings
2026-07-09 12:29:36 +08:00
SpecialX
2ba4250165
feat(p1): complete P1 foundation stage
...
CI Go / test (push) Has been cancelled
CI Proto / lint (push) Has been cancelled
CI Python / test (push) Has been cancelled
CI TypeScript / test (push) Has been cancelled
- monorepo: pnpm workspace + go.work + pyproject.toml + commitlint/husky
- infra: docker-compose (minimal + full profiles) + init-sql + prometheus
- arch-scan: multi-language scanner skeleton (TS/Go/Python/Proto)
- shared-proto: buf v2 + classes.proto (ClassService CRUD contract)
- api-gateway: Go/Gin + JWT HS256 auth + reverse proxy + request ID
- classes: NestJS golden template (error system + observability + middleware + CRUD + tests)
- teacher-portal: Next.js + paper-feel UI design system
- CI/CD: 4 workflows (go/ts/py/proto)
- docs: migration guide + project_rules + coding-standards + git-workflow + ui-design-system + 004 + 9 module READMEs + known-issues + spec/plan migration + roadmap
2026-07-07 23:39:37 +08:00