create-bff-layer

Build a BFF layer aggregating bounded contexts into a client-facing API.

Updated Oct 27, 2025
One-click install
npx skills add https://github.com/mariotoffia/gobridge --skill create-bff-layer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-bff-layer
Source: https://github.com/mariotoffia/gobridge/tree/main/.cursor/skills/create-bff-layer
Command: npx skills add https://github.com/mariotoffia/gobridge --skill create-bff-layer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps engineering teams implement a Backend for Frontend (BFF) layer that aggregates data from multiple bounded contexts into a single client-focused API, reducing client-specific integration pain and duplication.

Core Features & Use Cases

  • Architectural pattern: design and implement BFF layers that coordinate across multiple bounded contexts without embedding domain logic.
  • Client-specific aggregation: expose endpoint surfaces tailored to client surfaces, with response shaping and error handling.
  • Developer workflow: supports API contract design (OpenAPI), client adapters for each bounded context, and testability via mocks and DI.
  • Use Case: imagine a mobile app requiring data from Sales, Inventory, and Loyalty contexts; the BFF aggregates calls, shapes payloads, and caches results for the client.

Quick Start

Set up the project skeleton, implement client adapters for each bounded context, wire dependency injection, and start the API server.

Frequently Asked Questions about create-bff-layer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I aggregate data from multiple bounded contexts into a single client-facing API?

Use a Backend for Frontend (BFF) layer to orchestrate calls across multiple bounded contexts, aggregating domain data into a single, tailored client-facing API without embedding domain logic.

What is the best way to orchestrate microservices for specific client interfaces?

The best way to orchestrate microservices for specific client interfaces is implementing a BFF layer that coordinates calls to public APIs, shapes payloads, and handles errors for each client surface.

How do I keep domain logic out of my API aggregation layer?

To keep domain logic out of your API aggregation layer, ensure your BFF orchestrates calls only to public APIs of bounded contexts and uses dependency injection for testability with mocks.

Does a BFF pattern support dependency injection and mocks for testing?

Yes, the BFF pattern supports dependency injection and provides testability using mocks, ensuring client adapters for each bounded context remain isolated and verifiable.

When should I use a Backend for Frontend instead of direct microservice calls?

Use a Backend for Frontend when client surfaces like mobile apps require orchestrated data from diverse domains, needing tailored responses, response shaping, and cached results from multiple contexts.

Can I design OpenAPI contracts for a BFF layer that aggregates multiple domains?

Yes, you can design OpenAPI contracts for a BFF layer by defining endpoint surfaces tailored to client needs and implementing client adapters for each bounded context to aggregate data.