-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
phase/BetaBeta scopeBeta scope
Description
Problem
Large files make changes hard to review and increase merge conflicts; IFeatureStore also mixes unrelated responsibilities (query, tiles, related records, edits), which drives dependency bloat and makes streaming adoption harder.
Evidence
- Large files:
src/Honua.Postgres/Features/FeatureStore/PostgresFeatureStore.cs(3026 LOC)src/Honua.Server/Features/FeatureServer/FeatureServerEndpoints.cs(1843 LOC)src/Honua.Server/Features/OgcFeatures/FeaturesEndpoints.cs(1573 LOC)src/Honua.Server/Features/FeatureServer/FeatureServerHandler.cs(1571 LOC)src/Honua.Server/Features/FeatureServer/Models/FeatureServerModels.cs(1362 LOC)
- Mixed responsibilities:
src/Honua.Core/Features/FeatureStore/Abstractions/IFeatureStore.cscontains query, tile, related, and edit operations.
Direction
- Split large files into cohesive units (by endpoint group, query/edit, DTOs, or feature store components).
- Segregate
IFeatureStoreinto smaller interfaces:IFeatureReader/IFeatureWriterIRelationshipStoreITileProviderIStreamingFeatureStore(already exists)
- Update DI registrations and call sites to depend on the smallest interface needed.
Tasks
- Split
FeatureServerModels.csinto per‑model files. - Split
FeatureServerEndpoints.csandFeatureServerHandler.csinto cohesive endpoint/handler units. - Split
OgcFeatures/FeaturesEndpoints.cssimilarly. - Decompose
PostgresFeatureStore.csinto smaller classes (data access, query, edit, tiles, relationships). - Introduce segregated interfaces and update implementations/usages.
- Update tests and docs/ADR as needed; ensure architecture tests still pass.
Acceptance criteria
- No files > ~800 LOC in the listed areas.
- Handler/endpoint dependencies become explicit and cohesive.
- Call sites depend on narrower interfaces rather than the full
IFeatureStore.
Metadata
Metadata
Assignees
Labels
phase/BetaBeta scopeBeta scope