composable-commerce

Architect composable commerce stacks using MACH principles, event-driven sagas, and BFF aggregation.

3|1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/tomtoto757/ecomm-ai-team --skill composable-commerce-tomtoto757
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: composable-commerce
Source: https://github.com/tomtoto757/ecomm-ai-team/tree/main/skills/platform-integrations-infrastructure/finsilabs/headless-modern/composable-commerce
Command: npx skills add https://github.com/tomtoto757/ecomm-ai-team --skill composable-commerce-tomtoto757

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @commercetools/platform-sdk, @commercetools/sdk-client-v2, @aws-sdk/client-eventbridge, @graphql-tools/stitch, @graphql-tools/executor-http, opossum, algoliasearch, contentful.

What problem does it solve? Monolithic commerce platforms become hard to scale and evolve when different domains like catalog, checkout, and loyalty need independent release cycles or best-of-breed vendors. This Skill guides the design of a composable commerce architecture where each capability is an independent service coordinated through APIs and events. ## Core Features & Use Cases - MACH Service Design: Define bounded contexts for catalog, search, CMS, checkout, payments, and fulfillment using vendors like commercetools, Algolia, Contentful, and Stripe. - BFF Aggregation & Resilience: Build a Backend-for-Frontend layer with parallel fetching, GraphQL schema stitching, and opossum circuit breakers with fallbacks. - Event-Driven Sagas: Coordinate distributed transactions with AWS EventBridge choreography, compensating transactions on payment failure, and additive API versioning with OpenTelemetry tracing. - Use Case: A retailer migrating off Magento can use this Skill to build a product detail page BFF that aggregates catalog, inventory, reviews, and recommendations while degrading gracefully when the inventory service slows down. ## Quick Start Use the composable-commerce skill to design a BFF aggregation layer with circuit breakers and an event-driven order saga for my headless storefront.

Frequently Asked Questions about composable-commerce

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

FAQPage Schema
How do I build a composable commerce architecture with microservices?▼

Define bounded contexts around commerce capabilities like catalog, search, checkout, and payments, where each service owns its data and exposes it only via APIs. Add a BFF aggregation layer, coordinate workflows with event-driven sagas, and protect service calls with circuit breakers.

How to implement a saga pattern for distributed order transactions?▼

Use choreography-based sagas where each service publishes events via AWS EventBridge and reacts to others. On payment failure, publish a PaymentFailed event that triggers compensating transactions: releasing reserved inventory, updating order status, and notifying the customer.

What is a Backend-for-Frontend in headless commerce?▼

A BFF is an aggregation layer that combines multiple upstream APIs into a single request tailored to the frontend. It fetches independent services in parallel with Promise.all, makes sequential calls for dependent data, and can expose results through a stitched GraphQL gateway.

Does composable commerce work with Shopify or WooCommerce?▼

Yes, Shopify Hydrogen supports MACH patterns when Shopify acts as the commerce backend with a custom frontend, and WooCommerce can serve as a headless backend via its REST API and WPGraphQL. Magento's GraphQL API and PWA Studio also support headless architectures.

When should I not decompose into microservices?▼

Start with a modular monolith and decompose only when you have clear team ownership boundaries and operational maturity. Premature decomposition creates accidental complexity, distributed transaction failures, and debugging difficulty across many services.

How do I prevent cascading failures between commerce services?▼

Use circuit breakers like the opossum library configured with timeout, errorThresholdPercentage, and resetTimeout. Attach a fallback function that returns a degraded response, such as showing products as available without exact stock counts when inventory fails.