5.1. Next.js Starter

In this chapter, you’ll learn how to install and use the Next.js Starter storefront.

Coming soon

The Next.js Starter is currently in development to fully support Medusa v2.

Install Next.js Starter#

  • Node v18+
  • At least one region in the Medusa application.
  1. Clone the v2 branch of the Next.js Starter:
git clone https://github.com/medusajs/nextjs-starter-medusa -b v2 my-medusa-storefront
  1. Change to the my-medusa-storefront directory, install the dependencies, and rename the template environment variable:
  1. While the Medusa application is running, start the Next.js storefront:

Your Next.js Starter Storefront is now running at localhost:8000.

Customize Storefront#

To customize the storefront, refer to the following directories:

  • src/app: The storefront’s pages.
  • src/modules: The storefront’s components.
  • src/styles: The storefront’s styles.

You can learn more about development with Next.js through their documentation.

Configurations and Integrations#

The Next.js Starter is compatible with some Medusa integrations out-of-the-box, such as the Stripe provider module. You can also change some of its configurations if necessary.

Refer to the Next.js Starter reference for more details.

Was this chapter helpful?