From 0a936a9f04b59818aaadb1b5833ed401440757b9 Mon Sep 17 00:00:00 2001 From: Fritiof Hedman Date: Sun, 7 Jun 2026 14:31:16 +0200 Subject: [PATCH] 2.4 Drop sample configs in repo root Co-Authored-By: Claude Opus 4.7 (1M context) --- IMPLEMENTATION.md | 2 +- appsettings.json | 28 ++++++++++++++++++++++++++++ frames.json | 19 +++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 appsettings.json create mode 100644 frames.json diff --git a/IMPLEMENTATION.md b/IMPLEMENTATION.md index f975da6..3d135f4 100644 --- a/IMPLEMENTATION.md +++ b/IMPLEMENTATION.md @@ -87,7 +87,7 @@ Each type lives in `src/FrameProcessor/Domain/`. Tests in `tests/FrameProcessor. - On `OnChange`: log warning, skip invalid frame, keep valid ones serving (`PLAN.md` line 130, `CLAUDE.md` "frames.json reload asymmetry"). - Add a `FramesRegistry` service that exposes `TryGetByName(FrameName)` / `TryGetByMac(MacAddress)` over the current valid set. -### [ ] 2.4 Drop sample configs in repo root +### [x] 2.4 Drop sample configs in repo root - `appsettings.json` from `PLAN.md` ยง"Settings schemas". - `frames.json` with one example frame (Spectra 6 palette). - **DoD:** Service starts and logs the loaded frames; an invalid `frames.json` fails startup with a clear error. diff --git a/appsettings.json b/appsettings.json new file mode 100644 index 0000000..9492e16 --- /dev/null +++ b/appsettings.json @@ -0,0 +1,28 @@ +{ + "Mqtt": { + "Host": "mosquitto", + "Port": 1883, + "ClientId": "frame-processor", + "Username": null, + "Password": null, + "UseTls": false, + "BaseTopic": "frames", + "PublishQos": 1, + "RetryBackoffSeconds": [1, 2, 5, 15, 60] + }, + "ApiKey": "change-me", + "Storage": { + "ImageDirectory": "/data/images" + }, + "UrlFetch": { + "MaxBytes": 52428800, + "TimeoutSeconds": 30, + "MaxRedirects": 3 + }, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/frames.json b/frames.json new file mode 100644 index 0000000..5af0822 --- /dev/null +++ b/frames.json @@ -0,0 +1,19 @@ +{ + "Frames": [ + { + "name": "living-room", + "mac": "AA:BB:CC:DD:EE:FF", + "resolution": { "width": 1600, "height": 1200 }, + "orientation": "landscape", + "dithering": "floyd-steinberg", + "palette": [ + { "name": "black", "color": "#1F2226", "deviceColor": "#000000" }, + { "name": "white", "color": "#B9C7C9", "deviceColor": "#FFFFFF" }, + { "name": "blue", "color": "#233F8E", "deviceColor": "#0000FF" }, + { "name": "green", "color": "#35563A", "deviceColor": "#00FF00" }, + { "name": "red", "color": "#62201E", "deviceColor": "#FF0000" }, + { "name": "yellow", "color": "#C1BB1E", "deviceColor": "#FFFF00" } + ] + } + ] +}