hailin
747e4ae8ef
refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing
...
- Remove Address field from PartyEndpoint (parties connect to router themselves)
- Update K8s Discovery to only manage PartyID and Role labels
- Add Party registration and SessionEvent protobuf definitions
- Implement PartyRegistry and SessionEventBroadcaster domain logic
- Add RegisterParty and SubscribeSessionEvents gRPC handlers
- Prepare infrastructure for party-driven MPC coordination
This is the first phase of migrating from coordinator-driven to party-driven
architecture following international MPC system design patterns.
2025-12-05 08:11:28 -08:00
Developer
e23af5d4ad
fix(mpc-service): 添加 MPC_COORDINATOR_URL 和 MPC_MESSAGE_ROUTER_WS_URL 配置
...
问题:mpc-service 的 MPCCoordinatorClient 需要 MPC_COORDINATOR_URL 环境变量
原本只配置了 MPC_SESSION_COORDINATOR_URL,导致 Invalid URL 错误
修改内容:
- docker-compose.yml: 添加 MPC_COORDINATOR_URL 和 MPC_MESSAGE_ROUTER_WS_URL
- mpc-service/.env.example: 更新环境变量文档
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 05:55:26 -08:00
Developer
e4f9e4279f
fix(mpc-service): 硬编码 MPC_API_KEY 与 mpc-system 一致
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 05:37:12 -08:00
Developer
4db5534372
feat(mpc): 添加 server-party-api 服务,实现用户 share 生成
...
新增 mpc-system/services/server-party-api:
- 为 mpc-service 提供同步的 TSS keygen/signing API
- 参与 TSS 协议生成用户 share 并直接返回(不存储)
- 支持 API Key 认证
- 端口 8083 对外暴露
更新 mpc-service TSSWrapper:
- 改为调用 server-party-api 而非本地二进制
- 新增 MPC_SERVER_PARTY_API_URL 配置
- 超时时间调整为 10 分钟
架构: mpc-service -> account-service -> server-party-api -> TSS
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 05:32:41 -08:00
Developer
08541f1d8d
fix(mpc): 修复 MPC 服务连接配置
...
问题: mpc-service 无法连接到 mpc-session-coordinator,超时 30 秒
修复:
1. mpc-system/docker-compose.yml:
- session-coordinator 暴露端口 8081:8080
- message-router 暴露端口 8082:8080
2. services/docker-compose.yml:
- MPC_COORDINATOR_URL: 192.168.1.100 -> 192.168.1.111
- MPC_MESSAGE_ROUTER_WS_URL: 192.168.1.100 -> 192.168.1.111
3. 同步更新 .env.example 和 deploy.sh
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 20:39:53 -08:00
Developer
de2e2d0428
refactor(api-gateway): 将 Kong 独立为解耦模块
...
- 将 Kong 从 services/docker-compose.yml 移到 api-gateway/docker-compose.yml
- 添加 api-gateway/deploy.sh 一键部署脚本
- 完善 api-gateway/README.md 文档,包含完整架构图和部署流程
- Kong 使用外部网络连接 services,实现解耦部署
架构变更:
- services: 只包含微服务,不依赖 Kong
- api-gateway: 独立的 Kong 网关,可选部署
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 00:38:49 -08:00
Developer
7d9d5eeffe
feat(api-gateway): 添加 Kong API 网关和 Nginx 配置
...
- 添加 Kong 声明式配置 (kong.yml),定义所有微服务路由
- 更新 docker-compose.yml 添加 Kong 服务 (kong-db, kong-migrations, kong)
- 添加 rwaapi.szaiai.com Nginx 配置 (SSL + 反向代理到 Kong)
- 添加 nginx/install.sh 一键安装脚本
- 添加 API Gateway README 文档
架构: 用户 → Nginx (SSL) → Kong (API Gateway) → 各微服务
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 00:33:22 -08:00
Developer
893399e07f
refactor(infra): 统一微服务基础设施为共享模式
...
- 将 presence-service 添加到主 docker-compose.yml(端口 3011,Redis DB 10)
- 更新 init-databases.sh 添加 rwa_admin 和 rwa_presence 数据库
- 重构 admin-service/deploy.sh 使用共享基础设施
- 重构 presence-service/deploy.sh 使用共享基础设施
- 添加 authorization-service 开发指南文档
解决多个微服务独立启动重复基础设施(PostgreSQL/Redis/Kafka)的问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 20:46:50 -08:00
Developer
c45ed8a575
feat(admin-service): 实现移动应用版本管理服务
...
- DDD+Hexagonal架构
- Domain层: AppVersion实体, Platform枚举, Repository接口
- Infrastructure层: Prisma集成, Repository实现
- Application层: CheckUpdate查询(供移动端), CreateVersion命令(管理员)
- API层: VersionController, DTOs (request/response)
- 数据库: app_versions表设计(支持Android/iOS)
- 功能: 版本检查、强制更新、文件SHA-256校验
- 部署: Dockerfile, docker-compose.yml, deploy.sh脚本
- 数据库迁移: Prisma migration初始化
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 11:22:30 -08:00
Developer
f3ac5d3718
fix: 修复健康检查路径,添加 authorization-service 健康检查控制器
2025-12-02 10:59:49 -08:00
Developer
f1b6370aae
fix(referral-service): 统一使用 curl 进行健康检查
2025-12-02 10:39:36 -08:00
Developer
b5d097214b
fix(referral-service): 统一健康检查使用 wget
...
docker-compose.yml: curl -> wget (与 Dockerfile 一致)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 10:35:47 -08:00
Developer
2297be1a04
fix(docker-compose): 统一 backup-service 和 mpc-service 健康检查
...
backup-service:
- docker-compose.yml: curl -> wget (与 Dockerfile 一致)
mpc-service:
- docker-compose.yml: curl -> node HTTP (与 Dockerfile 一致)
修复 docker-compose healthcheck 覆盖 Dockerfile HEALTHCHECK 导致的不一致
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 10:13:34 -08:00
Developer
17ff0d951e
fix: 修复 docker-compose.yml 中所有服务的健康检查
...
问题:
- docker-compose.yml 的 healthcheck 覆盖了 Dockerfile 的 HEALTHCHECK
- 使用 wget 而不是 curl
- 健康检查 URL 不正确,导致所有服务显示 unhealthy
修复:
1. 统一使用 curl -f 代替 wget
2. 修正所有服务的健康检查 URL:
- identity-service: /health → /api/v1/health
- wallet-service: /health → /api/v1/health
- backup-service: /health ✓ (保持不变)
- planting-service: /health → /api/v1/health
- referral-service: /health ✓ (保持不变)
- reward-service: /health ✓ (保持不变)
- mpc-service: /api/v1/health ✓ (已正确,改用 curl)
- leaderboard-service: /health → /api/health
- reporting-service: /health → /api/v1/health
- authorization-service: /health ✓ (保持不变,改用 curl)
3. 统一 timeout 为 3s (原来是 10s)
4. admin-web: 优化 timeout 为 3s
Docker HEALTHCHECK 机制:
- 在容器内部执行 curl localhost:PORT/path
- 不经过 Nginx 或外部网络
- 需要与服务实际端点匹配
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 09:36:38 -08:00
Developer
3dd561bd24
fix(services): comment out admin-service (not yet implemented)
...
- Comment out admin-service in docker-compose.yml
- Simplify admin-service Dockerfile to placeholder
- Fixes build error due to missing source files
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 02:19:54 -08:00
Developer
f99cac21cf
feat(services): add unified Docker deployment system
...
- Add docker-compose.yml for all 11 backend services
- Add deploy.sh automation script with install/build/up/down commands
- Add init-databases.sh for PostgreSQL multi-database initialization
- Add .env.example template with secure key placeholders
- Fix empty Dockerfiles for admin/referral/reporting/wallet services
Services included:
- identity-service (:3000)
- wallet-service (:3001)
- backup-service (:3002)
- planting-service (:3003)
- referral-service (:3004)
- reward-service (:3005)
- mpc-service (:3006)
- leaderboard-service (:3007)
- reporting-service (:3008)
- authorization-service (:3009)
- admin-service (:3010)
Infrastructure: PostgreSQL, Redis, Kafka/Zookeeper
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 02:12:49 -08:00