Skip to main content

Guide

Best E-Commerce Boilerplates in 2026

Best e-commerce boilerplates in 2026: Medusa.js, Next.js Commerce, Vendure, and Saleor compared on features, setup, inventory, payments, and when to use each.

StarterPick Team

TL;DR

For custom e-commerce in 2026: Medusa.js for full-stack control (free, MIT), Next.js Commerce for a Shopify headless frontend, Vendure for enterprise complexity. If you're just starting out and revenue is under $1M/year, Shopify at $29/month beats all of them — don't build what you can buy. Use these boilerplates when Shopify's limitations are actively blocking your business.

E-Commerce Is a Different Category

E-commerce and SaaS share authentication and payments — but the similarities end there. A SaaS boilerplate (ShipFast, Supastarter, Makerkit) gives you subscriptions, team management, and user settings. E-commerce needs something completely different:

  • Product catalog with variants, options, and SKUs
  • Inventory management and stock tracking
  • Shopping cart with session persistence
  • Shipping calculation (by weight, zone, carrier rates)
  • Tax handling (by jurisdiction, product type)
  • Order management, fulfillment, and returns
  • Customer address book
  • Discount codes, gift cards, and promotions

Standard SaaS boilerplates don't cover any of this. You need a dedicated e-commerce framework.

Quick Comparison

StarterPriceTypeInventoryAdminPaymentsGitHub Stars
Medusa.jsFree (MIT)Full-stack headless✅ FullStripe, PayPal, Klarna26k+
Next.js CommerceFreeHeadless storefrontVia backendVia backend12k+
VendureFree (MIT)Full-stack headless✅ FullStripe + plugins6k+
SaleorFree (BSD-3)GraphQL-first headless✅ FullStripe, Braintree20k+
WooCommerceFree (GPL)WordPress-embeddedManyMature
Shopify HydrogenFreeShopify headless ReactVia ShopifyVia ShopifyVia Shopify3k+

Medusa.js — Best for Custom E-Commerce

Price: Free (MIT) | Creator: Medusa team | Language: Node.js / TypeScript

The open-source Shopify alternative. Medusa is a headless commerce backend with a REST API and optional GraphQL. The backend ships with:

  • Product catalog (products, variants, options, collections)
  • Inventory management (per-location stock, reservations)
  • Order management (create, fulfill, cancel, return, exchange)
  • Customer management (addresses, order history, segments)
  • Shipping providers (FedEx, UPS, USPS via plugins)
  • Payment providers (Stripe, PayPal, Klarna via plugins)
  • Discount engine (codes, automatic discounts, buy X get Y)
  • Gift cards, promotions, and coupons
  • Multi-currency and multi-region pricing
  • Tax calculation (by region, product type, customer group)
  • Admin dashboard (full product/order/customer management)
# Bootstrap a new Medusa project with storefront
npx create-medusa-app@latest my-store --with-nextjs-starter
cd my-store

# Start backend (port 9000) + admin (port 7001)
cd backend && npm run dev
cd admin && npm run dev

# Start Next.js storefront (port 8000)
cd storefront && npm run dev

The Next.js storefront template gives you product listing, product detail pages, cart, checkout, account pages, and order history — ready to customize.

Admin dashboard: Medusa ships a React admin UI for product management, order processing (pick, pack, ship), customer management, inventory, and fulfillment. No separate purchase needed.

Plugin ecosystem: 50+ official and community plugins for shipping carriers, payment providers, search (Algolia, MeiliSearch), CMS (Contentful, Sanity), and fulfillment centers.

Choose Medusa when: You need a complete, self-hosted, fully customizable e-commerce platform. You want Shopify-level features without Shopify's pricing at scale. You need custom checkout flows, complex pricing rules, or B2B features.

Next.js Commerce — Best Headless Storefront

Price: Free | Creator: Vercel | Stars: 12k+

Not a backend — a Next.js 15 storefront template that connects to your commerce backend. Supports Shopify, BigCommerce, Saleor, WooCommerce, and custom backends via a provider abstraction.

What you get:

  • App Router with server components (excellent Core Web Vitals)
  • Product listing with filtering and search
  • Product detail pages with variant selection
  • Cart with optimistic updates
  • Checkout flow (delegates to backend)
  • Responsive design, mobile-first
  • TypeScript throughout
npx create-next-app -e https://github.com/vercel/commerce
# Configure your backend provider in .env.local
COMPANY_NAME="My Store"
TWITTER_CREATOR="@mystore"
SITE_NAME="My Store"
# Provider-specific vars (e.g., SHOPIFY_STORE_DOMAIN, SHOPIFY_STOREFRONT_ACCESS_TOKEN)

Choose Next.js Commerce when: You're using Shopify as your backend (for its powerful inventory, fulfillment, and merchant tools) but want a fully custom storefront built with Next.js. This is the best of both worlds: Shopify's merchant experience + your own frontend.

Vendure — Best for Enterprise Complexity

Price: Free (MIT) | Creator: Michael Bromley | Language: TypeScript / Node.js

TypeScript-first, plugin-based e-commerce framework. Where Medusa uses a REST API, Vendure is GraphQL-native. Built for complex enterprise requirements:

  • Plugin architecture: Every feature is a plugin, including core ones. Highly extensible.
  • B2B pricing: Customer-group-specific pricing, negotiated rates, volume discounts
  • Multi-vendor marketplaces: Separate seller accounts, commission splits, seller payouts
  • Custom tax rules: Per-jurisdiction, product-type, customer-category tax calculation
  • Complex fulfillment: Multi-warehouse, dropship, backorder handling
  • Custom workflows: Order state machine is fully customizable
// Vendure plugin example: custom order state
@VendurePlugin({
  imports: [PluginCommonModule],
})
export class CustomOrderStatesPlugin implements OnApplicationBootstrap {
  constructor(private orderService: OrderService) {}

  async onApplicationBootstrap() {
    // Add custom states to order state machine
    await this.orderService.transitionToState(orderId, 'AwaitingManufacturing');
  }
}

Choose Vendure when: You're building for enterprise clients with complex pricing, B2B features, multi-vendor requirements, or heavily customized fulfillment workflows. Less beginner-friendly than Medusa but more architecturally flexible.

Saleor — Best GraphQL-First Commerce

Price: Free (BSD-3) | Creator: Saleor Commerce | Language: Python (Django) + Next.js frontend | Stars: 20k+

GraphQL-first headless commerce. Saleor's backend is Django/Python, which means:

  • Excellent admin dashboard (auto-generated from Django models)
  • Strong data integrity
  • Python ecosystem for custom logic
  • Docker-native deployment

The React storefront (Saleor Storefront) is a Next.js app using Apollo Client. Full product/cart/checkout flow with TypeScript.

Choose Saleor when: Your team has Python/Django expertise, you need a battle-tested open-source platform with a strong community, or you want GraphQL throughout.

E-Commerce vs SaaS Boilerplate: Feature Matrix

RequirementSaaS BoilerplateE-Commerce Boilerplate
Authentication✅ (customer accounts)
Subscription billing❌ (one-time purchases)
Team / multi-tenancy
Product catalog
Inventory management
Shopping cart
Shipping calculation
Tax calculation
Order management
Returns and refunds
Discount engine

If you're building a subscription SaaS that sells digital products or services, use a SaaS boilerplate with Stripe. If you're building a store that sells physical products, you need an e-commerce framework.

The Shopify Decision

Before building a custom e-commerce solution, honestly evaluate Shopify:

Revenue RangeRecommendation
Pre-revenue or <$100k/yearShopify Basic ($29/month) — stop over-engineering
$100k-$1M/yearShopify Advanced ($299/month) — still cheaper than dev time
$1M-$10M/yearShopify Plus ($2,300/month) or custom backend
>$10M/year or complex requirementsCustom (Medusa/Vendure) headless + Next.js Commerce

Building custom e-commerce from a boilerplate makes sense when:

  • Shopify's checkout customization limits block your conversion optimization
  • You need custom pricing logic (B2B tiers, negotiated rates)
  • Transaction fees at scale exceed custom dev amortized cost
  • Regulatory requirements prohibit third-party payment processing
  • You need complex multi-vendor or multi-region functionality

Setup and Deployment Guide

# Backend: Railway or Render (needs Node.js + PostgreSQL)
# Admin: Static hosting (Netlify, Vercel)
# Storefront: Vercel

# 1. Deploy PostgreSQL on Railway
railway add --plugin postgresql

# 2. Deploy Medusa backend
railway up

# 3. Environment variables
MEDUSA_BACKEND_URL=https://your-backend.railway.app
DATABASE_URL=postgresql://...  # from Railway
STRIPE_API_KEY=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...

# 4. Deploy storefront to Vercel
NEXT_PUBLIC_MEDUSA_BACKEND_URL=https://your-backend.railway.app

Estimated monthly infrastructure cost (small store): $15-30/month on Railway + $0 Vercel hobby tier.

Choosing Between These Options

ScenarioBest Choice
First e-commerce project, < $500k/yearShopify ($29/month, don't build)
Custom storefront on ShopifyNext.js Commerce + Shopify backend
Full custom control, Node.js teamMedusa.js
Enterprise B2B, complex pricingVendure
Python/Django teamSaleor
WordPress ecosystemWooCommerce
Need multi-vendor/marketplaceVendure or Medusa with marketplace plugin

For most teams starting out, Medusa.js with the Next.js storefront template is the right choice for custom e-commerce. It has the best developer experience, the most active community, and the most complete feature set in the open-source Node.js ecosystem.

Browse all boilerplate categories on StarterPick or see the top SaaS boilerplates if you're building subscriptions rather than a store.

Inventory and Order Management Architecture

The catalog and checkout flow is where most e-commerce boilerplates focus their scaffolding, but inventory management and post-purchase order handling are where production stores spend most of their operational time. Understanding the data model for each before selecting a boilerplate helps you evaluate which stores have thought through the full commerce lifecycle versus which have a compelling checkout demo with incomplete operational tooling.

Inventory tracking at minimum requires a stockQuantity field on each product variant and a reservation system that prevents overselling during concurrent checkouts. The naive implementation — checking stockQuantity > 0 at checkout time and decrementing on order confirmation — fails under concurrency: two users checking out the last item simultaneously will both see stockQuantity = 1, both pass the check, and both complete the purchase. The correct implementation uses a database transaction with an optimistic lock or a pessimistic row lock: reserve inventory atomically at the moment of checkout intent, confirm the reservation on payment success, and release the reservation on payment failure or expiry.

Medusa.js handles this correctly in its core inventory service. The LineItem.reservationId tracks the inventory reservation from cart creation through order confirmation. If payment fails, the reservation is automatically released. Vendure's inventory service has similar semantics. Next.js Commerce delegates inventory management to the connected backend (Shopify handles it correctly; DIY Stripe-only storefronts need to implement it).

Order fulfillment states in a complete system extend beyond the simple pending/confirmed/shipped/delivered sequence. Returns, partial fulfillments (shipping item A before item B), replacements, and refunds are all fulfillment states that support teams encounter regularly. Medusa's order state machine covers these cases explicitly — the admin panel reflects the actual complexity of order management rather than a simplified demo flow.

What E-Commerce Boilerplates Commonly Omit

The starters covered above handle the core commerce loop — product catalog, cart, checkout, order management — but every production store needs additional infrastructure that boilerplates rarely scaffold. Planning these additions before you start prevents architecture surprises mid-build.

Tax calculation. Medusa and Next.js Commerce integrate with Stripe Tax and TaxJar for automated sales tax calculation across US states and VAT for EU customers. This is not optional for stores with customers in multiple jurisdictions — US sales tax nexus rules now apply to remote sellers above certain revenue thresholds in most states. Stripe Tax adds approximately 0.5% per transaction on top of Stripe's payment processing fee, but the alternative is manual tax compliance that no small team should attempt.

Inventory sync for multi-channel sellers. If you sell on your own storefront plus Amazon, Etsy, or wholesale accounts, you need inventory sync to prevent overselling. None of the open-source boilerplates include this out of the box. Linnworks, Skubana, or a custom webhook-based sync to your Medusa/Vendure backend handles it. For purely direct-to-consumer stores, the built-in inventory tracking in Medusa is sufficient.

Email sequences. Order confirmation, shipping notification, and abandoned cart emails are expected by every shopper. Medusa has native Sendgrid and Mailchimp integration through its notification plugin system. Next.js Commerce requires adding an email service directly. Resend with React Email templates is the simplest modern setup — the order confirmation and shipping notification emails can be built in an afternoon.

Search. For stores with more than a few hundred products, the default database search (SQL LIKE queries) is inadequate. Algolia is the standard recommendation — Medusa's Algolia plugin indexes products automatically on create/update. Typesense is the open-source alternative at significantly lower cost for high-query-volume stores. Both can be added post-launch, but integrating search before you have 500 products is much cleaner than retrofitting it.

Returns and refunds. Medusa includes a returns and refunds management interface in the admin panel. Next.js Commerce defers this to Shopify's or the connected backend's tooling. If you're building a custom storefront with Stripe as the payment processor, Stripe's dashboard handles refunds manually — a Stripe webhook can sync refund status back to your order database.

Performance and SEO for E-Commerce Storefronts

E-commerce SEO is more complex than SaaS SEO because product pages, category pages, and collection pages all need distinct optimization. The Next.js Commerce and Medusa storefronts are server-rendered by default, which means Googlebot sees fully rendered HTML — the baseline requirement for product indexation.

The performance considerations specific to e-commerce: product images are the dominant page weight. Every boilerplate should be configured with Next.js Image (next/image) for automatic WebP conversion and lazy loading. Medusa's storefront template uses it by default; verify your customizations preserve the <Image> component rather than replacing it with plain <img> tags during development.

Core Web Vitals for e-commerce pages are primarily constrained by Largest Contentful Paint (LCP) — typically the hero product image on a product page. Target under 2.5 seconds LCP on mobile. With a CDN-delivered product image and Next.js Image optimization, this is achievable without infrastructure investment beyond Vercel's default hosting.

Structured data (Schema.org Product markup) is increasingly important for Google Shopping and rich snippet eligibility. Medusa and Vendure storefronts do not include structured data by default — add application/ld+json Product schema to product page components to enable rich results in Google Search. This is a one-time addition that directly affects organic search visibility for product queries.


Find and compare e-commerce starters in the StarterPick directory.

See the best SaaS boilerplates guide if you're building subscriptions alongside a store.

Compare best free open-source SaaS boilerplates for no-cost foundations across all categories.

The SaaS Boilerplate Matrix (Free PDF)

20+ SaaS starters compared: pricing, tech stack, auth, payments, and what you actually ship with. Updated monthly. Used by 150+ founders.

Join 150+ SaaS founders. Unsubscribe in one click.