Backend for Frontend (BFF)
Problem
A mobile app needs a compact account summary; a web dashboard needs detailed tables. Both gather data from several services.
Making each frontend assemble these responses adds network requests and client logic, while a shared API must accommodate different screen requirements.
Solution — Backend for Frontend
A Backend for Frontend (BFF) is a backend dedicated to a particular frontend. It calls the underlying services and combines and shapes their data for that frontend's screens.
Mobile app → Mobile BFF → Shared services Web dashboard → Web BFF → Shared services
Each frontend team can evolve its responses independently, at the cost of another service to run and an extra network hop.
Core idea: a BFF adapts backend services to one frontend's needs.