Back to themes

Astro Medusa Storefront

A blazing-fast, open-source ecommerce storefront built with Astro, React, and Medusa v2 — deployed to the edge on Cloudflare Workers. Static-first architecture with interactive islands for cart, checkout and navigation.


Cost

Free


Created by
Bystrol

A production-ready ecommerce storefront — static where possible, dynamic where necessary.

Astro Medusa Storefront is a full-featured, open-source ecommerce starter that pairs Astro's islands architecture with Medusa v2 as a headless commerce backend. Product pages ship as zero-JS static HTML, while cart, checkout, and navigation hydrate as lightweight React islands — only loading JavaScript where interactivity is actually needed.


Key Features

  • Static-first product pages — Product catalog and detail pages are statically generated at build time for instant load times. Medusa webhooks trigger re-deploys to keep content in sync.
  • Real-time inventory — Variant stock data is fetched client-side on page load, so availability stays accurate even on statically generated pages.
  • Multi-step checkout — Address, shipping, and payment steps with Stripe integration, form validation via React Hook Form + Zod.
  • Region-aware routing — Every route is prefixed with an ISO-2 country code, driving region-based pricing, currency, and shipping options through Medusa regions.
  • Edge deployment — Ships with a Cloudflare Workers adapter out of the box, running your storefront close to your customers worldwide.
  • Minimal client-side JS — Cart state is managed with Nanostores and persisted in localStorage. No heavy state management libraries.

Tech Stack

  • Astro 6 — Static HTML, islands of interactivity
  • React 19 — Only where you need it
  • Tailwind CSS v4 — Zero-config Vite plugin, theme customization in CSS
  • Medusa v2 — Headless commerce engine
  • Stripe — Secure payment processing
  • Nanostores — Tiny, framework-agnostic state management
  • React Hook Form + Zod — Type-safe form validation
  • Cloudflare Workers — Edge-first deployment

Pages Included

  • Landing page
  • Product catalog
  • Product detail with image carousel
  • Shopping cart
  • Multi-step checkout (address, shipping, payment)
  • Order confirmation

Who Is This For?

Developers and teams looking for a performant, modern ecommerce starter that doesn't compromise on speed. If you want the DX of Astro, the commerce capabilities of Medusa, and near-instant page loads from edge deployment — this is your starting point.