Commit Graph

3 Commits

Author SHA1 Message Date
hailin 0e367d042c feat(reporting): 实现 Dashboard API 完整功能
## 概述
为 reporting-service 实现完整的 Dashboard API 端点,支持统计卡片、趋势图表、
区域分布和最近活动等功能。

## API 端点
- GET /dashboard/stats: 获取统计卡片数据
- GET /dashboard/charts: 获取趋势图表数据 (支持 7d/30d/90d 周期)
- GET /dashboard/region: 获取区域分布数据
- GET /dashboard/activities: 获取最近活动列表

## 新增 DTO
- DashboardStatsResponseDto: 统计卡片响应
- DashboardTrendResponseDto: 趋势数据响应
- DashboardRegionResponseDto: 区域分布响应
- DashboardActivitiesResponseDto: 活动列表响应

## Repository 层
- IDashboardStatsSnapshotRepository: 统计快照接口
- IDashboardTrendDataRepository: 趋势数据接口
- ISystemActivityRepository: 系统活动接口

## External Clients (已弃用)
- AuthorizationServiceClient: 授权服务客户端
- IdentityServiceClient: 身份服务客户端
注:已改为事件驱动架构,这些客户端仅作为备用

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 00:31:08 -08:00
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 1fe66f34fd feat(reporting-service): Implement complete reporting service with DDD architecture
- Domain layer: ReportDefinition/ReportSnapshot aggregates, value objects (DateRange, ReportPeriod, etc.)
- Application layer: CQRS commands/queries, ReportingApplicationService
- Infrastructure layer: Prisma repositories, Redis cache, export services (Excel/CSV/PDF)
- API layer: REST controllers, DTOs with validation
- Testing: Unit tests, integration tests, E2E tests, Docker test environment
- Documentation: Architecture, API, Development, Testing, Deployment, Data Model docs
- Supports scheduled report generation, multi-format export, and data caching

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 08:12:57 -08:00