Docs
NextCommerce

Installing and Configuring NextCommerce

In this part of the documentation we will show you how to install NextCommerce / NextMerce.

Before moving forward, make sure you have Node.js installed on your machine. Otherwise the installation commands will not work.

1. Download template and extract it. Then CD into that directory and run this command to install the dependencies:

npm install
# or
yarn install

2. After completing the installation run this command to start the developement server:

npm run dev

or

yarn dev

Next Steps

Once the installation is done,
Follow these steps to complete the installation.

  1. Database Integration - PostgreSQL on Vercel (opens in a new tab)

Note: you can use any PostgreSQL you want. Just save the database url in the env using this name:

DATABASE_URL=YOUR_DB_CONNECT_URL
  1. Authentication (opens in a new tab)
  2. Sanity Integration (opens in a new tab)

Follow the Sanity Integration guide to setup the project. After that take the Sanity ProjectID and title, and save them in the .env file under these variable names:

NEXT_PUBLIC_SANITY_PROJECT_ID=""
NEXT_PUBLIC_SANITY_PROJECT_TITLE=""

4.Sanity API integration (opens in a new tab)

5.Sanity Webhook integration (opens in a new tab)

6.Stripe Integration (opens in a new tab)

7.Algolia Integration (opens in a new tab)


Deploying to server

After the installation and customization are done you have to deploy the template. Here are the steps you need to follow to deploy the template:

Build the template locally and then deploy it to the server. Build the template using the following command, When you run this command you’ll get a build folder. Now you can upload this folder to your server and your site will be live.

npm run build

or

yarn build