Speak to an Expert

eCommerce

Headless Commerce: Shopify Hydrogen vs Next.js Commerce vs Custom

Shopify Hydrogen, Next.js Commerce or a custom build? Three headless commerce architectures compared by where they win, what to watch for, and rough build timelines.

Jun 22, 2026 · 4 min read
Cover reading Headless commerce, three ways, with a panel of rough initial build times: Shopify Hydrogen 4-10 weeks, Next.js Commerce on Shopify 6-12 weeks, and custom with Medusa or Saleor 12-24 weeks.

Headless commerce promises a fast, conversion-optimized storefront on top of a flexible commerce backend. This guide is for founders, product owners and engineering leads choosing a storefront architecture, and it compares the three options that dominate the conversation: Shopify Hydrogen, Next.js Commerce and a custom build. You will get where each one wins, what to watch out for, a rough cost and timeline for each, and a simple way to decide.

Key takeaways: three headless commerce architectures at a glance

  • Shopify Hydrogen: best when your commerce platform is Shopify and you want a fast Remix storefront. Tight integration, fast time-to-market.

  • Next.js Commerce: best when you want flexibility on the backend (Shopify, BigCommerce, Saleor, Commerce.js, Medusa). Strong React ecosystem fit.

  • Custom (Next.js + Medusa or Saleor or custom): best when your commerce logic genuinely does not fit a platform. Highest ceiling, highest cost.

Architecture

Storefront

Backend

Best fit

Shopify Hydrogen

Remix, hosted on Oxygen

Shopify only

Brands on Shopify that want maximum performance

Next.js Commerce

Next.js (React)

Shopify, BigCommerce, Saleor, Medusa, Commerce.js, Swell

Teams that want React and the freedom to swap backends

Custom

Next.js or any framework

Medusa, Saleor, Commerce.js or your own

Non-standard models: subscription, marketplace, B2B

Why the storefront decision matters for years

The storefront decision compounds for years. Picking Hydrogen because everyone else uses Hydrogen, then realizing you needed Saleor's flexibility, means a re-platform. Pick once, pick right.

A storefront is not only the pages your customers see. It shapes how your team ships features, which hosting you depend on, which skills you hire for, and how easily you can change the commerce engine underneath later. That is why the choice deserves a deliberate comparison rather than a default.

Shopify Hydrogen: the fastest path for Shopify brands

Hydrogen is a Remix-based framework purpose-built for Shopify storefronts. It integrates directly with the Shopify Storefront API, renders on the server, and is edge-friendly via Oxygen hosting.

Where Hydrogen wins

You are on Shopify (Plus or Standard), you want maximum performance, and you want first-party tooling for cart, checkout and customer accounts.

What to watch out for

Hydrogen is tied to Shopify, which is good if you are not leaving. It is Remix-based, so your team needs Remix familiarity.

Next.js Commerce: flexibility across commerce backends

Next.js Commerce is Vercel's framework example for headless commerce. It has pluggable backends: Shopify, BigCommerce, Saleor, Medusa, Commerce.js and Swell.

Where Next.js Commerce wins

You want React and Next.js, flexibility to swap commerce backends, and deployment on Vercel or Cloudflare. If hosting cost is part of that decision, our write-up on migrating from Vercel to Cloudflare Pages covers the trade-offs.

What to watch out for

It is a reference implementation, not a turnkey product. Expect engineering investment to turn it into a production storefront.

Custom headless commerce with Next.js, Medusa or Saleor

You pick a backend and build the storefront on Next.js (or any framework). The common backends each suit a different team:

Backend

What it is

Medusa

Self-hosted, JavaScript

Saleor

GraphQL, Python

Commerce.js

Headless SaaS

Where custom wins

Your commerce model is non-standard: subscription-heavy, marketplace, complex pricing, or B2B with quotes and contracts. These are the cases where bending a platform costs more than owning the logic.

What to watch out for

Custom is the highest cost and the slowest time-to-market. You are committing to ongoing engineering ownership.

Headless commerce cost and timeline: a rough order

Architecture

Initial build

Ongoing engineering

Hydrogen

4-10 weeks

Low

Next.js Commerce on Shopify

6-12 weeks

Low

Custom (Medusa/Saleor)

12-24 weeks

Moderate

These are rough orders, not quotes. The spread inside each range comes from catalogue size, integrations and how much of the design is bespoke. Remember that the storefront is one layer of a wider stack; our guide to the D2C brand stack covers the OMS, fulfillment and analytics that sit around it.

What we recommend: how to choose

  1. Are you committed to Shopify? Choose Hydrogen.

  2. Want flexibility but a platform-managed backend? Choose Next.js Commerce with Shopify or BigCommerce.

  3. Have genuinely custom commerce needs (B2B, marketplace, subscription)? Go custom with Medusa or Saleor.

FAQs

Hydrogen on Oxygen vs Vercel?

Oxygen is purpose-built for Hydrogen; Vercel is more general. Performance is comparable.

Can we mix a Shopify backend with a different storefront?

Yes. A Shopify backend with a non-Hydrogen storefront is common, which is exactly what Next.js Commerce on Shopify gives you.

What about Sanity for content?

Sanity is an excellent companion to any of these for content-heavy commerce.


Choosing between Hydrogen, Next.js Commerce and a custom build is easier with a partner who has shipped storefronts on each. Talk to Techpuvi about eCommerce engineering, or explore our eCommerce industry work.

Niranjana serves as a Senior Architect at Techpuvi. She brings more than 15 years of experience in software development, having built several products from the ground up. Choosing to specialize as a full-stack engineer, she maintains a strong commitment to continuous learning.