Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

44 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Laravel 12 PHP 8.2+ MySQL Stripe PayPal TailwindCSS MIT License

πŸ›’ E-Shop β€” Multi-Vendor E-Commerce Platform

A full-featured, production-ready multi-vendor e-commerce platform built with Laravel 12. E-Shop supports multiple user roles β€” Admin, Seller, Delivery Partner, and Customer β€” each with dedicated dashboards, real-time notifications, and comprehensive management tools. Integrated with Stripe and PayPal for secure global payments.

Live Demo

πŸ”— Live Demo: E-Shop


πŸ“Έ Screenshots

E-Shop Homepage
🏠 Storefront β€” Hero banner carousel with new arrivals and product listings

Admin Dashboard Analytics
πŸ“Š Admin Dashboard β€” Revenue trends, KPI cards, and top product sales analytics

Order Management Panel
πŸ“¦ Order Management β€” Track orders, assign delivery, process refunds

Shop by Category
πŸ—‚οΈ Category Browser β€” Visual category grid with item counts


✨ Key Features

πŸ›οΈ Storefront (Customer-Facing)

  • Product Catalog with search, filtering, and category browsing
  • Product Detail Pages with image galleries, color/size variants, and stock indicators
  • Shopping Cart with real-time stock validation
  • Secure Checkout via Stripe and PayPal with multi-currency support
  • Product Reviews & Ratings with star ratings and seller replies
  • Special Offers Page displaying active discounts and deals
  • Dynamic Banner Carousel on the homepage
  • Order Tracking with real-time status updates via SSE

πŸͺ Admin Dashboard

  • Analytics Dashboard with revenue trends (1D/6D/1M/1Y), KPI cards, and top product sales charts
  • Product Management β€” CRUD operations with image uploads, variants, discount pricing, and stock tracking
  • Order Management β€” View, filter, update status, assign delivery partners, and process refunds
  • Return Request Handling β€” Approve/reject returns and assign pickup delivery
  • Category Management with image support
  • Banner Management β€” Create/reorder homepage banners
  • Customer Management β€” View customer details and order history
  • Delivery Partner Management β€” Approve applications, set fees, assign/release partners
  • Seller Management β€” Manage seller accounts, block/unblock sellers
  • Multi-Admin Accounts β€” Create and manage admin sub-accounts
  • Currency Configuration with live exchange rate conversion
  • Auto-Delete Settings β€” Configurable automatic cleanup of old records via stored procedures
  • Real-Time Notifications via SSE (Server-Sent Events)

πŸ‘¨β€πŸ’Ό Seller Dashboard

  • Dedicated Seller Portal with personalized analytics
  • Product Management β€” Sellers manage their own product listings
  • Order & Return Management scoped to seller's products
  • Delivery Partner Oversight β€” Manage delivery partners assigned to the seller's store
  • Customer Insights β€” View customers who purchased from the seller
  • Auto-Delete Configuration β€” Seller-level cleanup settings

🚚 Delivery Partner Portal

  • Application System β€” Apply to work with specific stores
  • Work Dashboard β€” View and accept delivery assignments
  • Order Pickup & Delivery β€” Scan-based verification with image proof
  • Return Pickups β€” Handle product return logistics
  • Delivery History β€” Complete log of past deliveries
  • Balance Tracking β€” Earnings and fee management

πŸ” Authentication & Security

  • Email-Based OTP Verification for all user registrations
  • Forgot Password Flow with OTP-based reset
  • Role-Based Access Control β€” Admin, Seller, Delivery Boy, Customer
  • Middleware Protection for each role's routes
  • Account Blocking β€” Admins can block sellers and users
  • Soft Deletes β€” Safe account deletion with audit trail

πŸ’³ Payment Processing

  • Stripe Integration β€” Secure card payments with Payment Intents API
  • PayPal Integration β€” PayPal checkout flow with sandbox/live modes
  • Refund Processing β€” Full refund support through both gateways
  • Multi-Currency Support β€” Configurable currency with exchange rate API

πŸ“§ Email Notifications

  • Order Confirmation emails to customers
  • Order Status Updates (processing, shipped, delivered, cancelled)
  • Return Status Notifications
  • Work Assignment Notifications for delivery partners
  • OTP Verification Emails for registration and password reset

πŸ› οΈ Tech Stack

Layer Technology
Backend Laravel 12, PHP 8.2+
Frontend Blade Templates, HTML5, CSS3, JavaScript
CSS Framework Tailwind CSS 4.0
Database MySQL 8.0
Build Tool Vite 7.x with Laravel Vite Plugin
Payments Stripe (stripe/stripe-php), PayPal (srmklive/paypal)
Real-Time Server-Sent Events (SSE)
Email Laravel Mail (SMTP β€” Gmail)
Queue Laravel Queue (Database driver)
Deployment AWS Lambda ready via Bref (bref/bref, bref/laravel-bridge)

πŸ“ Folder Structure

e-com/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ Console/               # Artisan console commands
β”‚   β”œβ”€β”€ Helpers/
β”‚   β”‚   └── currency.php       # Global currency formatting helpers
β”‚   β”œβ”€β”€ Http/
β”‚   β”‚   β”œβ”€β”€ Controllers/
β”‚   β”‚   β”‚   β”œβ”€β”€ AdminDashboardController.php    # Admin analytics & KPIs
β”‚   β”‚   β”‚   β”œβ”€β”€ AdminDeliveryController.php     # Delivery partner management
β”‚   β”‚   β”‚   β”œβ”€β”€ AdminSellerController.php       # Seller & admin account management
β”‚   β”‚   β”‚   β”œβ”€β”€ AuthController.php              # Authentication (all roles)
β”‚   β”‚   β”‚   β”œβ”€β”€ BannerController.php            # Homepage banner CRUD
β”‚   β”‚   β”‚   β”œβ”€β”€ CategoryController.php          # Category management
β”‚   β”‚   β”‚   β”œβ”€β”€ CurrencyController.php          # Currency & exchange rate settings
β”‚   β”‚   β”‚   β”œβ”€β”€ CustomerController.php          # Customer data management
β”‚   β”‚   β”‚   β”œβ”€β”€ DashboardController.php         # Customer dashboard & order history
β”‚   β”‚   β”‚   β”œβ”€β”€ DeliveryController.php          # Delivery partner operations
β”‚   β”‚   β”‚   β”œβ”€β”€ NotificationController.php      # Real-time notification polling
β”‚   β”‚   β”‚   β”œβ”€β”€ OrderController.php             # Order lifecycle management
β”‚   β”‚   β”‚   β”œβ”€β”€ PayPalController.php            # PayPal payment integration
β”‚   β”‚   β”‚   β”œβ”€β”€ ProductController.php           # Product CRUD & stock management
β”‚   β”‚   β”‚   β”œβ”€β”€ ReturnRequestController.php     # Return/refund request handling
β”‚   β”‚   β”‚   β”œβ”€β”€ ReviewController.php            # Product reviews & replies
β”‚   β”‚   β”‚   β”œβ”€β”€ SSEController.php               # Server-Sent Events streaming
β”‚   β”‚   β”‚   β”œβ”€β”€ SellerDashboardController.php   # Seller-specific analytics
β”‚   β”‚   β”‚   β”œβ”€β”€ SiteSettingController.php       # Auto-delete & site config
β”‚   β”‚   β”‚   └── StripeController.php            # Stripe payment integration
β”‚   β”‚   └── Middleware/
β”‚   β”‚       β”œβ”€β”€ AdminMiddleware.php             # Admin role guard
β”‚   β”‚       β”œβ”€β”€ DeliveryMiddleware.php          # Delivery partner role guard
β”‚   β”‚       └── SellerMiddleware.php            # Seller role guard
β”‚   β”œβ”€β”€ Mail/
β”‚   β”‚   β”œβ”€β”€ OrderStatusMail.php                # Order status change emails
β”‚   β”‚   β”œβ”€β”€ OrderSuccessMail.php               # Order confirmation emails
β”‚   β”‚   β”œβ”€β”€ OtpMail.php                        # OTP verification emails
β”‚   β”‚   β”œβ”€β”€ ReturnStatusMail.php               # Return status update emails
β”‚   β”‚   └── WorkAssignedMail.php               # Delivery assignment emails
β”‚   β”œβ”€β”€ Models/
β”‚   β”‚   β”œβ”€β”€ Banner.php                         # Homepage banner model
β”‚   β”‚   β”œβ”€β”€ Category.php                       # Product category model
β”‚   β”‚   β”œβ”€β”€ DeliveryApplication.php            # Delivery partner application
β”‚   β”‚   β”œβ”€β”€ Order.php                          # Order with payment processing
β”‚   β”‚   β”œβ”€β”€ OrderDelivery.php                  # Delivery tracking & proof
β”‚   β”‚   β”œβ”€β”€ OrderReturn.php                    # Return request model
β”‚   β”‚   β”œβ”€β”€ Product.php                        # Product with variants & reviews
β”‚   β”‚   β”œβ”€β”€ ProductReview.php                  # Customer review model
β”‚   β”‚   β”œβ”€β”€ ProductVariant.php                 # Color/size variant model
β”‚   β”‚   β”œβ”€β”€ SellerAssignment.php               # Seller-to-store assignment
β”‚   β”‚   β”œβ”€β”€ SiteSetting.php                    # Key-value site configuration
β”‚   β”‚   β”œβ”€β”€ User.php                           # Multi-role user model (SoftDeletes)
β”‚   β”‚   └── UserInfo.php                       # Extended user profile data
β”‚   β”œβ”€β”€ Notifications/                         # Push notification classes
β”‚   β”œβ”€β”€ Providers/                             # Service providers
β”‚   └── Traits/                                # Reusable model traits
β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ paypal.php                             # PayPal SDK configuration
β”‚   β”œβ”€β”€ services.php                           # Third-party service keys
β”‚   └── ...                                    # Standard Laravel config files
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ migrations/                            # 52 migration files (schema evolution)
β”‚   β”œβ”€β”€ seeders/                               # Database seeders
β”‚   └── database.sqlite                        # SQLite fallback for development
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ images/                                # Static image assets
β”‚   β”œβ”€β”€ lottie/                                # Lottie animation files
β”‚   β”œβ”€β”€ media/                                 # Uploaded media storage
β”‚   └── sounds/                                # Notification sound files
β”œβ”€β”€ resources/
β”‚   β”œβ”€β”€ css/                                   # Source stylesheets
β”‚   β”œβ”€β”€ js/                                    # Source JavaScript
β”‚   └── views/
β”‚       β”œβ”€β”€ admin/                             # Admin panel views (18 templates)
β”‚       β”œβ”€β”€ auth/                              # Password reset flow views
β”‚       β”œβ”€β”€ delivery/                          # Delivery partner views (6 templates)
β”‚       β”œβ”€β”€ emails/                            # Email templates (5 templates)
β”‚       β”œβ”€β”€ errors/                            # Error page views
β”‚       β”œβ”€β”€ layouts/
β”‚       β”‚   β”œβ”€β”€ admin.blade.php                # Admin layout with sidebar
β”‚       β”‚   β”œβ”€β”€ delivery.blade.php             # Delivery partner layout
β”‚       β”‚   β”œβ”€β”€ master.blade.php               # Public storefront layout
β”‚       β”‚   └── seller.blade.php               # Seller dashboard layout
β”‚       β”œβ”€β”€ seller/                            # Seller panel views (11 templates)
β”‚       β”œβ”€β”€ cart.blade.php                     # Shopping cart page
β”‚       β”œβ”€β”€ categories.blade.php               # Category listing page
β”‚       β”œβ”€β”€ checkout-success.blade.php         # Payment success page
β”‚       β”œβ”€β”€ dashboard.blade.php                # Customer dashboard
β”‚       β”œβ”€β”€ index.blade.php                    # Homepage
β”‚       β”œβ”€β”€ login.blade.php                    # Customer login
β”‚       β”œβ”€β”€ offers.blade.php                   # Special offers page
β”‚       β”œβ”€β”€ product-detail.blade.php           # Product detail page
β”‚       β”œβ”€β”€ products.blade.php                 # Product listing page
β”‚       └── register.blade.php                # Customer registration
β”œβ”€β”€ routes/
β”‚   └── web.php                                # All application routes (309 lines)
β”œβ”€β”€ screenshots/                               # README screenshot assets
β”œβ”€β”€ ecommerce_db.sql                           # Database dump for quick setup
β”œβ”€β”€ composer.json                              # PHP dependencies
β”œβ”€β”€ package.json                               # Node.js dependencies
β”œβ”€β”€ vite.config.js                             # Vite build configuration
β”œβ”€β”€ serverless.yml                             # AWS Lambda deployment config
└── startup.sh                                 # Server startup script

πŸš€ Getting Started

Prerequisites

Requirement Version
PHP β‰₯ 8.2
Composer β‰₯ 2.x
Node.js β‰₯ 18.x
MySQL β‰₯ 8.0
npm β‰₯ 9.x

Installation

  1. Clone the repository

    git clone https://github.com/PTharanan/e-com.git
    cd e-com
  2. Install PHP dependencies

    composer install
  3. Install Node.js dependencies

    npm install
  4. Environment configuration

    cp .env.example .env
    php artisan key:generate
  5. Configure your .env file

    Update the following values in .env:

    # Database
    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=ecommerce_db
    DB_USERNAME=root
    DB_PASSWORD=your_password
    
    # Stripe Payment Gateway
    STRIPE_KEY=your_stripe_publishable_key
    STRIPE_SECRET=your_stripe_secret_key
    
    # PayPal Payment Gateway
    PAYPAL_SANDBOX_CLIENT_ID=your_paypal_client_id
    PAYPAL_SANDBOX_CLIENT_SECRET=your_paypal_client_secret
    PAYPAL_MODE=sandbox
    
    # Mail (SMTP)
    MAIL_MAILER=smtp
    MAIL_HOST=smtp.gmail.com
    MAIL_PORT=465
    MAIL_USERNAME=[email protected]
    MAIL_PASSWORD=your_app_password
    MAIL_ENCRYPTION=ssl
    
    # Exchange Rate API (for multi-currency)
    EXCHANGE_RATE_API_KEY=your_api_key
  6. Database setup

    Option A β€” Run migrations:

    php artisan migrate

    Option B β€” Import the SQL dump (includes sample data):

    mysql -u root -p ecommerce_db < ecommerce_db.sql
  7. Build frontend assets

    npm run build
  8. Start the development server

    # Quick start β€” runs server, queue, logs, and Vite concurrently
    composer dev

    Or start services individually:

    php artisan serve
    php artisan queue:listen
    npm run dev
  9. Access the application

    Portal URL
    Storefront http://localhost:8000
    Admin Panel http://localhost:8000/admin/sign-in
    Seller Portal http://localhost:8000/seller/sign-in
    Delivery Portal http://localhost:8000/delivery/sign-in

πŸ‘₯ User Roles & Access

Role Description
Customer Browse products, manage cart, checkout, track orders, submit reviews
Admin Full platform control β€” products, orders, sellers, delivery, analytics
Seller Manage own products, view orders, handle returns, track revenue
Delivery Boy Accept deliveries, verify pickups, manage returns, track earnings

πŸ’³ Payment Integration

Stripe

  • Supports card payments via the Payment Intents API
  • Automatic refund processing
  • Test mode supported with sandbox keys

PayPal

  • Full PayPal checkout flow integration
  • Sandbox and live mode switching via PAYPAL_MODE
  • Order capture and refund support

πŸ“‘ Real-Time Features

  • Server-Sent Events (SSE) for live notification streaming
  • Notification Sound Alerts for new orders and assignments
  • Lottie Animations for enhanced UI feedback (success states, loading indicators)

☁️ Deployment

Traditional Server (XAMPP / VPS)

composer install --optimize-autoloader --no-dev
npm run build
php artisan config:cache
php artisan route:cache
php artisan view:cache

AWS Lambda (Serverless)

The project includes serverless.yml and bref packages for serverless deployment:

serverless deploy

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


πŸ“¬ Contact

Perinpamoorthy Tharanan


⭐ Star this repo if you found it helpful!

About

A full-featured multi-vendor e-commerce platform built with Laravel 12 and Tailwind CSS. Features dedicated Admin, Seller, Delivery Partner, and Customer portals with Stripe & PayPal integration, real-time SSE notifications, and multi-currency support.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages