Commercejs Nextjs Demo Store

screenshot of Commercejs Nextjs Demo Store
nextjs
react
scss

Commerce demo store built for the Jamstack. Built with Commerce.js, Next.js, and can be one-click deployed to Netlify. Includes product catalog, customer login, categories, variants, cart, checkout, payments (Stripe) order confirmation, and printable receipts.

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

Prerequisites:

  • IDE or code editor
  • Node (v8.2.0 or higher)
  • NPM or Yarn
  • Chec CLI

Setup:

  1. Create a Chec account.
  2. Install the Chec CLI globally: yarn global add @chec/cli
  3. Follow the provided instructions to set up your merchant details or register for a Chec account.

One-click Deploy with Netlify (recommended):

  1. Sign up for a Netlify account.
  2. Click the "Deploy to Netlify" button in the document.
  3. Connect your GitHub account to Netlify.
  4. Name your repository and enter the provided public key in the Chec Public Key input.
  5. 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:

  1. Clone the repository and install dependencies.
  2. Set up your environment variables by replacing the sample .env.example file at the root of the project with your Chec public key.
  3. 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.

nextjs
Next.js

Next.js is a React-based web framework that enables server-side rendering, static site generation, and other powerful features for building modern web applications.

react
React

React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components

scss
SCSS

SCSS is a preprocessor scripting language that extends the capabilities of CSS by adding features such as variables, nesting, and mixins. It allows developers to write more efficient and maintainable CSS code, and helps to streamline the development process by reducing repetition and increasing reusability.

ecommerce
Ecommerce

Ecommerce websites sell products or services to customers through an online storefront. These websites typically include features such as product listings, shopping carts, payment processing, and order management tools.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

netlify
Netlify

Netlify is a cloud-based web development platform that provides a range of tools and services to help developers build, deploy, and manage modern web applications. It offers features such as continuous deployment, serverless functions, and CDN hosting, making it an ideal platform for building fast, scalable, and secure websites.

Redux

Redux is a state management library for JavaScript apps that provides a predictable and centralized way to manage application state. It enables developers to write actions and reducers that update the state in response to user interactions, server responses, and other events, and can be used with a variety of front-end frameworks and back-end technologies.