Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

1,771 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›’ Multi-Vendor E-Commerce Backend

Laravel PHP License Tests Static Analysis

A modern, domain-driven multi-vendor e-commerce platform backend built with Laravel 11, PHP 8.3, and Tailwind CSS.


πŸ“Œ Overview

Multi-Vendor E-Commerce Backend provides an enterprise-grade framework for running multi-seller marketplaces. It addresses complex operational challengesβ€”such as vendor commission splits, multi-warehouse shipping calculations, automated seller payouts, bulk catalog imports, and affiliate trackingβ€”through a clean, domain-driven modular architecture.


πŸ“– Table of Contents


✨ Key Features

🏒 Multi-Vendor Management

  • Seller Portal: Vendor dashboard for inventory, store profile management, sales analytics, and payout requests.
  • Admin Control Panel: Centralized management suite for vendor approvals, commission setup, global catalog controls, and audit reporting.

πŸ“¦ Product & Catalog Management

  • Variant & Bundle System: Configurable product attributes, variant inventory matrix, and bundle offers.
  • Bulk Product Upload: Asynchronous processing for mass product ingestion with validation and image optimization.

πŸ’³ Order, Payment & Shipping

  • Multi-Vendor Order Processing: Automated order splitting across vendors with independent order lifecycle tracking.
  • Payout & Commission Engine: Calculation of vendor net earnings, platform commissions, refund adjustments, and automated payout verification.
  • Location-Based Shipping: Dynamic shipping fee resolution by region/zone per vendor.

🎯 Marketing & Engagement

  • Affiliate System: Referral tracking, affiliate link generation, commission logs, and performance metrics.
  • Promotions & Support: Coupon engine, flash sale manager, and integrated customer support ticketing.

πŸ›  Tech Stack

  • Framework: Laravel 11.x
  • Language: PHP 8.3+
  • Database: MySQL 8.0+ / PostgreSQL
  • Frontend / Styling: Blade, Tailwind CSS, Lucide Icons, DataTables
  • Authentication: Laravel Sanctum (API Tokens) & Session Guard
  • Testing: Pest PHP & PHPUnit
  • Static Analysis: PHPStan & Larastan
  • Package Manager: Composer & npm

πŸ“‚ Architecture & Folder Structure

The project follows a Domain-Driven Design (DDD) approach within the app/Domain layer:

ecommerce_multivendor_backend/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ Domain/                 # Domain-driven business logic
β”‚   β”‚   β”œβ”€β”€ Affiliate/          # Referral & affiliate management
β”‚   β”‚   β”œβ”€β”€ Auth/               # Authentication & roles
β”‚   β”‚   β”œβ”€β”€ BulkUpload/         # Asynchronous mass import
β”‚   β”‚   β”œβ”€β”€ Bundle/             # Product bundle domain logic
β”‚   β”‚   β”œβ”€β”€ Media/              # File & image handling
β”‚   β”‚   β”œβ”€β”€ Order/              # Order lifecycle & tracking
β”‚   β”‚   β”œβ”€β”€ Payment/            # Gateway & payout processing
β”‚   β”‚   β”œβ”€β”€ Product/            # Catalog, variants & inventory
β”‚   β”‚   β”œβ”€β”€ Review/             # Product ratings & reviews
β”‚   β”‚   β”œβ”€β”€ Shipping/           # Rates, zones & tracking
β”‚   β”‚   β”œβ”€β”€ Support/            # Helpdesk & customer support
β”‚   β”‚   β”œβ”€β”€ Tax/                # Tax rule calculation engine
β”‚   β”‚   └── Vendor/             # Seller profile & shop settings
β”‚   β”œβ”€β”€ Http/                   # Controllers, Requests & Middleware
β”‚   └── Services/               # Shared cross-domain services
β”œβ”€β”€ config/                     # Application configuration
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ factories/              # Database factories
β”‚   β”œβ”€β”€ migrations/             # Database schema migrations
β”‚   └── seeders/                # Database seeders
β”œβ”€β”€ resources/
β”‚   β”œβ”€β”€ views/                  # Blade templates (Admin, Seller, Web)
β”‚   └── css/                    # Tailwind CSS assets
β”œβ”€β”€ routes/                     # web.php, api.php, seller.php, admin.php
└── tests/                      # Pest & PHPUnit test suite

πŸš€ Installation

Follow these steps to set up the repository locally:

1. Prerequisites

  • PHP >= 8.3 with extensions (pdo, mbstring, openssl, curl, gd / imagick)
  • Composer >= 2.x
  • Node.js >= 18.x & npm
  • MySQL >= 8.0 or PostgreSQL

2. Clone the Repository

git clone https://github.com/Shraban-7/multivendor-ecommerce.git
cd multivendor-ecommerce

3. Install Dependencies

# Install PHP packages
composer install

# Install Node modules
npm install

4. Environment Configuration

cp .env.example .env
php artisan key:generate

Configure your .env file with database and service credentials:

APP_NAME="MultiVendor E-Commerce"
APP_ENV=local
APP_URL=http://localhost:8000

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=ecommerce_db
DB_USERNAME=root
DB_PASSWORD=secret

5. Run Database Migrations & Seeders

php artisan migrate --seed

6. Build Assets & Storage Link

php artisan storage:link
npm run build

πŸ’» Usage & Commands

Development Server

Run the local Laravel development server:

php artisan serve

Concurrent Development (Vite Assets)

In a separate terminal, compile assets with hot reload:

npm run dev

Artisan Helper Commands

# Clear application cache
php artisan cache:clear

# Process asynchronous queue jobs (bulk upload, emails)
php artisan queue:work

πŸ§ͺ Testing & Quality Assurance

Maintain high code quality with static analysis and test execution:

# Run unit & integration tests via Pest
vendor/bin/pest

# Run static analysis check with PHPStan
vendor/bin/phpstan analyse

# Run code formatting check with Laravel Pint
vendor/bin/pint --test

🀝 Contributing

Contributions are welcome! To contribute:

  1. Fork the project repository.
  2. Create your feature branch (git checkout -b feature/amazing-feature).
  3. Commit your changes with clear messages (git commit -m 'feat: add amazing feature').
  4. Push to the branch (git push origin feature/amazing-feature).
  5. Open a Pull Request for review.

Please ensure all tests pass (vendor/bin/pest) and code passes static analysis (vendor/bin/phpstan) before submitting.


πŸ“„ License

This project is open-source software licensed under the MIT License.


βœ‰οΈ Author / Contact

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages