wtf( )unctionsystem design, drawn
← all problemsArchitectureMedium

A column rename that broke the public API

Controllers return the database entity straight to the client — no mapping, no duplication, and the shape stays in sync automatically.

Then someone renamed a column. Every integrator broke, a field nobody meant to publish had been visible for a year, and adding an index-only column changed the API's response.

Put something at the boundary so the wire format is a decision rather than a side effect.
Components — tap one, then tap a slot on the diagram
!A database column was renamed. Every API consumer broke the same afternoon.

Boundaries, outermost first: Inside the service: Database entity (changes freely), Controller Outside every boundary: Integrators (depend on the shape; FAILED: broken), an empty slot for the at the edge Connections: Database entity calls Controller (step 1) Controller calls at the edge — map explicitly (step 2) at the edge calls Integrators — a stable contract (step 3)

Database entitychanges freely
Controller
Integratorsdepend on the shapebroken