QuickstartStorefront

Storefront

This guide will help you set up a Nimara storefront in your local environment.

Install project

Clone repo and install dependencies.

git clone https://github.com/mirumee/nimara-ecommerce.git nimara-ecommerce
cd nimara-ecommerce
pnpm install

Copy variables

Copy environment variables from .env.example to .env:

cp .env.example .env

Add backend URL

Use a free developer account at Saleor Cloud to start quickly with the backend. Alternatively, you can run Saleor locally using Docker.

# Add backend address
# Make sure to add slash at the end:
NEXT_PUBLIC_SALEOR_API_URL=https://{your_domain}.saleor.cloud/graphql/
 
# Local example
# NEXT_PUBLIC_SALEOR_API_URL=http://localhost:8000/graphql/

Set Saleor App Token

To authenticate the storefront with the Saleor backend, you need to generate an App Token.

  1. Go to the Saleor dashboard: ConfigurationWebhooks & Events.

  2. Click Create App.

  3. Assign the necessary permissions for your app - Handle checkouts and Manage Customers: Saleor Dashboard

  4. Copy the generated token and add it to your .env file:

SALEOR_APP_TOKEN={your_generated_token}

Run project

Run the development server.

pnpm run dev:storefront