- Created SUMMARY.md with plan execution details - Updated STATE.md with current position Plan 03 COMPLETE - Infrastructure layer updated for GwCluster.
91 lines
3.0 KiB
Markdown
91 lines
3.0 KiB
Markdown
---
|
|
gsd_state_version: 1.0
|
|
milestone: v1.0
|
|
milestone_name: milestone
|
|
status: in_progress
|
|
last_updated: "2026-03-03T12:00:00.000Z"
|
|
progress:
|
|
total_phases: 3
|
|
completed_phases: 1
|
|
total_plans: 4
|
|
completed_plans: 6
|
|
---
|
|
|
|
# Project State
|
|
|
|
**Last Updated:** 2026-03-03
|
|
|
|
## Status
|
|
|
|
- **Phase:** 03-gateway-infrastructure-update
|
|
- **Plan:** 03 ✅ Completed
|
|
- **Milestone:** v1.0 - Platform Foundation
|
|
- **Position:** Completed Plan 03 of Phase 03
|
|
|
|
## Project Context
|
|
|
|
This is the Fengling.Platform project - a multi-tenant identity and authentication infrastructure.
|
|
|
|
### Current State
|
|
|
|
- Platform layer initialized with Tenant, User, Role aggregates
|
|
- **GatewayAggregate updated** - GwTenantRoute extended, GwTenant and GwServiceInstance removed
|
|
- **NEW: GwCluster aggregate** added with embedded value objects (GwDestination, GwHealthCheckConfig, GwSessionAffinityConfig)
|
|
- **NEW: IClusterStore/ClusterStore** - Store pattern for GwCluster
|
|
- Manager + Store pattern established (ITenantStore, ITenantManager, IRouteStore, IClusterStore)
|
|
- Extensions for DI registration (AddPlatformCore<TContext>, AddGatewayCore<TContext>)
|
|
- PostgreSQL database with EF Core migrations
|
|
|
|
### Source for Migration
|
|
|
|
**fengling-gateway** project (parent directory):
|
|
- `GwTenant` - 租户实体 (REMOVED - use Platform.Tenant)
|
|
- `GwTenantRoute` - 路由配置实体 (EXTENDED)
|
|
- `GwServiceInstance` - 服务实例实体 (REMOVED - use GwCluster embedded)
|
|
- `GwCluster` - 集群聚合根 (NEW)
|
|
- GatewayDbContext with PostgreSQL
|
|
|
|
## Decisions
|
|
|
|
- Using Manager + Store pattern from existing Tenant implementation
|
|
- Extensions-based DI registration for quick IoC setup
|
|
- Align with existing Platform coding conventions
|
|
- **ID Strategy:** GwTenant uses `long` ID (Platform convention); GwTenantRoute, GwCluster use `string` GUID IDs (YARP-compatible)
|
|
- **Cluster Design:** GwCluster uses embedded value objects (Owned Entity pattern) for Destinations, HealthCheck, SessionAffinity
|
|
- **Route Update:** Extended GwTenantRoute with Methods, Hosts, Headers, LoadBalancingPolicy, AuthorizationPolicy, CorsPolicy, Transforms fields
|
|
|
|
## Blockers
|
|
|
|
None.
|
|
|
|
## Accumulated Context
|
|
|
|
### Roadmap Evolution
|
|
|
|
- Phase 1: Gateway routing entities ✅
|
|
- Phase 2: Platform infrastructure ✅
|
|
- Phase 3: Gateway cluster entities (current)
|
|
- Plan 01: Cluster entities ✅
|
|
- Plan 02: Route update ✅
|
|
- Plan 03: Infrastructure cleanup ✅ (just completed)
|
|
|
|
### Phase 03 Progress
|
|
|
|
- **Plan 01: Gateway Cluster Entities** ✅ COMPLETED
|
|
- Created GwCluster aggregate root
|
|
- Created GwDestination value object
|
|
- Created GwHealthCheckConfig value object
|
|
- Created GwSessionAffinityConfig value object
|
|
- **Plan 02: Gateway Route Update** ✅ COMPLETED
|
|
- Extended GwTenantRoute with YARP fields
|
|
- Removed obsolete GwTenant entity
|
|
- Removed obsolete GwServiceInstance entity
|
|
- **Plan 03: Infrastructure Update** ✅ COMPLETED
|
|
- Updated PlatformDbContext with GwCluster DbSet
|
|
- Created IClusterStore/ClusterStore
|
|
- Deleted IInstanceStore/InstanceStore
|
|
|
|
## Pending
|
|
|
|
- Plan 04: Gateway DI registration (update DI registration for IClusterStore)
|