Docs

Medusa DTC Starter

by Medusa

A production-ready starter for direct-to-consumer ecommerce stores powered by Medusa and Next.js. Includes a fully featured storefront with product browsing, cart, checkout, customer accounts, and order management.

Medusa DTC Starter

Medusa DTC Starter

Documentation | Website

Building blocks for digital commerce

Medusa DTC Starter

A production-ready monorepo starter for direct-to-consumer ecommerce stores powered by Medusa and Next.js. Includes a fully featured storefront with product browsing, cart, checkout, customer accounts, and order management.

Features

  • All of Medusa's commerce features
  • Multi-region support with automatic country detection
  • Product catalog with variant selection
  • Cart with promotion codes
  • Multi-step checkout with shipping and payment
  • Customer accounts with order history and address management
  • Order transfer between accounts

Getting Started

Deploy with Medusa Cloud

The fastest way to get started is deploying with Medusa Cloud:

  1. Create a Medusa Cloud account
  2. Deploy this starter directly from your dashboard

Local Installation

**Prerequisites:

  1. Clone the repository and install dependencies:
  1. Set up environment variables for the backend:
  1. Set the database URL in :
  1. Run migrations:
  1. Add admin user:
  1. Start Medusa backend:
  1. Open the admin dashboard at and log in. Retrieve your publishable API key at Settings > Publishable API key.

  2. Set up environment variables for the storefront:

  1. Update with your Medusa publishable API key:
  1. Start storefront:

The storefront runs on .

You can slo run the following command from the root to start both backend and storefront:

pnpm dev

Configuration

The storefront is configured via environment variables in :

VariableDescriptionDefault
Publishable API key from your Medusa backend—
URL of your Medusa backend
Default region country code
Base URL of the storefront
Stripe publishable key (optional)—

Resources