GithubHelp home page GithubHelp logo

benhiesu / nextjs-ecommerce Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sophiabrandt/nextjs-ecommerce

0.0 0.0 0.0 3.07 MB

Next.js & Keystone.js E-commerce example with TypeScript

Home Page: https://nextjs-ecommerce.repository.host

Shell 0.43% JavaScript 3.88% TypeScript 93.02% CSS 0.97% Dockerfile 1.70%

nextjs-ecommerce's Introduction


Logo

Next.js E-commerce

Example web shop built with Next.js and Keystone.js
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Demo
  3. Screenshots
  4. Getting Started
  5. Usage
  6. Tests
  7. Roadmap
  8. Contact
  9. Acknowledgements

About The Project

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

Built With

Some features:

Demo

I've deployed a demo (via GitOps/Gitlab CI) to a $5 Upcloud VPS (How?).

Backend: https://nextjs-ecommerce-keystone.repository.host
GraphQL API: https://nextjs-ecommerce-keystone.repository.host/api/graphql

Frontend: https://nextjs-ecommerce.repository.host

The password reset uses a sandboxed Mailgun account and only works with one email: [email protected]

To read the password reset email, go to https://www.guerrillamail.com/ and set the inbox to "[email protected]".

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

    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

nextjs-ecommerce's People

Contributors

sophiabrandt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.