Skip to content

Muhammad-Ahmad17/E_Commerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛒 Multi Buyer&Vendor E-Commerce Platform

A scalable and modular full-stack e-commerce web application with multi-role support (Buyer, Vendor, Admin). This project is designed using a 3-tier architecture with a modern frontend and robust backend, backed by database modeling.


🚀 Features

  • Role-based access (Buyer, Vendor, Admin)
  • Secure authentication and authorization
  • Product listing, cart, and order management
  • Vendor dashboard and product management
  • Buyer order tracking
  • Full SQL schema with procedures, triggers, and views
  • Responsive frontend with Tailwind CSS
  • System design diagrams included

🧰 Tech Stack

Frontend:

  • React (with TypeScript)
  • Vite (build tool)
  • Tailwind CSS
  • ESLint + PostCSS

Backend:

  • Node.js
  • Express.js
  • SQL (schema + raw scripts)
  • JWT-based Authentication

Database

  • SQL Server

🔌 Backend API Overview

Module Routes File Functions (Examples)
Buyer buyerRoutes.js Register, View Products, Orders
Vendor vendorRoutes.js Add/Edit Products
Cart cartRoutes.js Add to cart, Checkout
Auth registrationRoutes.js Register/Login (Buyers & Vendors)

Authentication is handled via auth.js middleware using JWT.


🗄️ SQL Schema & Procedures

In server/models/raw/, you’ll find:

  • schema.sql – full database schema
  • procedures.sql – stored procedures
  • triggers.sql – custom triggers
  • views.sql – SQL views
  • testing.sql – test data setup

Run these files in your local SQL Server before using the API.

📖 Read Documentation

For in-depth documentation of API routes, request structures, SQL scripts, and edge cases, please refer to the 📘 Full Documentation file in the project root.


🛠️ Getting Started

📦 Backend Setup

cd server

# Install dependencies
npm install

# Run the server
node run dev

🖥 Frontend Setup

cd client

# Install frontend packages
npm install

# Start dev server
npm run dev

🌐 .env

  • For Backend
# JWT secret for authentication (replace with a secure key)
JWT_SECRET=your_jwt_secret_key_here

# SQL Server Database Configuration
DB_USER=your_db_username
DB_PASSWORD=your_secure_password
DB_SERVER=your_db_host_or_ip
DB_NAME=your_database_name

# Port
port = your port
  • For Frontend
VITE_API_URL=localhost:5000

📸 System Design

Visuals are available in /SystemDesignDiagrams/:

  • 3-tier architecture diagram
  • Activity flows for buyer & vendor

🙌 Acknowledgements

  • Frontend generated by Lovabale using:

    • React, Vite, and Tailwind CSS
  • Backend & Database designed and implemented by Muhammad Ahmad and Ali Hussain using:

    • Express.js, Node.js, and SQL Server with T-SQL
  • System Design Diagrams designed using PlantUML

📬 Contact

Feel free to open an issue or submit a pull request if you have ideas or improvements!

Releases

No releases published

Packages

 
 
 

Contributors