Backend for Frontend Pattern
ELI5 — The Vibe Check
BFF means building a dedicated backend for each frontend. Your mobile app needs different data than your web app, so why force them to share one API? Each frontend gets its own backend that serves exactly what it needs. It's like having a personal shopper for each customer type.
Real Talk
The Backend for Frontend (BFF) pattern creates separate backend services tailored to the needs of each frontend application. A mobile BFF serves compact payloads optimized for bandwidth, while a web BFF serves richer data. Each BFF aggregates and transforms data from downstream microservices, reducing frontend complexity and enabling frontend-specific optimizations.
When You'll Hear This
"The mobile BFF returns thumbnail URLs while the web BFF returns full-size images." / "Each frontend team owns their BFF, so they can evolve the API without blocking others."
Related Terms
API (Application Programming Interface)
An API is like a menu at a restaurant. The kitchen (server) can do a bunch of things, but you can only order what's on the menu.
API Gateway Pattern
An API gateway is the front door for all your microservices.
Backend for Frontend (BFF)
Backend for Frontend means building a dedicated backend for each frontend type. Your mobile app needs different data shapes than your web app.
Microservice
Microservices is an architecture where instead of one big app, you have many tiny apps that each do one thing.