项目作者: sophiabrandt

项目描述 :
Next.js & Keystone.js E-commerce example with TypeScript
高级语言: TypeScript
项目地址: git://github.com/sophiabrandt/nextjs-ecommerce.git
创建时间: 2021-03-13T17:35:30Z
项目社区:https://github.com/sophiabrandt/nextjs-ecommerce

开源协议:

下载





Logo


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.

Main Page

Getting Started

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

Prerequisites

  • yarn v1

    1. npm install yarn -g
  • Docker and Docker Compose

Installation

  1. Clone the repo

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

    1. yarn install
  3. Run docker-compose:

    1. 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

  1. cd backend && yarn run dev
  2. 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.

  1. sudo caddy run

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

  1. cd frontend
  2. NODE_TLS_REJECT_UNAUTHORIZED = '0' yarn build
  3. 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

  1. cd backend && yarn run test
  2. 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