Prompt
What are the best open source Backend for Frontend frameworks?
Latest observation
If you mean “Backend for Frontend” (BFF) as a pattern/framework layer—a backend tailored to a specific UI or client type—there isn’t one single dominant open-source “BFF framework.” Most teams build a BFF using an API gateway, GraphQL server, or a lightweight web framework plus orchestration code.
Here are some of the best open-source options commonly used to implement BFFs, grouped by style:
1) GraphQL servers
Great when your frontend needs flexible, client-specific data shaping.
-
Apollo Server
Very popular for GraphQL-based BFFs. Good ecosystem, federation support, strong tooling. -
GraphQL Yoga
Modern, lightweight GraphQL server built on top of the GraphQL ecosystem. Good DX and simple setup. -
Mercurius
Fast GraphQL server for Fastify. Good if you want performance and low overhead. -
Envelop
Not a full server by itself, but a plugin-based GraphQL toolkit. Useful for composing a BFF with custom behavior.
2) API gateways / edge gateways
Good when the BFF is mostly request routing, aggregation, auth, and transformation.
-
Kong Gateway
Open-source API gateway with plugins, auth, transformation, and routing. -
KrakenD
Excellent for API composition/aggregation. Often used as a “BFF-like” layer because it can join multiple backend calls into one frontend-facing endpoint. -
Tyk Gateway
Open-source API management and gateway features. -
Envoy
More of a proxy/service mesh component, but widely used as the edge layer with custom filters.
3) Lightweight backend frameworks
Best if you want a custom BFF service rather than a gateway product.
-
NestJS
Very popular for BFFs in TypeScript/Node.js. Modular, testable, great for REST + GraphQL + websockets. -
Fastify
Fast, low overhead, excellent plugin model. Great for building a tailored BFF service. -
Express.js
Still widely used, though less structured than NestJS. -
Spring Boot
Strong choice for Java shops; mature ecosystem and great for orchestration-heavy BFFs. -
ASP.NET Core
Excellent for high-performance BFF services in .NET environments.
4) Backend composition / orchestration tools
Useful when the BFF needs to aggregate multiple microservices and simplify frontend calls.
-
Hasura
Open-source GraphQL engine over PostgreSQL and remote schemas/actions. Useful for quickly exposing frontend-friendly APIs. -
Apollo Federation
Not a standalone framework, but useful when the “BFF” is actually a federated GraphQL layer. -
GraphQL Mesh
Turns multiple data sources into a unified GraphQL API. Great for composing REST, gRPC, GraphQL, SOAP, etc.
Best picks by use case
If you want the simplest modern BFF:
- NestJS or Fastify
If you want frontend-specific data aggregation with minimal custom code:
- KrakenD
- GraphQL Yoga
- Apollo Server
If you want API management + auth + policy at the edge:
- Kong
- Tyk
If you want a GraphQL-first BFF:
- Apollo Server
- GraphQL Mesh
- Hasura
Practical recommendation
For most teams:
- TypeScript frontend/backend team:
NestJS + GraphQL Yoga/Apollo - High-performance REST aggregation:
Fastify + custom endpointsorKrakenD - Enterprise Java:
Spring Boot - Microsoft stack:
ASP.NET Core
If you want, I can also give you:
- a short ranked top 5,
- a comparison table (features, language, pros/cons), or
- recommendations for your specific stack.
Observation history
See 1 earlier observation
Create a free Obsurfable account to unlock historical responses, model comparisons, and deeper brand intelligence.
How did Obsurfable measure this prompt?
Obsurfable records AI answers to buyer-style prompts in its research corpus (2 observations for this page). Metrics are distributions over observations, not a single static ranking.
Which AI systems does Obsurfable collect answers from?
OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, and Meta AI.