Backend for Frontend

Definition

Backend for Frontend (BFF) is an architectural pattern where each client experience, such as web, mobile, or partner integrations, gets a backend layer tailored to its needs. Instead of forcing every client to consume the same generic API, a BFF shapes data and workflows for a specific frontend.


Core Ideas

  • one backend can serve web UI needs
  • another can serve mobile constraints and interaction patterns
  • each BFF hides downstream service complexity from its client
  • frontend teams gain more control over API shape and release cadence

Benefits

  • reduces over-fetching and under-fetching
  • simplifies client logic
  • aligns backend behavior with user experience needs
  • helps teams move faster when products diverge

Trade-Offs

  • duplicates some logic across BFFs if not managed carefully
  • introduces more services to operate
  • requires clear boundaries between shared domain logic and client-specific orchestration

Relationships


References

  • _architect notes