pattern

Screen Shaped Endpoint

An endpoint that returns exactly what one screen needs in one request, shaped by the interface rather than by the domain model.

A domain-shaped API returns resources: a customer, their orders, each order's lines, each line's product. A screen showing an order summary therefore makes four round trips, of which three are dependent on the previous response — which on a mobile connection is most of the perceived load time.

A screen-shaped endpoint returns the composed result in one call. The backend for frontend performs the fan-out on a fast internal network, aggregates, trims to what the screen displays, and returns it.

The trade is explicit coupling: the endpoint now changes when the screen changes. That is acceptable precisely because the same team owns both, which is the condition that makes a BFF a BFF rather than another shared service. A BFF owned by a platform team and consumed by four client teams is a shared gateway with a misleading name, and it acquires the change-coordination problem it was meant to remove.

The other benefit is often the larger one: the BFF is where a mobile client's particular needs are met — smaller payloads, fewer fields, different pagination — without those concerns leaking into the domain services.