One API, four kinds of client
An API with a single client can be shaped exactly for it. Give it several clients with different screens, networks and release schedules, and its endpoints become compromises between them. A city library's API went that way: built for the website, then stretched for a phone app, self-service kiosks in the branches and a staff desk. Each client's needs became a parameter or a field in the same endpoints: ?include=fines for the staff desk, a lighter summary shape the app team asked for and the website never uses, and an old field nobody may rename because the kiosks, which get new software twice a year, still read it.
The bill shows on the app's home screen. It draws nine lines, three loans, two holds ready to collect and four events at the member's branch, and to get them it makes four calls and downloads 412 KB of JSON. Most of that is the member record, which carries every loan since 2019 because the staff desk needs the history, and full event descriptions the screen cuts to one line; on a weak signal on the bus, the screen takes four seconds. Meanwhile every change waits in the API team's queue and has to be checked against four clients. One general-purpose API serves each of them a little badly, and slows every team down.
A backend for each experience
Backends for Frontends (BFF) gives each client experience its own thin backend. The app calls the member app's BFF, which calls the loans, holds and events services, keeps only the fields the home screen draws, and returns one response of a few kilobytes shaped like the screen. The kiosk calls its own BFF, which changes when the kiosk software does and not before. The services behind them stay general; the shaping for each screen moves into the BFF that serves it. That is also what separates a BFF from Gateway Aggregation, which merges backend calls behind one endpoint of a shared gateway: a BFF aggregates for one client experience, in code that client's team owns.
Sam Newman described the pattern in 2015, drawing on what he had seen at SoundCloud and elsewhere, and the part that makes it work is ownership: each BFF belongs to the team that owns its client. When the home screen needs a new field, the app team changes its BFF and its app together, without a ticket in another team's queue.
The iOS and Android apps share one BFF; the kiosk and the staff desk each have their own. The library's rules live only in the domain services.
Count experiences, not devices
The reflex is one BFF per device: an iOS BFF, an Android BFF, a web BFF. Look at the screens instead. The library's iOS and Android apps show the same screens, are built by the same team and ship together, so one member app BFF serves both; two would be the same shaping written twice by the same people. The staff desk runs in a browser, like the website, but it is a different experience: searching across members, a loan's full history, overrides only staff may make. Putting it behind the website's BFF would rebuild the general API on a smaller scale.
Three differences can justify a separate BFF, when they are worth running one more service: the screens need different data, the payload budget differs (a phone on mobile data, a desk on the branch network), or the release cadence differs (the kiosks twice a year, the app every two weeks). A client that differs in none of these shares a BFF with the client it resembles.
Shape the data, leave the rules
A BFF does two kinds of work. It aggregates, answering one call from the client by calling several downstream services and merging their responses, and it shapes: it keeps the fields a screen needs, renames them, formats a due date as "in 3 days", orders a list the way the screen shows it. Neither changes what the library's rules are.
The library learned where that line runs. A loan could be renewed up to three times, unless another member had placed a hold. The app team wanted a Renew button that greys out when renewal is impossible, so the member app BFF computed it from the renewal count and the holds, and the kiosk BFF did the same. Then the library lowered the limit to two. The loans service and the member app BFF changed that week; the kiosk BFF waited for the next kiosk release, months away. All season the kiosks offered a Renew button for loans the loans service then refused, and members queued at the desk to ask why.
The fix was to ask the question where the rule lives: the loans service now returns canRenew with a reason, and every BFF passes it through untouched. From then on, changing the rule touches only the loans service, and clients see it the next time they load a loan, with no BFF release.
Some duplication between BFFs is acceptable. The member app BFF and the website's BFF both merge loans with holds and both format due dates, and sharing that code through a common library can bring back coordination between the two teams. The test is what the duplicated code knows. If it is about how a screen looks, each BFF keeps its own copy. If it encodes what the library means, such as whether a member is in good standing given their fines and overdue loans, it belongs in a domain service, written once.
One owner per BFF
Ownership is what keeps a BFF thin, and it fails in two ways. A BFF that several teams change, with no one team accountable for its contract, tends to collect conflicting changes. A single BFF serving every client experience drifts back into a second general-purpose API, with the old compromises and one more hop. Running one, next to an API gateway and under load, is The BFF tier: gateway, sessions & fan-out.
When one API is enough
With a single client, a website and nothing else, the API can be shaped for it directly and a BFF only adds another deployment in front of it, and several clients with the same screens can share one API. When the main difference is payload size, a GraphQL API that lets each client ask for exactly the fields it draws may be enough (API styles: REST vs GraphQL vs gRPC). It does not give each team its own release cadence or ownership; when those matter, BFFs still help, sometimes as one GraphQL server per experience.
Your library on a Grid
The Backends for Frontends Challenge asks for distinct client experiences, one BFF per experience, each shaping and aggregating downstream data, shared domain services behind them all, and a visible reason not to use one general-purpose API. Name each BFF after the experience it serves rather than the device, put every rule, like the renewal limit, in a shared service, leave nothing but shaping in the BFFs, and write on the Grid which difference rules out one general API. A good run has zero duplicated business logic across BFFs.