26ff8d9b4f
Set up repository with legacy .NET Framework 4.8 source (OLD/), new .NET 10 Blazor solution (NEW/), OpenSpec specifications, documentation, and project configuration.
2.2 KiB
2.2 KiB
Setup Solution Foundation
Summary
Set up the .NET 10 solution infrastructure including dependency injection configuration, options pattern for configuration binding, and modular service registration extension methods. This establishes the architectural foundation for all subsequent migration phases.
Scope
In Scope
- Program.cs with DI container configuration
- appsettings.json structure with sections for each module
- Service registration extension methods (AddDataAccess, AddDataSync, AddAuth, AddExcelExport)
- Options classes for IOptions configuration binding
- Project references and NuGet package dependencies
Out of Scope
- Actual service implementations (deferred to domain-specific phases)
- Database connection testing (covered by migrate-database-schema)
- Authentication implementation details (deferred to auth phase)
- Background service scheduling (deferred to data-sync phase)
Motivation
A well-structured DI configuration provides:
- Modular, testable architecture with clear separation of concerns
- Strongly-typed configuration binding via IOptions pattern
- Extension methods that encapsulate module-specific registration logic
- Clear dependency graph visible in Program.cs
Acceptance Criteria
- Solution builds successfully with
dotnet build - All Options classes bind correctly from appsettings.json
- Extension methods register services with appropriate lifetimes:
- Scoped: Database services, repositories
- Singleton: Configuration, HTTP clients
- Transient: Short-lived processors
- Program.cs clearly shows module registration order
openspec validate setup-solution-foundation --strictpasses
Dependencies
- migrate-database-schema (provides JdeScoping.Database project)
Risks
| Risk | Mitigation |
|---|---|
| Circular dependencies | Extension methods register only their module's services |
| Configuration drift | Options classes map 1:1 with appsettings sections |
| Missing services at runtime | Startup validation via GetRequiredService checks |
Related Specs
infrastructure- DI registration and configuration binding patterns