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.
- 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
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
| 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.
In server/models/raw/, you’ll find:
schema.sql– full database schemaprocedures.sql– stored procedurestriggers.sql– custom triggersviews.sql– SQL viewstesting.sql– test data setup
Run these files in your local SQL Server before using the API.
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.
cd server
# Install dependencies
npm install
# Run the server
node run devcd client
# Install frontend packages
npm install
# Start dev server
npm run dev- 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
Visuals are available in /SystemDesignDiagrams/:
- 3-tier architecture diagram
- Activity flows for buyer & vendor
-
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
- Email:muhammadahmad171105@gmail.com
- LinkedIn: Muhammad Ahmad
Feel free to open an issue or submit a pull request if you have ideas or improvements!