chec / commercejs-nextjs-vercel

Serverless eCommerce demo store built for the Jamstack. Built with Commerce.js, Next.js and can be one click deployed to Vercel. Includes product catalogue, categories, variants, cart, checkout, order confirmation and printable receipts. This is an open source project.
https://commercejs-nextjs-vercel.vercel.app/
BSD 3-Clause "New" or "Revised" License
84 stars 25 forks source link
chec commerce commercejs demo-store ecommerce jamstack nextjs one-click-deploy open-source serverless vercel

Demo Store with Commerce.js and Next.js 🛍️💳

A high-fidelity fully-fledged eCommerce demo store built using the Commerce.js SDK and Next.js with live deployment to Vercel.

Live demo

Vercel Demo Preview

Note

Overview

This README will guide you in getting up and running with a fully-fledged eCommerce template. We have configured this template for you to one-click deploy directly to Vercel. Alternatively, you can manually deploy to your choice of hosting platform.

Prequisites

Setup

Create a Chec account.

Now that you’ve installed Chec CLI globally, you will be able to access the list of chec [COMMANDS], one of which is registering for a Chec account. Let’s go ahead and get that set up!

# Open the Chec registration page in your browser
chec register

Follow the rest of the walk-through to set up your merchant details. Alternatively, you can go here to register for a Chec account.

One-click Deploy with Vercel (recommended)

The one-click deploy allows you to add the Vercel application to your GitHub account to clone the commercejs-nextjs-vercel repository and deploy it automatically. Be sure to go to Vercel and sign up for an account with Github, GitLab, or GitBucket before clicking the deploy button.

Deploy with Vercel

Please note that the site deploy will first fail as we have yet to enter in the environment variables for your Vercel site. Configure your site by going under the Project Settings in the General tab then scroll down to Environment Variables to enter your public API key. The value is automatically encrypted and stored in Vercel system. The variable name input is CHEC_PUBLIC_KEY and the value input is the Public Key. Please note that for the purpose of getting you up and running with a live deploy preview of the demo store, we have provided you with the public_key from our demo merchant account. Access this key here and copy over the CHEC_PUBLIC_KEY value.

🥞 Stack

Customization and Extendability