Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Open-source ecommerce storefront built with Astro, React, and Medusa v2, deployed to Cloudflare Workers.
Astro Medusa Storefront is an open-source ecommerce starter that pairs Astro's static-first islands architecture with Medusa v2 as a headless commerce backend to produce a storefront that deploys to Cloudflare Workers.
Astro Medusa Storefront is a starter template for building high-performance ecommerce sites with Astro 6, React 19, and Medusa v2. It takes a Medusa backend URL, publishable key, Stripe keys, and a default region as environment configuration and outputs a static-first storefront with product catalog, product detail pages, cart, multi-step checkout, and order confirmation. The template uses Tailwind CSS v4 for styling, Nanostores for client-side cart state, and React Hook Form with Zod for checkout validation. It is authored by Michal Bystryk and distributed under the MIT license.
yarn build and yarn preview commands for a production build and local preview.src/lib/sdk.ts connects to your backend; webhooks trigger re-deploys whenever products are created, updated, or deleted./:country/store), and middleware handles region detection and country-based routing, with pricing, currency, and shipping resolved via Medusa regions.PUBLIC_STRIPE_KEY.@theme, powered by the Vite plugin.localStorage.src/modules.src/pages/[countryCode].yarn dev against a local Medusa server and Stripe test keys.Clone the repository, install dependencies with Yarn 4.x, copy .env.example to .env, and fill in your Medusa backend URL, publishable key, default region, Stripe key, and optional S3 and InPost settings. Run yarn dev for local development on port 8000, then yarn build to generate a Cloudflare Workers production build. Medusa webhooks keep statically generated product pages in sync by triggering a re-deploy on catalog changes.
Yes, it is open-source under the MIT license, so you can use, modify, and deploy it without licensing fees.
You need Node.js 18 or newer, Yarn 4.x, a running Medusa v2 backend, and a Stripe account. The README also notes that your Medusa backend must have CORS configured to allow requests from your storefront origin.
Product variant availability is fetched client-side on page load from the Medusa backend, so shoppers see current stock even though the page itself is statically generated.
Yes. Routes are prefixed with ISO-2 country codes, and middleware performs region detection and country-based routing. Pricing, currency, and shipping options are resolved through Medusa regions.
Yes. Styling uses Tailwind CSS v4 with a zero-config Vite plugin; you customize the theme in CSS using @theme rather than a tailwind.config.js file.
