Skip to main content
  1. All Posts/

nextjs-ecommerce

eCommerce TypeScript

Next.js E-commerce

Example web shop built with Next.js and Keystone.js

Explore the docs »

Report Bug
·
Request Feature

Table of Contents

  1. About The Project

  2. Screenshots
  3. Getting Started

  4. Usage
  5. Tests
  6. Roadmap
  7. Contact
  8. Acknowledgements

About The Project

Next.js E-commerce is an example online shop built with React.js and Keystone.js.

Built With

Some features:

Screenshots

You can find more screenshots in the screenshots/ folder.

Getting Started

To get a local copy up and running follow these steps.

Prerequisites

  • yarn v1

    npm install yarn -g
  • Docker and Docker Compose

Installation

  1. Clone the repo

    git clone https://github.com/sophiabrandt/nextjs-ecommerce.git
  2. Install NPM packages

    yarn install
  3. Run docker-compose:

    docker-compose up -d
  4. Create configuration file for the backend (backend/.env), see backend/sample.env.
  5. Create configuration file for the frontend (frontend/.env.local), see frontend/sample.env.

Usage

cd backend && yarn run dev
cd frontend && yarn run dev

Go to http://localhost:7771 for the Keystone CMS (backend) and http://localhost:7777 for the Next.js application (frontend).
If you want to use Caddy, you can use the included Caddyfile for automatic HTTPS certificates in local development.

sudo caddy run

Node.js will complain about the missing certificate issuer. For local development, ignore the error with NODE_TLS_REJECT_UNAUTHORIZED = '0':

cd frontend
NODE_TLS_REJECT_UNAUTHORIZED = '0' yarn build
NODE_TLS_REJECT_UNAUTHORIZED = '0' yarn start

The frontend app is available at https://frontend.app.localhost. You can reach the backend app at https://backend.app.localhost/.

Tests

cd backend && yarn run test
cd frontend && yarn run test

Roadmap

See the open issues for a list of proposed features (and known issues).

Contact

Sophia Brandt – @hisophiabrandt
Project Link: https://github.com/sophiabrandt/nextjs-ecommerce

Acknowledgements