Git Product home page Git Product logo

mern-stack-learning's Introduction

Mern Stack Learning

This is a full stack E commerce MERN (MongoDB, Express, React, Node.js) app created for Learning Mern Stack with Proper comments and Best Practices

Installation

  1. Clone the repository
git clone https://github.com/abdulmoizsheraz/Mern-Stack-Learning.git
  1. Install dependencies
npm install
  1. Configure environment variables

Copy the config.example.env file to .env and update it with your MongoDB connection URI, JWT secret and any other values needed.

MONGO_URI=your_mongo_uri 
JWT_SECRET=your_jwt_secret
  1. Start the app
npm run dev

This will start the Express server on port 5000 and the React app on port 3000.

Features

  • User registration and login with JWT authentication
  • Create, view, edit, and delete notes
  • Mark notes as important
  • Responsive design

Code Overview

  • The backend is built with Node, Express and MongoDB/Mongoose for the database. JWT is used for authentication.

  • The React frontend uses React Router for routing and Redux for state management.

  • models/User.js and models/Note.js - Mongoose schemas and models for users and notes

  • routes/auth.js - Auth routes for register and login users

  • React components located in /client/src/components

  • Redux actions and reducers handle state management in /client/src/redux

Deployment

The app can be deployed to any service that hosts Node apps such as Heroku, AWS, Azure etc.

The React frontend should be built into static files using npm run build and served by the Node/Express backend.

License

This project is open source and available under the MIT License.

mern-stack-learning's People

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.