Giter VIP home page Giter VIP logo

mernshop's Introduction

MERN Ecommerce Application

Platform Platform Platform

MERN Ecommerce project app. This is my first web application done with educational purposes in order to learn new concepts about web development such as global state management.

It's a basic online shop where a registered user can check and add products in the shopping cart and finally make the purchase through a Paypal account. Admin users are able to list and edit users, add new products (upload images from computer) and also approve purchase orders.

View demo [email protected] / 123456

Technologies

I have chosen MERN stack due to its deployment easiness:

  • Database: MongoDB Atlas + Mongoose
  • Backend: API Express JS Framework (Node) + JWT Auth
  • Frontend: React (JavaScript + Hooks + Api Context) + Redux + Formik + Material-UI components and theming
  • Testing: Frontend E2E tests with Cypress

For the the development process I decided to setup up Prettier + ESlint + Husky dependencies so as to assure an code format without broken rules in each git commit. Finally the website has been deployed on Heroku.

Screenshot

1

Installation and run

Clone this repository and install dependencies for backend and frontend:

Before installing, download and install Node.js in case you don't have it. Node.js 10 or higher is required.

After installation is done, download all package.json dependencies with npm install:

Backend (root index package.json) and inside frontend folder:

$ npm install

Add .ENV file

Make sure you create .env file in the root with the properly enviroment properties:

NODE_ENV = development
PORT = 5000
MONGO_URI = _YOUR MONGO DB URI
JWT_SECRET = _YOUR JWT SECRET CONSTANT
PAYPAL_CLIENT_ID = _YOUR PAYPAL CLIENT ID FROM PAYPAL DEVELOPER CENTER

Useful npm scripts:

Run backend server and frontend:

$ npm run dev

Script to seed mongo database with test data (./backend/data):

$ npm run data:import

Script to destroy mongo database data (./backend/data):

$ npm run data:destroy

Issues and missing features

The application has been developed following a tutorial from Udemy with some differences so as to adapt to my custom components and material-ui library. There are some minor bugs and writing review system couldn't be finished due to lack of time. In the future I would like to refactor some parts and apply redux-form. I set up Formik library in order to manage form validations, currently is working in user register screen only.

Support me

Just star or fork this repository, and follow my github. You have supported me!

Author

David Mareca

mernshop's People

Contributors

damrek avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

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