Mondal’s E-Commerce: Advanced Multi-Vendor Laravel Marketplace System (Full Project) - ANSNEW

Mondal’s E-Commerce: Advanced Multi-Vendor Laravel Marketplace System (Full Project)

Mondal’s E-Commerce is a production-oriented multi-vendor marketplace built with Laravel 13 and PHP 8.3+. Multiple sellers can run stores under one platform; customers shop on a unified storefront; administrators govern users, catalog, orders, payouts, and settings—similar in spirit to large marketplaces, packaged as a clean Laravel codebase you can run locally, in Docker, or on Ubuntu with scripted deploys.

Mondal’s E-Commerce
Mondal’s E-Commerce — Laravel storefront & admin

The project is developed by Md. Yamin Hossain. It demonstrates real-world patterns: MVC + services, Spatie Laravel Permission roles, a modular plugins folder, Laravel Sanctum for API tokens, Vite for front-end assets, and optional Docker Compose / Kubernetes (K3s) examples for deployment.

GitHub Repository: https://github.com/needyamin/mondals-ecommerce


🌍 What is Mondal’s E-Commerce?

It is a full marketplace engine, not a single-store demo. Vendors can apply or be onboarded by admin; products and orders are tied to vendors where relevant; the platform owner keeps oversight through a dedicated admin panel and reporting.

High-level capabilities:

  • Multi-vendor catalog and vendor dashboards
  • Customer storefront: browse, cart, checkout, orders, profile, wishlist
  • Central admin: catalog, orders, users, vendors, payouts, CMS, themes, plugins
  • REST API v1 under /api/v1 (Sanctum) for mobile or headless clients
  • Extensible plugins and themes under plugins/ and resources/themes/

🏗️ Architecture

  • Presentation: Blade views, Tailwind-oriented UI (Vite: resources/css, resources/js)
  • Application: Controllers, Services (e.g. checkout, cart), helpers for business math, media, theme
  • Data: MySQL via Eloquent, migrations, factories, seeders
  • Extensions: First-party plugins (payments, shipping, reviews, etc.) autoloaded from composer.json

👥 Roles (Spatie Permission)

  • Customer — storefront, cart, checkout, customer account, orders, wishlist
  • Vendor — vendor area: products, orders, settings (as implemented in routes)
  • Staff — operational role for limited back-office tasks
  • Admin — full platform management, reports, plugins, themes, CMS

🛍️ Core features (aligned with the codebase)

🛒 Storefront & customer

  • Home, product listing, product detail, categories
  • Shopping cart, coupons, checkout, order confirmation
  • Registration / login (web), customer dashboard & orders
  • Wishlist

📦 Orders & payments

  • Order lifecycle, status history, admin order tools
  • Multiple payment methods (e.g. COD; gateway plugins such as bKash when enabled)
  • Vendor earnings & admin payouts workflow

🏪 Vendor

  • Vendor registration flow, vendor dashboard
  • Product management aligned with marketplace rules

🧑‍💼 Admin

  • Dashboard, products, categories, brands, coupons
  • Orders, users, vendors (approve/suspend, etc.)
  • Reports (sales, vendors), payouts
  • CMS: pages, banners, site settings
  • Themes (upload, activate, customize), product upload storage settings
  • Plugins & addons management
  • In-app database notifications for admins (e.g. new orders, vendor applications)

🔌 Bundled-style plugins (examples in repo)

The repository ships with plugin modules you can enable from the admin UI (exact names depend on install):

  • bKash Payment — payment integration hooks
  • Flat Rate Shipping — shipping rules
  • Pathao — logistics integration
  • IP Blocking — access control
  • Product Reviews — reviews for products
  • Marketing & Tracking — pixels / marketing settings

⚙️ Technology stack

  • Runtime: PHP 8.3+
  • Framework: Laravel 13.x
  • Auth / API: Laravel Sanctum, REST /api/v1
  • Permissions: spatie/laravel-permission
  • Frontend build: Vite, npm
  • Database: MySQL (typical; see .env.example)
  • Deployment: Docker Compose, scripts/setup-server.sh, scripts/deploy.sh, optional k8s/ manifests

🌐 REST API (v1)

Public and authenticated JSON endpoints include auth, categories, products, cart, checkout, orders, wishlist, addresses, and more—suitable for mobile apps or SPAs. Protect user routes with Sanctum tokens.


📁 Repository layout (short)

mondals-ecommerce/
├── app/              Controllers, Models, Services, Notifications, Helpers
├── bootstrap/
├── config/
├── database/         migrations, seeders
├── docker/
├── k8s/              optional Kubernetes examples
├── plugins/          bKash, Pathao, reviews, etc.
├── public/
├── resources/        views, themes, css/js
├── routes/           web.php, api.php
├── scripts/          setup-server.sh, deploy.sh, k8s-up.sh
└── storage/

🚀 Local setup

git clone https://github.com/needyamin/mondals-ecommerce.git
cd mondals-ecommerce
composer install && npm install && npm run build
cp .env.example .env && php artisan key:generate
php artisan migrate --seed && php artisan storage:link
php artisan serve

After changing Composer autoload files, run composer dump-autoload.


🐳 Docker (quick)

cp .env.example .env   # set APP_KEY, APP_URL
docker compose up -d --build
docker compose exec app php artisan migrate --seed

Typical ports (see README): app http://localhost:8000, phpMyAdmin 8088, MySQL host port 3388.


☁️ Ubuntu server & CI

  • From scripts/: setup-server.sh, then ./up or ./deploy.sh for Docker-based deploys (git pull, compose, migrate, cache).
  • Optional: GitHub Actions workflow deploys over SSH; can use Cloudflare Tunnel (cloudflared access ssh) so the runner never needs a public SSH port.

🔐 Security notes

  • CSRF on web forms, middleware for roles (admin, vendor, active user)
  • Validated requests, hashed passwords, Sanctum for API
  • Environment-based secrets—never commit real .env

🧩 Domain model (what the database is built around)

At its core the app separates who sells, who buys, and how money moves:

  • Users — authentication, profile, roles (Spatie). A user can be a customer, vendor, staff, or admin.
  • Vendors — store profile (name, slug, commission, status: pending / approved / suspended, etc.). Products belong to vendors.
  • Products & catalog — categories, brands, attributes/variants where used, inventory, pricing, approval-style fields for marketplace control.
  • Orders — order number, line items (snapshot of product name, price, vendor), status history, payment status, shipping fields, notes.
  • Money flowvendor earnings derived from order lines and commission; admin payouts to settle balances with sellers.
  • Coupons — cart-level discounts (e.g. percentage, fixed, free shipping) enforced in checkout logic.

🛒 Storefront & URLs (web)

Public buyers typically use:

  • / — home; /products, /product/{slug} — catalog and PDP.
  • /cart — cart; authenticated users can apply coupons and open /checkout.
  • /checkout/place-order — places order; /order/confirmation/{orderNumber} — thank-you page.
  • /payment/{gateway}/callback — gateway return URL for online payments (bKash, etc. when configured).
  • /stores, /stores/{slug} — browse vendor storefronts on the marketplace.
  • /sitemap.xml — SEO sitemap generation.
  • /login, /register, /register/vendor — web auth and seller signup.

Logged-in customers use the /customer/… prefix: dashboard, orders, profile, wishlist.


🏪 Vendor panel (what sellers see)

Routes under /vendor (must be logged in as a vendor) include:

  • Dashboard and CRUD for own products (no “show” route—list/edit focused).
  • Orders — list, detail, and advance workflow to move orders forward in fulfillment.
  • Earnings and payouts — view balances, history, payout receipts.
  • Settings — vendor-specific configuration exposed in the UI.

This keeps seller tools separate from the global admin, so you can scale operations without mixing “platform” and “shop” concerns.


🧑‍💼 Admin panel (deep cut)

Beyond CRUD, the admin area includes operational features that matter in production:

  • Exports — products and users can be exported (see routes) for spreadsheets or backups.
  • Orders — status and payment status updates, printable invoice route.
  • Vendorsapprove, reject, suspend, unsuspend, and commission overrides per vendor.
  • CMS — static pages, homepage-style banners, and global settings (site name, SEO-ish keys, payment toggles in seed data, etc.).
  • Reportssales and vendor reports for analytics.
  • Storage — product image upload targets (e.g. local vs cloud drivers via settings).
  • Notifications/admin/notifications: database notifications (e.g. new orders, new vendor applications), mark read, link through to the relevant order or vendor screen.

💰 Business & pricing logic (helpers)

Instead of scattering round() everywhere, the project uses shared PHP helpers in app/Helpers/business_calculation.php (loaded via Composer): cart line totals, subtotals, tax stacks, shipping thresholds, coupon discount math, and commission on vendor lines. That keeps storefront, checkout, and reporting aligned on the same numbers—important for disputes and accounting.


🔌 How plugins work (conceptually)

Plugins live under plugins/<name>/ and are wired into Composer’s PSR-4 autoload where needed. In the admin UI you can upload, install, enable, disable, uninstall, and open per-plugin settings. Examples in the repo include bKash, flat-rate shipping, Pathao, IP blocking, product reviews, and marketing pixels—each can extend routes, views, or services without forking the whole core.

Some plugins register their own admin routes (e.g. marketing tracking loads routes/web.php from the plugin path when present) so route caching stays coherent.


🎨 Themes

Admins can upload theme packages, activate one, and use a customize flow to adjust storefront appearance where the theme supports it—useful for white-label or seasonal skins without redeploying PHP code.


🌐 REST API (more concrete)

Under /api/v1 (JSON enforced via middleware where configured):

  • Public: register/login, category trees, featured categories, product list & detail by slug.
  • With Sanctum token: profile, addresses, orders, wishlist, full cart CRUD, coupon apply/remove, checkout calculate & place order, vendor apply & vendor profile update.
  • Stores: GET /api/v1/stores and GET /api/v1/stores/{slug} mirror the web store directory.

This is the same backend as the Blade storefront—ideal if you later ship a Flutter/React client or a partner integration.


🧪 Demo data & default login (after migrate --seed)

The seeders populate roles, an admin user, vendors, customers, sample products, orders, CMS pages, banners, menus, and blog-style content so the UI is not empty on first run. Check the latest README.md and database/seeders for exact emails/passwords (commonly password for demo accounts). Always change these before any public deployment.


📊 Good fits

  • Learning advanced Laravel & marketplace patterns
  • Portfolio / interview demo
  • Base for a Bangladesh-oriented or regional multi-vendor launch (BDT, local gateways, shipping plugins)

📈 Possible next steps (not all in repo)

  • More payment gateways and shipping carriers as plugins
  • Official mobile apps consuming /api/v1
  • Search (e.g. Meilisearch/Algolia), richer analytics
  • Automated tests and CI beyond deploy

🎯 Problems this project tries to solve

  • One codebase, many actors — same app serves public SEO-friendly pages, authenticated customers, vendors, and admins—without duplicating business rules.
  • Regional commerce — BDT-oriented examples, local payment (bKash) and delivery (Pathao) as plugins rather than hard-coded forks.
  • Operator workflows — payouts, commissions, and exports reflect how a real marketplace back office works, not only a toy shop.
  • Deployability — Docker Compose for laptops, scripts for Ubuntu, optional K8s manifests and GitHub Actions + SSH (e.g. via Cloudflare Tunnel) for teams that ship often.

🏁 Conclusion

Mondal’s E-Commerce is a cohesive Laravel 13 marketplace: multi-role access, vendor economics, admin tooling, plugins, API, and deployment paths from local Docker to server scripts and optional Kubernetes. It is a strong foundation for developers who want a realistic, extensible e-commerce architecture.

Developer: Md. Yamin Hossain
GitHub: https://github.com/needyamin

Download ANSNEW APP For Ads Free Expriences!
Yamin Hossain Shohan
Software Engineer, Researcher & Digital Creator

I'm a researcher, software engineer, and digital creator who uses technology and creativity to make useful tools and create interesting content.

Copyright Disclaimer

All the information is published in good faith and for general information purpose only. We does not make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on ansnew.com is strictly at your own risk. We will not be liable for any losses and/or damages in connection with the use of our website. Please read our complete disclaimer. And we do not hold any copyright over the article multimedia materials. All credit goes to the respective owner/creator of the pictures, audios and videos. We also accept no liability for any links to other URLs which appear on our website. If you are a copyright owner or an agent thereof, and you believe that any material available on our services infringes your copyrights, then you may submit a written copyright infringement notification using the contact details

(0) Comments on "Mondal’s E-Commerce: Advanced Multi-Vendor Laravel Marketplace System (Full Project)"

* Most comments will be posted if that are on-topic and not abusive
Back To Top