A comprehensive, enterprise-grade multi-vendor e-commerce platform built with Laravel 12
Features β’ Installation β’ Documentation β’ API β’ Contributing
- Overview
- Key Features
- Technology Stack
- Architecture
- Installation
- Configuration
- Usage
- API Documentation
- Testing
- Security
- Contributing
- License
This is a production-ready multi-vendor e-commerce platform that enables multiple vendors to manage their products, branches, and subscriptions through a unified marketplace system. The platform features separate dashboards for administrators, vendors, and customers, with comprehensive role-based access control and granular permissions.
- β Enterprise-Grade Architecture: Built with Laravel 12 following best practices and design patterns
- β Multi-Vendor Support: Unlimited vendors with individual dashboards and inventory management
- β Multi-Branch Inventory: Each vendor can manage multiple branches with separate stock tracking
- β Subscription-Based Access: Flexible subscription plans with feature-based restrictions
- β Multi-Language Support: Full English/Arabic support with RTL ready
- β RESTful API: Complete API documentation for mobile app integration
- β Advanced Analytics: Comprehensive reporting and analytics dashboards
- β Role-Based Permissions: Granular permission system for vendor employees
- User Registration & Authentication
- Email/Phone-based registration
- Email and phone verification system
- Password reset with OTP codes
- Profile management with image upload
- Role-based access control (Admin, Vendor, User)
-
Vendor Registration & Approval
- Vendor registration with admin approval workflow
- Vendor profile management
- Vendor status control (Active/Inactive)
- Vendor featuring system
- Commission rate management
- Vendor balance tracking
-
Vendor Employees
- Create and manage vendor employees
- Granular permission system
- Role-based UI element visibility
- Branch-specific access control
- Flexible Subscription Plans
- Duration-based plans (days)
- Price configuration
- Maximum products count per plan
- Product featuring capability
- Active/Featured status control
- Subscription tracking and history
- Days remaining calculation
- Auto-expiration handling
-
Product Types
- Simple Products: Single SKU products with basic pricing
- Variable Products: Products with multiple variants (Size, Color, etc.)
-
Product Features
- Multi-language support (English/Arabic)
- Automatic SKU generation
- SEO-friendly slug generation
- Thumbnail and multiple image uploads
- Pricing with discount (percentage/fixed)
- Stock management per branch
- Product status (Active/Inactive)
- Featured products
- New products flag
- Admin approval workflow
- Bookable products
- Product categorization (many-to-many)
- Related products (manual or auto-generated)
-
Hierarchical Category System
- Multi-level categories
- Multi-language support
- Category slug generation
- Category request system (vendors can request new categories)
- Admin approval/rejection workflow
- Soft deletion
-
Product Variants
- Variant system (Size, Color, Material, etc.)
- Variant options management
- Variant request system
- Admin approval workflow
- Variant active/required toggle
- Multi-Branch Support
- Multiple branches per vendor
- Branch CRUD operations
- Branch status control (Active/Inactive)
- Branch-specific stock management
- Branch product stock tracking
- Branch variant stock tracking
- Advanced Stock Tracking
- Stock tracking per branch
- Simple product stock management
- Variable product variant stock management
- Stock availability checking
- Stock quantity tracking
- Low stock alerts
-
Shopping Cart
- Add/remove products
- Update quantities
- Apply coupon codes
- Cart persistence
- Stock validation
-
Order Management
- Order creation from cart
- Shipping cost calculation
- Multiple payment methods
- Wallet and points integration
- Order status workflow (Pending β Processing β Shipped β Delivered)
- Order cancellation
- Refund requests
- Invoice generation (PDF)
- Order reordering
-
Payment System
- Multiple payment methods
- Wallet balance system
- Points/rewards system
- Coupon system
- Commission calculation
- Vendor earnings tracking
- Withdrawal management
-
Transaction History
- Wallet transaction history
- Points transaction history
- Filtering and pagination
-
Admin Analytics
- Revenue reports
- Vendor performance metrics
- Product performance analytics
- Order analytics
- Commission tracking
-
Vendor Analytics
- Sales reports
- Earnings dashboard
- Product performance
- Customer insights
- Commission breakdown
- Ticket System
- Create support tickets
- Ticket status management
- Message threading
- File attachments
- Ticket assignment to vendors
-
Product Ratings
- 1-5 star ratings
- Review comments
- Rating moderation
- Average rating calculation
-
Vendor Ratings
- Vendor rating system
- Review management
- Rating visibility control
- Complete API Coverage
- Authentication endpoints
- Product management
- Cart operations
- Order processing
- User management
- Address management
- Ticket system
- Ratings & reviews
- Transactions
- Full API documentation included
- Multi-Language Support
- English/Arabic support
- Locale switching
- Translatable models
- RTL support ready
- Language-specific content
- Enterprise Security
- CSRF protection
- XSS protection
- SQL injection prevention (Eloquent ORM)
- Role-based authorization
- Permission-based access control
- File upload validation
- Input validation and sanitization
- Password hashing
- Email verification
- Rate limiting
- API token authentication (Sanctum)
- Framework: Laravel 12
- PHP Version: 8.3.19
- Database: MySQL/MariaDB
- Authentication: Laravel Sanctum v4
- Authorization: Spatie Laravel Permission
- Internationalization: Spatie Laravel Translatable
- Slug Generation: Cviebrock Eloquent Sluggable
- Excel Import/Export: Maatwebsite Excel
- PDF Generation: Laravel PDF
- CSS Framework: Tailwind CSS v4
- UI Components: Bootstrap 5.3.8
- Icons: Bootstrap Icons 1.13.1
- JavaScript: Vanilla JavaScript (Alpine.js for some components)
- Build Tool: Vite 7.0.7
- Styling: Sass
- Code Formatter: Laravel Pint v1
- Testing: PHPUnit v11
- Development Server: Laravel Sail v1
- Debugging: Laravel Pail v1.2.2
- Repository Pattern: Data access layer abstraction
- Service Layer: Business logic separation
- Factory Pattern: Product type handling (SimpleProduct, VariableProduct)
- Form Request Validation: Request validation classes
app/
βββ Contracts/ # Interface definitions
βββ Factories/ # Factory classes
βββ Helpers/ # Helper functions
βββ Http/
β βββ Controllers/
β β βββ Admin/ # Admin-specific controllers
β β βββ Api/ # API controllers
β β βββ Auth/ # Authentication controllers
β β βββ Vendor/ # Vendor-specific controllers
β βββ Middleware/ # Custom middleware
β βββ Requests/ # Form request validation
β βββ Resources/ # API resources
βββ Models/ # Eloquent models
βββ Repositories/ # Data access layer
βββ Services/ # Business logic layer
βββ ProductTypes/ # Product type implementations
- PHP >= 8.2
- Composer
- Node.js >= 18.x
- MySQL >= 8.0 or MariaDB >= 10.3
- Redis (optional, for caching and queues)
git clone https://github.com/your-username/multi-vendor-e-commerce.git
cd multi-vendor-e-commerce# Install PHP dependencies
composer install
# Install Node.js dependencies
npm install# Copy environment file
cp .env.example .env
# Generate application key
php artisan key:generateEdit .env file and configure:
APP_NAME="Multi-Vendor E-Commerce"
APP_ENV=local
APP_DEBUG=true
APP_URL=http://localhost:8000
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=multi_vendor_e_commerce
DB_USERNAME=root
DB_PASSWORD=
# Mail Configuration
MAIL_MAILER=smtp
MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"# Run migrations
php artisan migrate
# Seed database (optional)
php artisan db:seed# Build for production
npm run build
# Or run in development mode
npm run dev# Using Laravel's built-in server
php artisan serve
# Or using the dev script (includes queue worker and Vite)
composer run devThe application will be available at http://localhost:8000
php artisan tinker$user = \App\Models\User::create([
'name' => 'Admin',
'email' => 'admin@example.com',
'password' => bcrypt('password'),
'is_verified' => true,
'is_active' => true,
]);
$user->assignRole('admin');For production, configure queue workers:
# Supervisor configuration
php artisan queue:work --tries=3 --timeout=90Add to your crontab:
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1php artisan storage:link# Clear cache
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear
# Optimize for production
php artisan config:cache
php artisan route:cache
php artisan view:cacheAccess the admin dashboard at: http://localhost:8000/admin/dashboard
Admin Capabilities:
- Manage vendors (approve, activate, deactivate)
- Manage products (approve, edit, delete)
- Manage categories and variants
- Manage subscription plans
- View analytics and reports
- Manage orders
- System settings
Access the vendor dashboard at: http://localhost:8000/vendor/dashboard
Vendor Capabilities:
- Manage own products
- Manage branches
- Manage inventory
- View orders
- View analytics
- Manage subscription
- Manage employees
The platform provides a complete RESTful API. See API Documentation for details.
Complete API documentation is available in API_DOCUMENTATION.md.
Base URL: http://localhost:8000/api
Authentication: Bearer Token (Laravel Sanctum)
Key Endpoints:
POST /api/auth/register- Register new userPOST /api/auth/login- LoginGET /api/products- List productsGET /api/products/{id}- Get product detailsPOST /api/cart/{product}- Add to cartPOST /api/orders- Create order- And many more...
A complete Postman collection is included:
postman_collection.json- API collectionpostman_environment.json- Environment variables
# Run all tests
php artisan test
# Run specific test file
php artisan test --filter=ProductTest
# Run with coverage
php artisan test --coveragetests/
βββ Feature/ # Feature tests
βββ Unit/ # Unit tests
βββ TestCase.php # Base test case
- β CSRF protection on all forms
- β XSS protection
- β SQL injection prevention (Eloquent ORM)
- β Password hashing (bcrypt)
- β Rate limiting on sensitive endpoints
- β File upload validation
- β Input validation and sanitization
- β Role-based access control
- β Permission-based authorization
- β API token authentication
- Never commit
.envfile - Use strong passwords
- Keep dependencies updated
- Enable HTTPS in production
- Regular security audits
- Use environment-specific configurations
- Laravel Pint: Automatic code formatting
- PSR-12: PHP coding standards
- Type Hints: Full type declarations
- PHPDoc: Comprehensive documentation
- Repository Pattern: Clean data access
- Service Layer: Business logic separation
# Format all files
vendor/bin/pint
# Format only changed files
vendor/bin/pint --dirtyWe welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests (
php artisan test) - Format code (
vendor/bin/pint) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow PSR-12 coding standards
- Write tests for new features
- Update documentation
- Write clear commit messages
- Ensure all tests pass
This project is open-sourced software licensed under the MIT license.
For support, email support@example.com or open an issue in the repository.
- Laravel - The PHP Framework
- Spatie - Laravel Permission & Translatable packages
- Tailwind CSS - Utility-first CSS framework
- Bootstrap - Frontend framework
Version: 1.1.0
Status: Active Development
Last Updated: January 2026
- β User & Vendor Management
- β Product Management (Simple & Variable)
- β Multi-Branch Inventory
- β Subscription System
- β Order Management
- β Payment Integration
- β Analytics & Reporting
- β RESTful API
- β Multi-Language Support
- β Role-Based Permissions
- Mobile App (React Native/Flutter)
- Advanced Analytics Dashboard
- AI-Powered Recommendations
- Multi-Currency Support
- Advanced Shipping Options
- Marketplace Commission System
Built with β€οΈ using Laravel 12