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
- Clone the repository
git clone https://github.com/abdulmoizsheraz/Mern-Stack-Learning.git
- Install dependencies
npm install
- 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
- Start the app
npm run dev
This will start the Express server on port 5000 and the React app on port 3000.
- User registration and login with JWT authentication
- Create, view, edit, and delete notes
- Mark notes as important
- Responsive design
-
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
andmodels/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
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.
This project is open source and available under the MIT License.