An open API service indexing awesome lists of open source software.

https://github.com/hrutavmodha/e-commerce

An ECommerce website made using MERN stack
https://github.com/hrutavmodha/e-commerce

e-commerce express-js full-stack-project mern-stack mongodb mongoose nodejs open-source reactjs restful-api shopping-cart

Last synced: 4 months ago
JSON representation

An ECommerce website made using MERN stack

Awesome Lists containing this project

README

          

# 🛒 E-Commerce Web App

A full-stack e-commerce platform built with the MERN stack.
It supports role-based access control, image uploads, and dynamic product management for retailers and consumers.

## 🔐 User Roles

- **Retailer**
- Upload products with images
- View and purchase other products

- **Consumer**
- Browse products
- Add to cart and buy items

## 🚀 Key Features

- JWT-based User Authentication
- Role-Based Access Control (RBAC)
- Image Uploads using Multer
- Product Listings with Dynamic Rendering
- Cart Functionality with Purchase Flow

## 🛠️ Tech Stack

| Area | Technology |
|------------|----------------------|
| Frontend | React.js |
| Backend | Node.js, Express.js |
| Database | MongoDB |

## Package Manager Support

This project supports multiple package managers:
- npm (`package-lock.json`)
- yarn (`yarn.lock`)
- pnpm (`lock.yaml`)

## 💻 Getting Started

**1. Clone the repository**
```Bash
git clone "https://github.com/rutu-modha/e-commerce.git"
cd ./e-commerce
```

**2. Install dependencies**
- **using npm**
```Bash
npm install
cd frontend
npm install
cd ..
cd backend
npm install
```
*OR*
- **using yarn**
```Bash
yarn install
cd frontend
yarn install
cd ..
cd backend
yarn install
```
*OR*
- **using pnpm**
```Bash
pnpm install
cd frontend
pnpm install
cd ..
cd backend
pnpm install
```
**3. Setup a `.env` at root file with your own Mongo_URI and JWT_SECRET variables**

**4. Run both servers**
```Bash
cd ..
npm run start
```
*OR*
```Bash
cd ..
yarn run start
```
*OR*
```Bash
cd ..
pnpm run start
```
## ✅ Upcoming Features

- OAuth with Google
- Customer Support Page
- Static About and Contact Pages

## 📄 License

This project is licensed under the [MIT License](./LICENSE).

> If you liked this project, then please don't forget to give this repository a star. Your 1 star means a lot for me.

## 👨‍💻 Author

**Hrutav Modha**
(_modhahrutav@gmail.com_)

## 🤝 Contributions

Feel free to fork, submit PRs, or open an issue. Let's build something cool together!