项目作者: hillbyte

项目描述 :
MERN Stack E-commerce App for Coffee Beans Selling with Payment gateway intregation.
高级语言: JavaScript
项目地址: git://github.com/hillbyte/coffee-bean-shop.git
创建时间: 2021-07-27T12:16:19Z
项目社区:https://github.com/hillbyte/coffee-bean-shop

开源协议:

下载


Coffee Bean E-commerce Store

An E-commerce app for Coffee Beans Selling with Payment gateway intregation.

Features

  • Payment Gateway Intregation
  • Admin Dashboard
  • Single Page App(SPA)
  • Mobile responsive

Tech Stack & Library

Client: React, React-Stripe-Checkout, Bootstrap

Server: Node, MongoDB, Express, Mongoose, JWT, Stripe,

Environment Variables

To run this project, you will need to add the following environment variables to your frontend and backend .env file

Backend env

DB_URL

PRIVATE_STRIPE_KEY

SECRET=random string for jwt goes here

Frontend env

REACT_APP_BACKEND=localhost:8000/api

STRIPE_KEY=stripe publisable key goes here

Run Locally

Clone the project

  1. git clone https://github.com/hillbyte/coffee-bean-shop.git

Go to the project backend and frontend directory one by one

  1. cd store-backend
  2. cd store-frontend

Install dependencies

  1. npm install

Start the backend server

  1. node app.js

Start the frontend client

  1. npm start

API Reference

Get all products

  1. GET /api/products

Get a single product

  1. GET /api/product/:productId

Create product

  1. POST /api/product/create/:userId

Update product

  1. PUT /api/product/:productId/:userId

Delete product

  1. DELETE /api/product/:productId/:userId

Other routes

There are more five routes available in backend

Explore following routes by visiting backend routes dir

auth route, user route, category route, order route, payment route