Overview:
This document provides a guide to setting up and running a fully-fledged eCommerce demo store using the Commerce.js SDK and Next.js. It offers instructions for both one-click deployment using Netlify and manual setup. Prerequisites for using this template include having an IDE or code editor, Node, NPM or Yarn, and the Chec CLI.
Features:
- One-click deployment to Netlify
- Integration with Commerce.js SDK for eCommerce functionality
- Customization and extendability options
- Support for shopping carts, checkout process, customers, and payment gateways
Installation:
Prerequisites:
- IDE or code editor
- Node (v8.2.0 or higher)
- NPM or Yarn
- Chec CLI
Setup:
- Create a Chec account.
- Install the Chec CLI globally:
yarn global add @chec/cli - Follow the provided instructions to set up your merchant details or register for a Chec account.
One-click Deploy with Netlify (recommended):
- Sign up for a Netlify account.
- Click the “Deploy to Netlify” button in the document.
- Connect your GitHub account to Netlify.
- Name your repository and enter the provided public key in the Chec Public Key input.
- Save and deploy your site.
Note: Using the provided public key is recommended for quick deployment, but if you want to use your merchant account, follow the manual setup steps below.
Manual setup and Netlify deployment:
- Clone the repository and install dependencies.
- Set up your environment variables by replacing the sample
.env.examplefile at the root of the project with your Chec public key. - Deploy the project to Netlify.
Summary:
This document provides a comprehensive guide to setting up and running an eCommerce demo store using Commerce.js and Next.js. It offers both one-click deployment options and manual setup instructions. The template supports various eCommerce features such as shopping carts, checkout process, customers, and payment gateways.