7c511e74bd2db34c51804ceb0504a426026ec5c7
ARCHITECTURE.md §10 P1-8: three structural checks wired into CI to prevent regressions identified in the §1.3 audit. Scripts (apps/portal-shell/scripts/): - check-route-table.ts: scans src/app/shell/**/page.tsx, parses route-permissions.ts (EXACT/PREFIX/DASHBOARD/PUBLIC_ROUTES), fails if any actual /shell/* route is unregistered. Reports ghost entries (EXACT declarations without page.tsx) as informational. - check-page-count.ts: asserts total page.tsx >= 13 and per-category minimums (dashboards/login/root/forbidden/catch-all/dev-templates). - check-codegen.ts: runs pnpm run codegen, fails if any output with skipDocumentsValidation:false has operations referencing non-existent schema fields (currently enforces dashboard-types.ts output from P1-7). npm scripts: check:routes / check:pages / check:codegen / check:all CI: .github/workflows/ci.yml quality-ts job — new "Portal-shell structural checks (P1-8)" step between typecheck and test. Acceptance (ARCHITECTURE.md §10 P1-8 — "CI 对预埋违规报红"): - Route violation: planted /shell/test-violation/page.tsx → check:routes exits 1 with "unregistered route" error; reverted → PASS - Codegen violation: planted non_existent_field in GetTeacherDashboard → check:codegen exits 1 with "Cannot query field" error; reverted → PASS - Page count: baseline=13, deleting any page.tsx triggers FAIL - Clean state: all 3 checks PASS (10 routes, 28 EXACT, 24 ghost entries informational, 13 pages, codegen 3 outputs SUCCESS) Refs: ARCHITECTURE.md §5.3, §10 P1-8, §11.6, §11.7 红线 #5
Next Edu Cloud
基于 DDD + EDA + CQRS 的企业级微服务架构教育云平台。
技术栈
- 网关层: Go (Gin)
- 业务服务: TypeScript (NestJS)
- 分析/AI: Python (FastAPI)
- 前端: React (Next.js + Module Federation)
- 存储: MySQL / Redis / ClickHouse / Neo4j / Elasticsearch
- 事件总线: Kafka + Debezium CDC
- 契约: protobuf + buf
快速开始
# 1. 安装依赖
pnpm install
# 2. 启动最小基础设施(MySQL + Redis)
docker compose -f infra/docker-compose.minimal.yml up -d
# 3. 复制环境变量
cp .env.example .env
# 4. 运行 arch.db 扫描
pnpm run arch:scan
# 5. 启动服务
pnpm dev
文档
开发阶段
- P1 地基 (M1-M3): 仓库骨架 + 基础设施 + classes 黄金模板
- P2 身份 (M4-M6): IAM 服务 + Teacher BFF + 微前端骨架
- P3 核心教学 (M7-M10): CoreEdu + Outbox + 考试/作业/成绩
- P4 内容分析 (M11-M13): Content + DataAna + CDC
- P5 沟通AI (M14-M16): Msg + Push + AI + ES
- P6 硬化 (M17-M18): Service Mesh + 生产硬化
Languages
TypeScript
81.8%
Python
12.3%
Go
2.8%
JavaScript
1.2%
PowerShell
0.5%
Other
1.4%