Skip to content

contentstack/nextjs-ecommerce-template

Repository files navigation

Contentstack

Build a Website using Next.js and Contentstack

About Contentstack: Contentstack is a headless CMS with an API-first approach that puts content at the centre. It is designed to simplify the process of publication by separating code from content.

About this project: We have created a professional sample website using Next.js and Contentstack.

banner

Live Demo

You can check the live demo to get first-hand experience of the website.

Prerequisites

  • Install nodejs on your system.

Clone the repo

Clone the following repo. It contains all the required dependencies.

git clone https://github.com/contentstack/nextjs-ecommerce-template

Install dependencies

Go to the nextjs-ecommerce-template folder, and run the following:

  • cd nextjs-ecommerce-template

  • npm install

This downloads the required files and initializes the site.

Update Contentstack secrets

Copy the .env.sample file to .env.development.local and .env.production.local and update with your Contentstack details, including your API key and delivery token.

It should end up looking something like:

    api_key="YOUR_API_KEY"

    delivery_token="YOUR_DELIVERY_TOKEN"

    environment="YOUR_PUBLISHING_ENVIRONMENT"

    region="EXAMPLE eu"

Launch Your Server

Go to the nextjs-ecommerce-template folder, and run the following:

  • cd nextjs-ecommerce-template

  • npm run dev

Documentation

Read Contentstack docs

Learn about Next.js