Skip to content

πŸ›’ MERN E-Commerce Website with Seller Dashboard, JWT Auth, Cloudinary & TailwindCSS

License

Notifications You must be signed in to change notification settings

SUKANT43/E-commerce-Mern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

127 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›’ Click and Collect - MERN E-Commerce Website

πŸš€ Overview

This is a full-stack MERN (MongoDB, Express.js, React.js, Node.js) and Cloudinary e-commerce website called Click and Collect. This project includes a Seller Dashboard but does not include an order button.

πŸ“Œ Features

  • User authentication (Register/Login) with JWT
  • Seller dashboard for managing products
  • Secure routes using middleware
  • CRUD operations for products
  • Password hashing with bcryptjs
  • State management using Context API
  • API calls with Axios
  • Tailwind CSS for styling
  • Cloudinary for storing image

πŸ› οΈ Tech Stack

Backend (Node.js, Express, MongoDB)

  • Express.js - Backend framework
  • MongoDB & Mongoose - Database & ODM
  • JWT - Authentication
  • bcryptjs - Password hashing
  • dotenv - Environment variables
  • Cloudinary - Cloud Storage

Frontend (React.js)

  • React.js - Frontend framework
  • React Router - Navigation
  • Context API - State management
  • Axios - API requests
  • Tailwind CSS - Styling

Demo Images

User Page:

Screenshot 2025-03-12 190227 Screenshot 2025-03-12 190238 Screenshot 2025-03-12 190250 Screenshot 2025-03-12 190314 Screenshot 2025-03-12 194851 Screenshot 2025-03-12 194904

Seller Page:

Screenshot 2025-03-12 190046 Screenshot 2025-03-12 190107 Screenshot 2025-03-12 190123 Screenshot 2025-03-12 190136


βš™οΈ Installation

1️⃣ Clone the repository

sh git clone https://github.com/SUKANT43/E-commerce-Mern cd click-and-collect

2️⃣ Backend Setup

sh cd backend npm install

Create a .env file in backend/ and add:


 env
 PORT=5000
 MONGO_URL=mongodb://localhost:27017/clickandcollect
 JWT_SECRET=your_jwt_secret
 Cloudinary_Key=SWWW DWWE WEDWE WED
  • Start the backend server: sh npm start

3️⃣ Frontend Setup

sh cd frontend npm install

  • Start the frontend: sh npm start

πŸš€ Usage


πŸ“‚ Project Structure


click-and-collect/
│── backend/
β”‚   β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ controller/
β”‚   β”œβ”€β”€ middleWare/
β”‚   β”œβ”€β”€ model/
β”‚   β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ server.js
│── frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ App.jsx
β”‚   β”œβ”€β”€ main.jsx
β”‚   β”œβ”€β”€ index.css

πŸ“œ API Endpoints

πŸ”Ή User Routes (/api/user)

Method Route Description
POST /register Register a new user
POST /login Authenticate a user
GET /me Get user profile

πŸ”Ή Product Routes (/api/products)

Method Route Description
GET / Get all products
POST /add Add a new product
PUT /update/:id Update a product
DELETE /delete/:id Delete a product

πŸ› οΈ Tools Used

  • Postman - API Testing
  • MongoDB Compass - Database Management

πŸ“œ License

This project is MIT Licensed. Feel free to use and modify it.


🀝 Contributing

  1. Fork the repository
  2. Create a new branch (feature-new)
  3. Commit changes (git commit -m 'Added new feature')
  4. Push to the branch (git push origin feature-new)
  5. Create a Pull Request

πŸ’‘ Contact

For any questions or suggestions, feel free to reach out:

Releases

No releases published

Packages

No packages published

Languages