Settings: modules declare their keys, categories and descriptions
- Dominant language
- C#
- Stars
- 6
- Forks
- 7
- Avg merge
- 4h 42m
- Merged PRs (30d)
- 307
Description
A setting's category is picked from hardcoded key prefixes, `Kubernetes` and `HealthChecks` for Monitoring and `Serilog` for Logging, with everything else under Features: `barakoCMS/Features/Settings/UpdateSetting.cs:97-103`. Descriptions are a switch over the same keys at `UpdateSetting.cs:107-111`. The categories are a fixed public enum, `barakoCMS/Models/SystemSetting.cs:13`.
### Why it is too specific
It knows three core subsystems and nothing else. A module's settings (Resend, Umami, Files storage) all land under Features with no description, and a module cannot add a category such as Email or Storage without a core change. It also works against moving Kubernetes monitoring out to a module (#745), since core would still name it.
### The general concept
Modules and core features declare their setting keys with a category and a description. `UpdateSetting` looks the key up there and falls back to Features.
### Where it lives
Core provides the registry, and each module declares its own keys.
### Compatibility
Released. `SettingCategory` is a public enum in `Models`, which is package surface, so its four values stay. The category is already sent as a string (`barakoCMS/Features/Settings/GetSettings.cs:48`), so new categories do not change the HTTP contract. Stored settings keep the category they were saved with. Near #745.
### Done when
- A module that declares `Resend:FromAddress` under Email sees that category and description in `GET /api/settings`, and a test showing that fails before the change.
- `UpdateSetting` has no hardcoded key prefixes or description switch.
- Existing Kubernetes, HealthChecks and Serilog settings keep their categories.
Found in the too specific sweep of 15 September 2026.
Contributor guide
Research direction
Start with barakoCMS/Features/Settings/UpdateSetting.cs:97-111 and the SettingCategory enum in barakoCMS/Models/SystemSetting.cs:13, then inspect module setting declarations and GetSettings.cs:48. Add the registry and module declarations so Resend:FromAddress returns its category and description, remove the hardcoded mappings, and verify existing Kubernetes, HealthChecks, and Serilog categories remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100