- 👉 Render : https://amazona-frontend-7k6k.onrender.com
MERN Amazona is an e-commerce platform built using the MERN stack (MongoDB, Express.js, React, and Node.js). It supports user authentication, product browsing, and an admin interface for managing users and products.
- Node.js
- MongoDB (local or Atlas Cloud)
-
Clone repo
$ git clone [email protected]:piyush5566/mern-amazona.git $ cd mern-amazona
-
Create .env File
- Duplicate
.env.example
in thebackend
folder and rename it to.env
.
- Duplicate
-
Setup MongoDB
- Local MongoDB
- Install it from here.
- In
.env
file updateMONGODB_URI=mongodb://localhost/amazona
.
- Atlas Cloud MongoDB
- Create a database at https://cloud.mongodb.com.
- In
.env
file updateMONGODB_URI=mongodb+srv://your-db-connection
.
- Local MongoDB
-
Run Backend
$ cd backend $ npm install $ npm start
-
Run Frontend
# open new terminal $ cd frontend $ npm install $ npm start
-
Seed Users and Products
- Run this on browser:
http://localhost:5000/api/seed
- It returns admin email and password and 6 sample products.
- Run this on browser:
-
Admin Login
- Run
http://localhost:3000/signin
. - Enter admin email and password and click signin.
- Run
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
- Ensure MongoDB is running if you encounter connection issues.
- Check the console for any error messages and consult the documentation for solutions.
This project is licensed under the MIT License - see the LICENSE file for details.