[BD-845] Externalize configuration to YAML files#19
Merged
Ranganathan-code-ops merged 1 commit intomainfrom Feb 13, 2026
Merged
[BD-845] Externalize configuration to YAML files#19Ranganathan-code-ops merged 1 commit intomainfrom
Ranganathan-code-ops merged 1 commit intomainfrom
Conversation
Migrate all hardcoded configuration, secrets, and environment-specific values to external YAML files with ASP.NET Core IConfiguration integration. - Add custom YAML configuration provider (YamlConfigurationSource/Provider) - Add YamlConfigLoader for flat key-value YAML parsing with __ → : mapping - Add ConfigurationValidator for startup validation of required settings - Add config models: DatabaseSettings, BusinessHoursSettings, HealthCheckSettings, SwaggerSettings - Remove hardcoded encryption key from PasswordEncryptor (now from config) - Remove hardcoded holidays from BusinessHoursCalculator (now from config) - Clean appsettings.json of all secrets and environment-specific values - Delete appsettings.Development.json (contained encrypted passwords) - Add OrderMonitor_ENV.yml master config template - Add OrderMonitor_ENV.development.yml for local development - Add OrderMonitor_ENV.secrets.yml.template for credentials reference - Add docker-compose.yml for local dev with SQL Server - Defer DB connection factory resolution for test compatibility - Update integration test factory with config and no-op validator - Add 64 new tests (176 unit + 38 integration = 214 total, all passing) Closes BD-845, BD-849, BD-850, BD-851, BD-852, BD-853, BD-854, BD-855, BD-856, BD-857, BD-858 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
f92be42 to
dcf428c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
__→:key mappingChanges
New Files (17)
DatabaseSettings.cs,BusinessHoursSettings.cs,HealthCheckSettings.cs,SwaggerSettings.csIYamlConfigLoader.cs,IConfigurationValidator.csYamlConfigLoader.cs,YamlConfigurationSource.cs,ConfigurationValidator.csOrderMonitor_ENV.yml,OrderMonitor_ENV.development.yml,OrderMonitor_ENV.secrets.yml.templatedocker-compose.ymlYamlConfigLoaderTests.cs,ConfigurationValidatorTests.cs,PasswordEncryptorTests.cs,BusinessHoursSettingsTests.cs,YamlConfigurationSourceTests.cs,ConfigurationIntegrationTests.csModified Files (10)
Program.cs- YAML config source integration, startup validationDependencyInjection.cs- Deferred DB factory, config model registrationPasswordEncryptor.cs- Removed hardcoded key, added Configure() methodBusinessHoursCalculator.cs- IOptions constructor, removed hardcoded holidaysappsettings.json- Cleaned of all secrets and env-specific valuesCustomWebApplicationFactory.cs- Test config and no-op validatorDeleted Files (1)
appsettings.Development.json- Contained encrypted passwordsConfiguration Override Precedence
appsettings.json→OrderMonitor_ENV.yml→OrderMonitor_ENV.{env}.yml→ Environment VariablesTest Plan
🤖 Generated with Claude Code