Skip to content

codingwithriha/Eshop-MV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

264 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ Eshop-MV

A Multi-Vendor E-Commerce Platform built with the MERN Stack

A full-featured marketplace where independent sellers run their own shops, buyers shop across a unified storefront, and admins oversee the entire platform complete with real-time chat, Stripe payments, and seller analytics.

Live Demo MERN Stack License

Live Demo Β· Report Bug Β· Request Feature

πŸ“– Overview

Eshop-MV is a multi-vendor e-commerce marketplace where independent sellers can register their own shops, list products, run promotional events, and manage orders while buyers shop across a single unified storefront with cart, wishlist, checkout, and order tracking.

What sets it apart from a typical single seller store is the three-role architecture: buyers, sellers, and admins each get their own permissions, dashboards, and views over a shared product and order pipeline. The codebase is split into three independently deployable services a REST API, a React client, and a standalone real-time service mirroring how production e-commerce platforms are actually structured.

✨ Key Features

πŸ‘₯ Multi-Role User System

  • Buyer browse, search, wishlist, cart, checkout, track orders, leave reviews
  • Seller manage products, events, orders, coupons, and earnings from a dedicated dashboard
  • Admin oversee all users, sellers, products, events, and withdrawal requests platform-wide

πŸ›’ Shopping Experience

  • Product listings with image uploads via Cloudinary
  • Category based search and filtering
  • Persistent cart and wishlist (Redux Toolkit)
  • Multi-step checkout flow

πŸ’³ Payments

  • Stripe integration for card payments
  • Cash on Delivery fallback option
  • Orders are only created after payment confirmation β€” no orphaned/unpaid records

πŸ’¬ Real-Time Communication

  • Live buyer ↔ seller chat powered by a standalone Socket.IO service
  • Real-time order notifications pushed to the seller dashboard

πŸͺ Seller Dashboard

  • Sales and order tracking
  • Coupon and event (flash sale) management
  • Withdrawal requests for earnings

πŸ›‘οΈ Admin Panel

  • Full visibility into users, shops, products, orders, and payouts
  • Seller and content moderation tools

πŸ—οΈ System Architecture

The project is split into three independently deployable services:

                         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                         β”‚   Client (Browser)       β”‚
                         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    HTTPS REST        β”‚        WebSocket
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚ React Frontend   │◄───┴───►│ Socket Server     β”‚
              β”‚ (Vercel)         β”‚         β”‚ (Render)           β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚ REST API calls              β”‚
                       β–Ό                              β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              β”‚  Express Backend API (Render)
              β”‚  controllers: product Β· shop Β· order Β· user
              β”‚  payment Β· event Β· coupounCode Β· message
              └────────────┬─────────────────────────────
                           β–Ό
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚  MongoDB Atlas    Cloudinary    Stripe    β”‚
      β”‚  (data)           (images)      (payments)β”‚
      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Why three services? Serverless platforms like Vercel aren't built to hold persistent WebSocket connections, so the real-time chat/notification layer runs as its own service on a platform that supports long-lived processes, independent of the main API.

🧰 Tech Stack

Backend

  • Node.js + Express.js
  • MongoDB + Mongoose
  • JWT Authentication
  • Multer (file uploads)
  • Nodemailer (account activation)
  • Cloudinary (image storage)
  • Stripe (payments)

Frontend

  • React
  • Redux Toolkit
  • React Router
  • Tailwind CSS
  • Axios

Real-Time

  • Socket.IO (standalone service)

Deployment

  • Frontend β†’ Vercel
  • Backend & Socket service β†’ Render
  • Database β†’ MongoDB Atlas

πŸ“ Project Structure

Project Structure

β”œβ”€β”€ backend
β”‚   β”œβ”€β”€ config
β”‚   β”œβ”€β”€ controller
β”‚   β”‚   β”œβ”€β”€ conversation.js
β”‚   β”‚   β”œβ”€β”€ coupounCode.js
β”‚   β”‚   β”œβ”€β”€ event.js
β”‚   β”‚   β”œβ”€β”€ message.js
β”‚   β”‚   β”œβ”€β”€ order.js
β”‚   β”‚   β”œβ”€β”€ payment.js
β”‚   β”‚   β”œβ”€β”€ product.js
β”‚   β”‚   β”œβ”€β”€ shop.js
β”‚   β”‚   β”œβ”€β”€ user.js
β”‚   β”‚   └── withdraw.js
β”‚   β”œβ”€β”€ db
β”‚   β”‚   └── Database.js
β”‚   β”œβ”€β”€ middleware
β”‚   β”‚   β”œβ”€β”€ auth.js
β”‚   β”‚   β”œβ”€β”€ catchAsyncErrors.js
β”‚   β”‚   └── error.js
β”‚   β”œβ”€β”€ model
β”‚   β”‚   β”œβ”€β”€ conversation.js
β”‚   β”‚   β”œβ”€β”€ coupounCode.js
β”‚   β”‚   β”œβ”€β”€ event.js
β”‚   β”‚   β”œβ”€β”€ messages.js
β”‚   β”‚   β”œβ”€β”€ order.js
β”‚   β”‚   β”œβ”€β”€ product.js
β”‚   β”‚   β”œβ”€β”€ shop.js
β”‚   β”‚   β”œβ”€β”€ user.js
β”‚   β”‚   └── withdraw.js
β”‚   β”œβ”€β”€ seed
β”‚   β”œβ”€β”€ uploads
β”‚   β”œβ”€β”€ utils
β”‚   β”‚   β”œβ”€β”€ ErrorHandler.js
β”‚   β”‚   β”œβ”€β”€ jwtToken.js
β”‚   β”‚   β”œβ”€β”€ sendMail.js
β”‚   β”‚   └── shopToken.js
β”‚   β”œβ”€β”€ app.js
β”‚   β”œβ”€β”€ multer.js
β”‚   β”œβ”€β”€ package-lock.json
β”‚   β”œβ”€β”€ package.json
β”‚   └── server.js
β”œβ”€β”€ frontend
β”‚   β”œβ”€β”€ build
β”‚   β”‚   β”œβ”€β”€ static
β”‚   β”‚   β”‚   β”œβ”€β”€ css
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ main.b392feb7.css
β”‚   β”‚   β”‚   β”‚   └── main.b392feb7.css.map
β”‚   β”‚   β”‚   └── js
β”‚   β”‚   β”‚       β”œβ”€β”€ 453.03346f77.chunk.js
β”‚   β”‚   β”‚       β”œβ”€β”€ 453.03346f77.chunk.js.map
β”‚   β”‚   β”‚       β”œβ”€β”€ main.5cef72e3.js
β”‚   β”‚   β”‚       β”œβ”€β”€ main.5cef72e3.js.LICENSE.txt
β”‚   β”‚   β”‚       └── main.5cef72e3.js.map
β”‚   β”‚   β”œβ”€β”€ asset-manifest.json
β”‚   β”‚   β”œβ”€β”€ favicon.ico
β”‚   β”‚   β”œβ”€β”€ index.html
β”‚   β”‚   β”œβ”€β”€ logo192.png
β”‚   β”‚   β”œβ”€β”€ logo512.png
β”‚   β”‚   β”œβ”€β”€ manifest.json
β”‚   β”‚   └── robots.txt
β”‚   β”œβ”€β”€ public
β”‚   β”‚   β”œβ”€β”€ favicon.ico
β”‚   β”‚   β”œβ”€β”€ index.html
β”‚   β”‚   β”œβ”€β”€ logo192.png
β”‚   β”‚   β”œβ”€β”€ logo512.png
β”‚   β”‚   β”œβ”€β”€ manifest.json
β”‚   β”‚   └── robots.txt
β”‚   β”œβ”€β”€ src
β”‚   β”‚   β”œβ”€β”€ Assests
β”‚   β”‚   β”‚   └── animations
β”‚   β”‚   β”‚       β”œβ”€β”€ 107043-success.json
β”‚   β”‚   β”‚       └── 24151-ecommerce-animation.json
β”‚   β”‚   β”œβ”€β”€ Assets
β”‚   β”‚   β”œβ”€β”€ components
β”‚   β”‚   β”‚   β”œβ”€β”€ Admin
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Layout
β”‚   β”‚   β”‚   β”‚   β”‚   └── AdminSideBar.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AdminDashboardMain.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AllEvents.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AllProducts.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AllSellers.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AllUsers.jsx
β”‚   β”‚   β”‚   β”‚   └── AllWithdraw.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Cart
β”‚   β”‚   β”‚   β”‚   └── Cart.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Checkout
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Checkout.jsx
β”‚   β”‚   β”‚   β”‚   └── CheckoutSteps.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Events
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ CountDown.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ EventCard.jsx
β”‚   β”‚   β”‚   β”‚   └── Events.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Layout
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AdminHeader.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ DropDown.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Footer.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Header.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Loader.jsx
β”‚   β”‚   β”‚   β”‚   └── Navbar.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Login
β”‚   β”‚   β”‚   β”‚   └── Login.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Payment
β”‚   β”‚   β”‚   β”‚   └── Payment.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Products
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ProductDetails.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Ratings.jsx
β”‚   β”‚   β”‚   β”‚   └── SuggestedProduct.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Profile
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ProfileContent.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ProfileSidebar.jsx
β”‚   β”‚   β”‚   β”‚   └── TrackOrder.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Route
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ BestDeals
β”‚   β”‚   β”‚   β”‚   β”‚   └── BestDeals.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Categories
β”‚   β”‚   β”‚   β”‚   β”‚   └── Categories.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ FeaturedProduct
β”‚   β”‚   β”‚   β”‚   β”‚   └── FeaturedProduct.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Hero
β”‚   β”‚   β”‚   β”‚   β”‚   └── Hero.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ProductCard
β”‚   β”‚   β”‚   β”‚   β”‚   └── ProductCard.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ProductDetailsCard
β”‚   β”‚   β”‚   β”‚   β”‚   └── ProductDetailsCard.jsx
β”‚   β”‚   β”‚   β”‚   └── Sponsored.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Shop
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Layout
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ DashboardHeader.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   └── DashboardSideBar.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AllCoupons.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AllEvents.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AllOrders.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AllProducts.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AllRefundOrders.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ CreateEvent.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ CreateProduct.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ DashboardHero.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ DashboardMessages.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ OrderDetails.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShopCreate.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShopInfo.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShopLogin.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShopProfileData.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShopSettings.jsx
β”‚   β”‚   β”‚   β”‚   └── WithdrawMoney.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Signup
β”‚   β”‚   β”‚   β”‚   └── Signup.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Wishlist
β”‚   β”‚   β”‚   β”‚   └── Wishlist.jsx
β”‚   β”‚   β”‚   └── UserOrderDetails.jsx
β”‚   β”‚   β”œβ”€β”€ pages
β”‚   β”‚   β”‚   β”œβ”€β”€ Shop
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShopAllCoupouns.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShopAllEvents.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShopAllOrders.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShopAllProducts.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShopAllRefunds.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShopCreateEvents.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShopCreateProduct.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShopDashboardPage.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShopHomePage.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShopInboxPage.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShopOrderDetails.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShopPreviewPage.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShopSettingsPage.jsx
β”‚   β”‚   β”‚   β”‚   └── ShopWithDrawMoneyPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ActivationPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AdminDashboardEvents.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AdminDashboardOrders.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AdminDashboardPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AdminDashboardProducts.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AdminDashboardSellers.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AdminDashboardUsers.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AdminDashboardWithdraw.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ BestSellingPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ CheckoutPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ EventsPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ FAQPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ HomePage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Login.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ OrderDetailsPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ OrderSuccessPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ PaymentPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ProductDetailsPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ProductsPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ProfilePage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SellerActivationPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ShopCreate.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ShopLoginPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SignupPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ TrackOrderPage.jsx
β”‚   β”‚   β”‚   └── UserInbox.jsx
β”‚   β”‚   β”œβ”€β”€ redux
β”‚   β”‚   β”‚   β”œβ”€β”€ actions
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ cart.js
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ event.js
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ order.js
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ product.js
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ sellers.js
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ user.js
β”‚   β”‚   β”‚   β”‚   └── wishlist.js
β”‚   β”‚   β”‚   β”œβ”€β”€ reducers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ cart.js
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ event.js
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ order.js
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ product.js
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ seller.js
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ user.js
β”‚   β”‚   β”‚   β”‚   └── wishlist.js
β”‚   β”‚   β”‚   └── store.js
β”‚   β”‚   β”œβ”€β”€ routes
β”‚   β”‚   β”‚   β”œβ”€β”€ AdminRoutes.js
β”‚   β”‚   β”‚   β”œβ”€β”€ ProtectedAdminRoute.js
β”‚   β”‚   β”‚   β”œβ”€β”€ ProtectedRoute.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Routes.js
β”‚   β”‚   β”‚   β”œβ”€β”€ SellerProtectedRoute.js
β”‚   β”‚   β”‚   └── ShopRoutes.js
β”‚   β”‚   β”œβ”€β”€ static
β”‚   β”‚   β”‚   └── data.js
β”‚   β”‚   β”œβ”€β”€ styles
β”‚   β”‚   β”‚   └── styles.js
β”‚   β”‚   β”œβ”€β”€ App.css
β”‚   β”‚   β”œβ”€β”€ App.js
β”‚   β”‚   β”œβ”€β”€ App.test.js
β”‚   β”‚   β”œβ”€β”€ index.js
β”‚   β”‚   β”œβ”€β”€ logo.svg
β”‚   β”‚   β”œβ”€β”€ reportWebVitals.js
β”‚   β”‚   β”œβ”€β”€ server.js
β”‚   β”‚   β”œβ”€β”€ setupTests.js
β”‚   β”‚   └── ShopRoutes.js
β”‚   β”œβ”€β”€ package-lock.json
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ postcss.config.js
β”‚   β”œβ”€β”€ README.md
β”‚   β”œβ”€β”€ tailwind.config.js
β”‚   └── yarn.lock
└── socket
    β”œβ”€β”€ index.js
    β”œβ”€β”€ package-lock.json
    └── package.json

πŸš€ Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • MongoDB Atlas account (or local MongoDB instance)
  • Cloudinary account (for image uploads)
  • Stripe account (for payments)

1. Clone the repository

git clone https://github.com/codingwithriha/Eshop-MV.git
cd Eshop-MV

2. Backend setup

cd backend
npm install

Create a .env file inside backend/:

PORT=8000
DB_URL=your_mongodb_connection_string

JWT_SECRET_KEY=your_jwt_secret
JWT_EXPIRES=7d
ACTIVATION_SECRET=your_activation_secret

SMTP_HOST=smtp.gmail.com
SMTP_PORT=465
SMTP_MAIL=your_email@gmail.com
SMTP_PASSWORD=your_gmail_app_password

CLOUDINARY_NAME=your_cloudinary_name
CLOUDINARY_API_KEY=your_cloudinary_key
CLOUDINARY_API_SECRET=your_cloudinary_secret

STRIPE_API_KEY=your_stripe_publishable_key
STRIPE_SECRET_KEY=your_stripe_secret_key
npm run dev

3. Frontend setup

cd frontend
npm install

Create a .env file inside frontend/:

REACT_APP_BACKEND_URL=http://localhost:8000
REACT_APP_STRIPE_PUBLISH_KEY=your_stripe_publishable_key
npm start

4. Socket service setup

cd socket
npm install
node index.js

The app should now be running locally:

  • Frontend β†’ http://localhost:3000
  • Backend API β†’ http://localhost:8000

🌐 Deployment

Service Platform Notes
Frontend Vercel Set REACT_APP_BACKEND_URL to your deployed backend URL
Backend API Railway Set root directory to backend, add all .env variables
Socket Server Railway Set root directory to socket
Database MongoDB Atlas Whitelist Render's IP or allow access from anywhere

Note: Environment variables do not carry over from local development to hosted platforms they must be added manually in each service's dashboard.

πŸ—ΊοΈ Application Flow

Buyer: Sign up β†’ Verify email β†’ Browse products β†’ Add to cart/wishlist β†’ Checkout β†’ Pay (Stripe/COD) β†’ Track order β†’ Leave review

Seller: Create shop β†’ Shop activation β†’ Add products/events β†’ Receive order notifications in real time β†’ Update order status β†’ Withdraw earnings

Admin: Log in β†’ Manage users, sellers, products & events β†’ Approve withdrawal requests


πŸ›£οΈ Roadmap

  • CI/CD pipeline (GitHub Actions) for automated build checks
  • Logging & monitoring integration (e.g. Sentry)
  • Containerization with Docker for local dev parity
  • Unit & integration test coverage

πŸ“„ License

This project is built for educational purposes, based on the Becodemy Multi-Vendor MERN E-commerce tutorial series, and extended independently for deployment and case-study documentation.


Built with ❀️ by codingwithriha

About

A Multi-Vendor E-Commerce Platform built with the MERN Stack

Topics

Resources

Stars

9 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages