Backend for Frontend (BFF)

What is a Backend for Frontend (BFF)?

A Backend for Frontend, abbreviated BFF, is a server-side layer dedicated to a specific frontend, such as a web storefront, a mobile app, or a kiosk. It aggregates, transforms, and tailors data from underlying microservices so that the consuming client receives exactly what it needs in the shape it needs.

Definition

Each frontend typically has its own requirements regarding payload size, data structure, authentication, and caching. Instead of forcing every microservice to support every client variant, a BFF sits between them and handles the orchestration. It calls multiple downstream services, merges the responses, applies client-specific business rules, and exposes a single endpoint per use case.

Why it matters

In composable commerce, the storefront may rely on a dozen specialized services for catalog, pricing, inventory, recommendations, content, and customer data. Talking to all of them from the browser is slow, hard to secure, and hard to evolve. A BFF gives the frontend team a clean contract, removes secrets from the client, and lets each frontend evolve at its own pace without dragging the underlying services.

Architectural fit

The BFF pattern aligns naturally with frontend management platforms. The BFF lives close to the rendering layer, optimizes payloads for the channel it serves, and isolates upstream changes from the client. As long as the BFF maintains its contract, downstream services can be replaced, upgraded, or split without forcing frontend rewrites.

Explore Composable Headless Frontend · Performance and Core Web Vitals.

Frontend Insights