Prompt
What is a Backend for Frontend?
Latest observation
Oct 1, 2026
OpenAI APIWeb search: off
A Backend for Frontend (BFF) is a backend service built specifically for a particular frontend application or device type.
In simple terms
Instead of having one generic backend used directly by all clients, you create a tailored backend layer for:
- a web app
- a mobile app
- a desktop app
- or even a specific frontend team/product
That BFF sits between the frontend and the core backend services.
What it does
A BFF typically:
- aggregates data from multiple backend services
- formats responses to match what the frontend needs
- reduces round trips between frontend and backend
- handles frontend-specific logic, like view composition or API translation
- hides complexity of internal services from the UI
Why use it?
Different frontends often need data in different shapes:
- Mobile might need less data and fewer calls because of bandwidth/performance constraints
- Web might need richer, more detailed responses
- Each UI may need different combinations of fields
A BFF helps each frontend get exactly what it needs without forcing the frontend to make many calls or deal with backend complexity.
Example
Imagine a dashboard page needs:
- user profile
- recent orders
- notifications
Without a BFF, the frontend might call 3 separate APIs.
With a BFF:
- the frontend calls one BFF endpoint
- the BFF calls the required services
- the BFF returns one combined response optimized for that page
Benefits
- Simpler frontend code
- Better performance
- Cleaner separation of concerns
- Easier to evolve frontend-specific needs independently
Trade-offs
- More backend services to maintain
- Possible duplication of logic across multiple BFFs
- Additional deployment and monitoring complexity
If you want, I can also show:
- a diagram of BFF architecture, or
- how BFF compares to an API Gateway.