← Back to Architecture Patterns
Architecture Pattern

🛒 Composable Commerce

Decouple the storefront from the commerce backend. Next.js on Vercel becomes the presentation layer — fast, globally distributed, SEO-optimized — while Shopify, Commercetools, or BigCommerce handle inventory, cart, and checkout via APIs.

Why Composable Commerce?

Performance

Monolithic platforms (Magento, SFCC) serve 4-8s LCP. Composable with ISR + CDN delivers sub-1s globally.

🔧 Flexibility

Swap any backend service (search, CMS, payments) without touching the storefront. Best-of-breed for every capability.

📈 SEO & Core Web Vitals

ISR pages pre-rendered with perfect meta tags. next/image for optimized product photos. Google rewards fast sites.

🌍 Global Scale

Flash sales with 10x traffic? ISR pages serve from CDN cache — 10x hits, not 10x function invocations.

Architecture Layers

Storefront (Next.js on Vercel)

ISR product pages, SSR checkout, CSR cart. Edge Middleware handles geo-pricing, A/B tests, locale routing.

Commerce API

Shopify Storefront API, Commercetools, BigCommerce, or Medusa. Handles inventory, pricing, cart, and checkout logic.

Search & Discovery

Algolia or Elasticsearch for faceted search, autocomplete, and product recommendations.

Content Layer (CMS)

Sanity, Contentful, or Storyblok for banners, landing pages, and editorial content. Webhook → revalidateTag().

Payments & Checkout

Stripe, Adyen, or Braintree for payment processing. SSR checkout for auth-gated, fresh inventory checks.

Edge Network

Global CDN for static assets, ISR pages. Image optimization via next/image. Sub-50ms TTFB globally.

Rendering Strategy per Route

RouteStrategyWhy
/ISR (5min or webhook)Marketing homepage updates periodically. Webhook on CMS publish.
/products/[slug]ISR (1hr + webhook)100K+ pages — top 1K pre-built, rest on-demand. Webhook on product update.
/collections/[slug]ISR (15min)Collection pages update as products change. Short revalidation window.
/cartCSR (Client-Side)User-specific, sensitive. Client state only — no server rendering.
/checkoutSSR (force-dynamic)Auth-gated, fresh inventory check, payment session creation.
/account/*SSR (auth)User-specific order history. Cannot be cached or shared.

Key Vercel Features

ISR + Webhooks

Product pages regenerate when Shopify publishes. No full rebuild for 100K pages. On-demand invalidation via revalidateTag().

Edge Middleware

Geo-based pricing (USD in US, EUR in EU), A/B test checkout flows, locale routing — all at the edge, globally.

next/image

Product images auto-converted to WebP/AVIF, responsive sizes per device, lazy loaded. LCP improvement of 40-60%.

Streaming + Suspense

Product details load instantly (ISR), live inventory status streams in via Suspense boundary.

Skew Protection

During deploys, users with old JS get routed to matching deployment — no broken checkouts.

Edge Config

Feature flags for new checkout flow, sale banners, maintenance mode — near-zero latency reads.

Customer Results

Desenio37% conversion lift

Migrated from monolithic Magento to headless Next.js on Vercel. ISR product pages with sub-2s LCP.

PAIGE22% revenue boost

Composable commerce with Shopify + Next.js. Personalized experiences via Edge Middleware.

SupremeGlobal flash sales

Handles extreme traffic spikes during product drops. ISR + CDN absorbs millions of concurrent users.

Under Armour3x faster pages

Headless architecture replaced monolithic platform. Global CDN reduced latency for international customers.