Back to work
E-commerce2024Independent Engineer

Headless commerce platform

A €40M GMV apparel brand stuck on Magento 2, paying for a stack their team hated and their customers felt. Mobile conversion was the bleeding edge: industry average was 2.1%, theirs was 0.7%, and every campaign poured money into a leaking funnel.

I rebuilt the storefront from scratch as a Next.js App Router project against Shopify's Storefront API, keeping their existing PIM and ERP integrations intact. The checkout was reduced from a six-step Magento monolith to a two-step flow that loads instantly and ships before the user has time to second-guess.

Mobile conversion went from 0.7% to 2.2% (+212%). Lighthouse holds 98/100 in production. The team ships changes themselves now without a Magento consultant.

E-commerce · 2024
Headless commerce platform
$10M+
Annual GMV
+212%
Mobile conversion
98 / 100
Lighthouse

Tech stack

The whole picture.

Top-level technologies. Specific packages and integrations are listed below.

Next.jsTypeScriptShopify Storefront APITailwind CSSVercelCloudflare

Architecture

End to end.

Web
  • Next.js App Router with ISR per product page
  • Edge middleware for geo-redirect and A/B framing
  • Cart state in encrypted cookie + Shopify Cart API
  • Server Actions for newsletter, returns, account
Backend
  • Cloudflare Workers as a thin BFF between storefront and Shopify
  • Webhook fan-out to Klaviyo and the warehouse OMS

Libraries

Packages worth naming.

  • Next.js App RouterCache Components + ISR
  • TanStack Querycart and customer hydration
  • ZodStorefront response parsing
  • Vitest + Playwrightunit + e2e checkout coverage

Integrations

External systems.

  • Shopifycatalog, inventory, orders
  • Stripealternative payment methods
  • Klaviyolifecycle email and SMS
  • Algoliasearch + facets
  • GA4 + Meta CAPIserver-side conversion tracking

Building something similar?

Tell me about the product. I'll come back with thoughts and a first shipping date.

Let's talk