Next.jsReactE-commerceStarter

medusa-storefront-nextjs-default-starter — Next.js Ecommerce Template

By vanphongngo

A Next.js-based Medusa headless e-commerce frontend starter that requires a local Medusa service to run, including product, account, search, and payment modules.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

2 previews
Desktop homepage1 / 2
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 2

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-02View source

What stands out

A quick read of the recorded project description.

01

E-commerce frontend built with Next.js, Tailwind CSS, and TypeScript

02

Covers product browsing, customer accounts, cart, and checkout flow

03

Built-in configuration entry points for Stripe and PayPal payment integrations

04

Search supports the MeiliSearch plugin by default and can be switched to Algolia

05

MIT licensed, free to use, modify, and distribute

Template Details

This template is a replica of the official Medusa Next.js Starter, used to build a frontend storefront for the Medusa headless e-commerce engine. The tech stack is Next.js, Tailwind CSS, and TypeScript; the code is hosted on GitHub under the MIT license.

Functional scope covers the complete e-commerce flow: product browsing, customer accounts, cart and checkout, with built-in Stripe and PayPal payment integrations. Search defaults to the MeiliSearch plugin but can be switched to Algolia. The README mentions that App Router and Product Module support are planned (coming soon) and are not included in the current version.

Before use, you need to run the Medusa service locally on port 9000 and prepare environment variables such as the Medusa backend URL; payments and search also require corresponding plugin configuration on the Medusa server side. The demo site is deployed on Vercel; the repository itself does not include the backend or third-party services.

Next.jsE-commerceStarter

Is it right for your project?

Use Cases

  • Build a matching Next.js frontend storefront for a self-hosted Medusa backend
  • Quickly validate product, account, and checkout flows on an existing Medusa service
  • E-commerce frontend projects that need to integrate both Stripe and PayPal
  • Stores that want product search via MeiliSearch or Algolia

Suitable For

  • Developers who have deployed or plan to deploy a Medusa service
  • Frontend teams familiar with Next.js and TypeScript
  • Independent developers who need headless e-commerce frontend starter code
  • Technical teams that want to self-host both the e-commerce frontend and backend

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    Before running, start the Medusa service locally on port 9000; you can refer to medusa-starter-default for quick setup.

  2. 2

    Copy .env.template to .env.local and fill in environment variables such as the Medusa backend URL.

  3. 3

    Install dependencies with Yarn and run yarn dev; the development server runs on port 8000 by default.

  4. 4

    To enable Stripe or PayPal, configure the corresponding public keys in .env.local and install the relevant plugins on the Medusa server side.

  5. 5

    To enable search, turn on the search switch in store-config.json and install the MeiliSearch plugin on the Medusa server side.

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version in a public repository under the MIT license; the free scope applies to this version's code and does not imply that external services or third-party assets are free.

Must comply with when using

  • Free use, modification, commercial use, and distribution of this version's code are permitted.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
  • The code is provided as-is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • Before using this template, you must deploy and run the Medusa backend service yourself (default local port 9000); the template does not include the backend, and it cannot function properly without it.
  • Enabling Stripe and PayPal payments requires applying for and configuring the corresponding public keys/client IDs and installing the relevant plugins on the Medusa server side, involving third-party payment accounts.
  • Enabling search requires installing the MeiliSearch plugin on the Medusa server side and may require deploying the MeiliSearch service yourself.
  • If switching to Algolia search, you need to additionally install the algoliasearch dependency and configure Algolia's App ID and API Key, which is a third-party paid service.
  • Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
  • External services such as domains, hosting, databases, payments, or AI may incur additional charges.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

To use the starter you should have a Medusa server running locally on port 9000.

Original README

To enable the integrations you need to add the following to your `.env.local` file:

Original README

Before you can search you will need to install the plugin in your Medusa server

Original README

you will need to add `algoliasearch` to the project

Original README
https://github.com/vanphongngo/medusa-storefront-nextjs-default-starter/blob/main/LICENSEhttps://github.com/vanphongngo/medusa-storefront-nextjs-default-starter/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-02. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
Partly documented · 70 / 100
Technologies
Next.js · React
Website type
E-commerce · Starter
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2023-06-30
Screenshot last checked
2026-10-02

A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.

The catalog identifies Next.js as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Automatically checked against source and license rules; no manual editorial review.

Inspect the recorded source material

SHA-256: b6c8bf5d5eb9f37fb05430059220027081c8ec37bfa39eff2bc1f129f721da05

2026-10-02T19:44:57.050Z

Source file / repository
<p align="center">
  <a href="https://www.medusajs.com">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/59018053/229103275-b5e482bb-4601-46e6-8142-244f531cebdb.svg">
    <source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
    <img alt="Medusa logo" src="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
    </picture>
  </a>
</p>

<h1 align="center">
  Medusa Next.js Starter
</h1>

<p align="center">
Medusa is an open-source headless commerce engine that enables developers to create amazing digital commerce experiences.
</p>

<p align="center">
  <a href="https://github.com/medusajs/medusa/blob/master/CONTRIBUTING.md">
    <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" alt="PRs welcome!" />
  </a>
  <a href="https://discord.gg/xpCwq3Kfn8">
    <img src="https://img.shields.io/badge/chat-on%20discord-7289DA.svg" alt="Discord Chat" />
  </a>
  <a href="https://twitter.com/intent/follow?screen_name=medusajs">
    <img src="https://img.shields.io/twitter/follow/medusajs.svg?label=Follow%20@medusajs" alt="Follow @medusajs" />
  </a>
</p>

> **Prerequisites**: To use the starter you should have a Medusa server running locally on port 9000. Check out [medusa-starter-default](https://github.com/medusajs/medusa-starter-default) for a quick setup.

# Overview

The Medusa Next.js Starter is built with:
- [Next.js](https://nextjs.org/)
- [Tailwind CSS](https://tailwindcss.com/)
- [Typescript](https://www.typescriptlang.org/)
- [Medusa](https://medusajs.com/)

Features include:
- Full e-commerce support
- Next.js 13
- Customer Accounts
- Search with Algolia
- Checkout with PayPal and Stripe
- App Router (coming soon)
- [Product Module](https://docs.medusajs.com/modules/products/serverless-module) support (coming soon)

# Quickstart

## Deploy


### Deploy with Vercel
To get started, click the "Deploy with Vercel" button below.

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fmedusajs%2Fnextjs-starter-medusa&env=NEXT_PUBLIC_MEDUSA_BACKEND_URL&envDescription=The%20URL%20of%20your%20Medusa%20server&envLink=https%3A%2F%2Fdocs.medusajs.com%2Fdeployments%2Fserver%2F&demo-title=Medusa%20Next.js%20Starter&demo-description=A%20fully-fledged%20e-commerce%20store%20with%20Next.js%20and%20Medusa&demo-url=https%3A%2F%2Fnext.medusajs.com&demo-image=https%3A%2F%2Fmedusa-server-testing.s3.amazonaws.com%2FCleanShot%2B2023-06-22%2Bat%2B09.00.53%25402x-1687417264472.png&skippable-integrations=1)

## Setting up the environment variables

Navigate into your projects directory and get your environment variables ready:

```shell
cd nextjs-starter-medusa/
mv .env.template .env.local
```

### Install dependencies

Use Yarn to install all dependencies.

```shell
yarn
```

### Start developing

You are now ready to start up your project.

```shell
yarn dev
```

### Open the code and start customizing

Your site is now running at http://localhost:8000!

Edit `/pages/index.tsx` to see your site update in real-time!

# Payment integrations

By default this starter supports the following payment integrations

- [Stripe](https://stripe.com/)
- [Paypal](https://www.paypal.com/)

To enable the integrations you need to add the following to your `.env.local` file:

```shell
NEXT_PUBLIC_STRIPE_KEY=<your-stripe-public-key>
NEXT_PUBLIC_PAYPAL_CLIENT_ID=<your-paypal-client-id>
```

You will also need to setup the integrations in your Medusa server. See the [Medusa documentation](https://docs.medusajs.com) for more information on how to configure [Stripe](https://docs.medusajs.com/add-plugins/stripe) and [PayPal](https://docs.medusajs.com/add-plugins/paypal) in your Medusa project.

# Search integration

This starter is configured to support using the `medusa-search-meilisearch` plugin out of the box. To enable search you will need to enable the feature flag in `./store-config.json`, which you do by changing the config to this:

```json
{
  "features": {
    "search": true
  }
}
```

Before you can search you will need to install the plugin in your Medusa server, for a written guide on how to do this – [see our documentation](https://docs.medusajs.com/add-plugins/meilisearch).

The search components in this starter are developed with Algolia's `react-instant-search-hooks-web` library which should make it possible for you to seemlesly change your search provider to Algoli instead of MeiliSearch.

To do this you will need to add `algoliasearch` to the project, by running

```shell
yarn add algoliasearch
```

After this you will need to switch the current MeiliSearch `SearchClient` out with a Alogolia client. To do this update `@lib/search-client`.

```ts
import algoliasearch from "algoliasearch/lite"

const appId = process.env.NEXT_PUBLIC_SEARCH_APP_ID || "test_app_id" // You should add this to your environment variables

const apiKey = process.env.NEXT_PUBLIC_SEARCH_API_KEY || "test_key"

export const searchClient = algoliasearch(appId, apiKey)

export const SEARCH_INDEX_NAME =
  process.env.NEXT_PUBLIC_INDEX_NAME || "products"
```

After this you will need to set up Algolia with your Medusa server, and then you should be good to go. For a more thorough walkthrough of using Algolia with Medusa – [see our documentation](https://docs.medusajs.com/add-plugins/algolia), and the [documentation for using `react-instantsearch-hooks-web`](https://www.algolia.com/doc/guides/building-search-ui/getting-started/react-hooks/).

# Resources

## Learn more about Medusa

- [Website](https://www.medusajs.com/)
- [GitHub](https://github.com/medusajs)
- [Documentation](https://docs.medusajs.com/)

## Learn more about Next.js

- [Website](https://nextjs.org/)
- [GitHub](https://github.com/vercel/next.js)
- [Documentation](https://nextjs.org/docs)
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.