Skip to content
<Rojit />
Vendors: 50+· 2025

E-commerce Multi-Vendor Platform

Multi-vendor marketplace with real-time notifications via Laravel Reverb, automated PDF invoicing, Filament admin panels, and role-based dashboards for vendors and administrators.

Technical case study by Rojit Pokharel — Full-Stack Web Developer & System Architect, Kathmandu, Nepal

LaravelFilamentReverbReactMySQL

Stack diagram

Frontend
React
Application
LaravelFilament
Real-time
Reverb
Data
MySQL
Client / Problem
$
  • Marketplace operators needed a platform where many independent vendors can sell while the operator controls approvals, commissions, and platform-wide visibility.
  • Vendors had no real-time awareness of new orders, stock alerts, or payment updates.
  • Manual invoice and bookkeeping work consumed hours per month across hundreds of orders.
My Role
$
  • Full-stack developer — Laravel marketplace with Filament admin panels, Reverb real-time notifications, automated invoicing, and role-based dashboards.
  • Designed the vendor-scoped data model and product approval workflow.
Architecture
$
  • Shared database with vendor-scoped queries — every product, order, and report is scoped to the authenticated vendor.
  • Laravel Reverb pushes order confirmations, stock alerts, and payment updates in real time.
  • Filament admin panels for both platform admins and vendors, secured with Filament Shield role management.
  • Automated PDF invoicing queued asynchronously on every completed order.
Database Design
$
  • Schema: vendors, products, product variants, orders, order items, invoices, and commissions.
  • Foreign-key integrity between orders, items, and vendors; indexes on vendor_id and order status.
  • Commission calculation stored at order time to keep reports stable against later price changes.
API Architecture
$
  • Laravel API resources for product and order endpoints consumed by the React frontend.
  • Vendor-scoped Eloquent scopes enforced in queries so no vendor ever sees another's data.
Code
Vendor-scoped product query in Filament
class ProductResource extends FilamentResource
{
    public static function getEloquentQuery(): Builder
    {
        return parent::getEloquentQuery()
            ->where('vendor_id', auth()->user()->vendor_id);
    }
}
Authentication
$
  • Sanctum auth for API clients; Spatie roles separating vendor and administrator capabilities.
  • Filament Shield governs panel access with permission-based resource visibility.
Real-time Systems
$
  • Reverb WebSockets deliver real-time order and stock notifications to vendor dashboards.
  • Live inventory indicators so vendors react to stock alerts instantly.
Deployment
$
  • Laravel app behind Nginx with SSL, MySQL database, Redis for cache and Reverb.
  • Supervisor-managed queue workers processing invoices and notifications.
Performance Optimization
$
  • Vendor-scoped queries with proper indexes keep marketplace queries fast as catalogs grow.
  • Queued invoice generation keeps the order request cycle responsive.
Problems Encountered
$
  • Ensuring a vendor can never query or mutate another vendor's products through the API.
  • Generating branded PDF invoices for hundreds of orders without blocking checkout.
How I Solved Them
$
  • Global vendor scopes plus explicit query filtering on every product/order endpoint.
  • Celery-style queued job per order generating the PDF with taxes, itemized products, and vendor details.
Results
$
  • Live multi-vendor marketplace supporting 50+ active vendors.
  • Real-time order awareness and automated invoicing saved dozens of bookkeeping hours per month.
Lessons Learned
$
  • Vendor isolation must be enforced at the query layer, not just the UI.
  • Automated invoicing is a queue job, never a synchronous request-time task.

Want a production system like this?

I build production web applications end-to-end. Let's discuss your project.

Get in Touch