Skip to content

Data & APIs Overview

MFEs don’t call backend services directly. All API traffic goes through Kong API Gateway with OAuth2 authentication. This applies to any service behind Kong: PODS (product data), Newsletter, Commerce, etc.

Diagram

Key facts:

  • All API calls are server-side only (RSC, server actions, API routes) — never from the browser
  • Authentication uses OAuth2 client credentials stored in AWS Secrets Manager
  • Token management is handled by KongAuthenticator (singleton, proactive refresh)
DataSourceProtocolUsed By
Product info (price, stock, media)PODSGraphQLPDP, Content (carousels)
Content pages, componentsSanity CMSGROQContent MFE
Shell config (header, footer)Sanity CMSGROQAll MFEs (via Web Shell)
Cart, checkoutSFCC Commerce APIRESTWeb Shell, Checkout
Newsletter signupNewsletter APIRESTContent, Footer
User sessionCookies (same domain)HTTPAll MFEs

ADR-0008: Every new MFE that needs product data MUST use PODS, not SFCC Commerce API.

SFCC is being phased out. PODS is the single source of truth for product data.

PageWhat you’ll learn
Kong AuthenticationOAuth2 setup, KongAuthenticator, secrets injection
PODS IntegrationApollo Client, GraphQL queries, store IDs, locale mapping
Session SharingHow auth cookies work during the SFCC → headless transition