A modern, domain-driven multi-vendor e-commerce platform backend built with Laravel 11, PHP 8.3, and Tailwind CSS.
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.
- Features
- Tech Stack
- Architecture & Folder Structure
- Installation
- Usage & Commands
- Testing & Quality Assurance
- Contributing
- License
- Contact
- 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.
- 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.
- 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.
- Affiliate System: Referral tracking, affiliate link generation, commission logs, and performance metrics.
- Promotions & Support: Coupon engine, flash sale manager, and integrated customer support ticketing.
- 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
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
Follow these steps to set up the repository locally:
- PHP
>= 8.3with extensions (pdo,mbstring,openssl,curl,gd/imagick) - Composer
>= 2.x - Node.js
>= 18.x& npm - MySQL
>= 8.0or PostgreSQL
git clone https://github.com/Shraban-7/multivendor-ecommerce.git
cd multivendor-ecommerce# Install PHP packages
composer install
# Install Node modules
npm installcp .env.example .env
php artisan key:generateConfigure 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=secretphp artisan migrate --seedphp artisan storage:link
npm run buildRun the local Laravel development server:
php artisan serveIn a separate terminal, compile assets with hot reload:
npm run dev# Clear application cache
php artisan cache:clear
# Process asynchronous queue jobs (bulk upload, emails)
php artisan queue:workMaintain 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 --testContributions are welcome! To contribute:
- Fork the project repository.
- Create your feature branch (
git checkout -b feature/amazing-feature). - Commit your changes with clear messages (
git commit -m 'feat: add amazing feature'). - Push to the branch (
git push origin feature/amazing-feature). - Open a Pull Request for review.
Please ensure all tests pass (vendor/bin/pest) and code passes static analysis (vendor/bin/phpstan) before submitting.
This project is open-source software licensed under the MIT License.
- Author: Shraban
- GitHub: @Shraban-7
- Repository: Shraban-7/multivendor-ecommerce