shoc-backend/Api.SeaHavenIndustries/Controllers
Alexandre Brandizzi 7d245eb717
refactor: enforce backend boundaries and optimize dispatch (#30)
* refactor(api): enforce service and data-service boundaries

* refactor(api): complete feature service boundaries

* refactor(identity): enforce service and data boundaries

* refactor(vendors): enforce service and data boundaries

* refactor(workorders): enforce service and data boundaries

* refactor(backend): enforce architecture and optimize dispatch

* style(backend): format changed architecture files

* fix(architecture): address backend review follow-ups

* fix(backend): sanitize exception disclosure in changed API endpoints

Replace raw exception-message disclosure (ex.Message) returned to API
callers with a stable sanitized public message plus correlated structured
internal logging, across the endpoints changed in this PR.

- Add SanitizedErrors helper: logs the original exception at Error with a
  generated correlation id and returns a stable public message referencing
  it so support can trace without exposing internals.
- Inject ILogger<T> into the 14 changed controllers and route every
  ex.Message/dbex.Message disclosure through the helper, preserving status
  codes, response shapes, and business data (e.g. OpenWorkOrders).
- Leave FluentValidation (vex.Errors) and existing fixed-message catches
  untouched; out-of-scope controllers (Account/Contact/Employee/Asset/
  PMSchedule) are unchanged.
- Add focused tests proving internal exception text is not returned and
  that Error logging carrying the original exception is invoked.

* fix(architecture): abstract job run state access

* style: format board update service

* test: use collection assertion idiom
2026-07-24 17:35:34 -03:00
..
AccountController.cs backend changes 2026-05-14 11:00:12 -05:00
AssetController.cs backend changes 2026-05-14 11:00:12 -05:00
AuthenticationController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
CalendarController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
CommonController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
ContactController.cs backend changes 2026-05-14 11:00:12 -05:00
DashboardController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
DispatchController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
DispatchPublicController.cs Add vendor portal with token-based authentication 2026-04-20 12:01:53 -04:00
DropdownOptionsController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
EmployeeController.cs backend changes 2026-05-14 11:00:12 -05:00
FollowUpController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
LocationController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
PMScheduleController.cs backend changes 2026-05-14 11:00:12 -05:00
QuotesController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
SettingsController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
SyncController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
TaskListTemplateController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
UpliftController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
UserController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
VendorController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
VendorOperationsController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
VendorPortalController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
WorkOrderBoardController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
WorkOrderCompletionController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
WorkOrderController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
WorkOrderDetailController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
WorkOrderDispatchController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
WorkOrderIngestController.cs feat(work-orders): add work order ingest API with X-Ingest-Key 2026-07-13 13:22:11 -03:00
WorkOrderJobsController.cs feat(work-orders): add Phase 5 scheduled domain events (WeekRolled) 2026-07-24 10:13:17 -03:00
WorkOrderMediaController.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
WorkOrderOpsController.cs feat(work-orders): add Sync kill-switch and ops health coexistence endpoints 2026-07-13 13:22:12 -03:00