A lot of times, I do a lot of ecommerce projects and I just thought I should create a ready-to-use database schema to make my work easier. I also thought to share it with others so it can help anyone who needs it.
This repository contains a ready-to-use database schema for a multi-vendor eCommerce platform, built with Laravel migrations. It includes:
- Laravel migration files
- Seeders
- SQL dump
- Entity Relationship Diagram (ERD)
- Setup instructions
├── 📁database/
│ └── 📁migrations/ # Migrations for all tables
│ └── 📁seeders/ # Seeders for all tables
├── 📁sql/
│ └── schema_dump.sql # SQL export of schema
├── 📁erd/
│ └── ecommerce_erd.png # Visual ERD diagram
├── README.md # This file
- Users (Admin, Vendor, Customer roles)
- Vendors
- Categories
- Products, Product Images & Product Variants
- Orders & Order Items
- Carts & Cart Items
- Wishlist
- Payments
- Reviews (Products and Vendors)
- Customer Addresses
- Coupons
- Clone the repo:
git clone https://github.com/Nahyomee/ecommerce-schema.git
cd ecommerce-schema - Install Laravel dependencies
composer install- Setup .env:
cp .env.example .env
php artisan key:generate- Run the migrations:
php artisan migrate- Run the seeders
php artisan db:seedInstead of MySQL, you can use SQLite by updating .env like so:
DB_CONNECTION=sqliteVisual representation is available in /erd/ecommerce_erd.png.
Created by @Nahyomee. Inspired by real-world eCommerce systems.
The Laravel framework is open-sourced software licensed under the MIT license.