From 5d2a2d0ed0ab7fdcffb59b602235d865c125eefe Mon Sep 17 00:00:00 2001 From: Arthur Bassi Date: Mon, 13 Jul 2026 13:23:54 -0300 Subject: [PATCH] chore(config): document Phase 7 feature flags in appsettings and .env.example --- .env.example | 17 +++++++++++++++-- Api.SeaHavenIndustries/appsettings.json | 19 ++++++++++++++++--- SeaHavenIndustries/appsettings.json | 13 +++++-------- 3 files changed, 36 insertions(+), 13 deletions(-) diff --git a/.env.example b/.env.example index cb07e57..db65d8b 100644 --- a/.env.example +++ b/.env.example @@ -1,11 +1,11 @@ -# Sea Haven Industries — shoc-backend required configuration +# Sea Haven Industries ÔÇö shoc-backend required configuration # # This file documents the secrets that used to be hardcoded in appsettings*.json # and source files. Copy the values into one of the supported configuration sources; # do NOT commit real values. # # .NET resolves configuration in this order (later wins): -# 1. appsettings.json / appsettings.{Environment}.json (committed — placeholders only) +# 1. appsettings.json / appsettings.{Environment}.json (committed ÔÇö placeholders only) # 2. User Secrets (local dev): dotnet user-secrets set "Key:Sub" "value" # 3. Environment variables (use "__" as the section separator) # @@ -32,3 +32,16 @@ GoogleMaps__ApiKey=AIzaSyXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX # AWS_ACCESS_KEY_ID= # AWS_SECRET_ACCESS_KEY= # AWS_REGION=us-east-2 + +# --- Work Order ingest (Lambda cutover) --- +# Leave Enabled=false until ApiKey is a real secret (min 32 chars). Do not use appsettings placeholders. +WorkOrderIngest__Enabled=false +WorkOrderIngest__ApiKey= + +# --- Dynamo sync bridge (keep false after Lambda cutover; avoid dual-run with ingest) --- +Sync__Enabled=true + +# --- Legacy endpoint deprecation headers --- +LegacyEndpoints__DeprecationEnabled=false +LegacyEndpoints__SunsetDate=2026-12-31 + diff --git a/Api.SeaHavenIndustries/appsettings.json b/Api.SeaHavenIndustries/appsettings.json index f023879..85941e0 100644 --- a/Api.SeaHavenIndustries/appsettings.json +++ b/Api.SeaHavenIndustries/appsettings.json @@ -1,4 +1,4 @@ -{ +{ "ConnectionStrings": { //"DefaultConnection": "Server=DESKTOP-64LC14O\SQLEXPRESS;Database=SeahavenIndustries;TrustServerCertificate=True;Trusted_Connection=True;MultipleActiveResultSets=true", @@ -27,5 +27,18 @@ "WorkOrderJobs": { "WeekRolled": { "Enabled": true, "RunAtUtc": "00:05", "DayOfWeek": "Monday" }, "PastDueCache": { "Enabled": false, "RunAtUtc": "00:10" } - } -} \ No newline at end of file + }, + "WorkOrderIngest": { + "Enabled": false, + "ApiKey": "${WORKORDER_INGEST_API_KEY}" + }, + "Sync": { + "Enabled": true + }, + "LegacyEndpoints": { + "DeprecationEnabled": false, + "SunsetDate": "2026-12-31" + }, + "FrontendBaseUrl": "https://shoc.seahaven.com" +} + diff --git a/SeaHavenIndustries/appsettings.json b/SeaHavenIndustries/appsettings.json index 78d143e..fa26bef 100644 --- a/SeaHavenIndustries/appsettings.json +++ b/SeaHavenIndustries/appsettings.json @@ -1,10 +1,5 @@ { "ConnectionStrings": { - //"DefaultConnection": "Server=.;Database=SeahavenIndustries;TrustServerCertificate=True;Trusted_Connection=True;MultipleActiveResultSets=true", - //"DefaultConnection": "Server=.\\SqlExpress;Database=SeahavenIndustries;TrustServerCertificate=True;Trusted_Connection=True;MultipleActiveResultSets=true", - - // Provide the real value via environment variable ConnectionStrings__DefaultConnection, - // user-secrets, or appsettings.Development.json (which is gitignored). Do NOT commit credentials. "DefaultConnection": "${CONNECTION_STRING}", "excelconnection": "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 8.0;HDR=YES'" }, @@ -15,12 +10,14 @@ } }, "SendGrid": { - // Provide the real value via environment variable SendGrid__ApiKey or user-secrets. "ApiKey": "${SENDGRID_API_KEY}" }, "GoogleMaps": { - // Provide the real value via environment variable GoogleMaps__ApiKey or user-secrets. "ApiKey": "${GOOGLE_MAPS_API_KEY}" }, - "AllowedHosts": "*" + "AllowedHosts": "*", + "BlazorWorkOrderSunset": { + "Enabled": false, + "ShocBaseUrl": "https://shoc.seahaven.com" + } }