A Premium, Modular E-Commerce Platform & CMS
ShopNow is a premium, full-featured modular e-commerce platform and Content Management System (CMS) designed for modern retail. Built on a robust Laravel 13 backend and a reactive Vue 3 frontend, it features a dual-frontend architecture: a highly interactive Single Page Application (SPA) admin dashboard powered by Inertia.js v3, paired with a lightning-fast, SEO-optimized public storefront powered by server-rendered Blade templates and reactive Vue 3 Islands.
The application is built around a Modular MVC pattern with a lightweight Service Layer to isolate business operations into testable, reusable units.
Instead of cluttering the default app/ directory, all core domains are encapsulated inside self-contained modules under the modules/ folder. Each module encapsulates its own routes, models, controllers, services, form requests, views, migrations, seeders, and Pest feature tests.
graph TD
subgraph "Public Front-End (Blade + Vue Islands)"
Storefront[Blade Templates]
Islands[Vue 3 Components]
CartStore[localStorage Cart Store]
Storefront --> Islands
Islands --> CartStore
end
subgraph "Admin Front-End (Inertia SPA)"
Inertia[Inertia.js v3]
VueSPA[Vue 3 SPA]
Inertia --> VueSPA
end
subgraph "Laravel Core Backend"
Routes[Routes]
Middleware[Middleware]
Controllers[Controllers]
Services[Service Layer]
Models[Eloquent Models]
Routes --> Middleware
Middleware --> Controllers
Controllers --> Services
Services --> Models
end
Storefront --> Routes
Inertia --> Routes
- Modular Domain Design β Feature modules for Acl, Product, Cart, Order, Blog, Settings, Profile, Slider, and more.
- Dual-Frontend Strategy β A fully-interactive admin panel using Inertia + Vue SPA, alongside an SEO-friendly public storefront using Blade and Vue 3 islands.
- Spatie Integration β Advanced media uploads and conversions via Spatie Media Library, granular roles/permissions via Spatie Permission, and automated audit trails via Spatie Activitylog.
- Granular ACL System β Permission-gated routes and UI actions with support for direct user permissions and role-based policies.
- Meta Conversions API β Built-in server-side Facebook Pixel and Conversions API integration to track user signups, leads, pageviews, and purchases with SHA-256 hashed PII data.
- Robust Geocoding & Addresses β Integrated with Bangladesh geocoding (Division, District, Upazila, Union) supporting saved customer addresses and default selectors, with division auto-derivation on district changes.
- SEO & Caching Ready β Dynamic schema generator (
JSON-LD), auto-meta tags for posts/products, automated XML sitemaps, and database settings cached for 24 hours.
| Layer | Technologies |
|---|---|
| Runtime | PHP 8.4.23+, Node.js 20+ |
| Framework | Laravel 13.16.1 |
| Admin Frontend | Vue 3.4.21, Inertia.js v3 (client v2.3), Pinia, Flowbite, Remix Icon |
| Public Storefront | Laravel Blade, Vue 3 Islands, Tailwind CSS v4.2.4 |
| Database | SQLite (default dev), MySQL / MariaDB (production-ready) |
| Testing | Pest v4.0 (feature & unit suites) |
| Code Style | Laravel Pint (PSR-12), ESLint v9, Prettier v3 |
shopnow/
βββ app/ # Application bootstrap & shared middleware
βββ bootstrap/ # Route & middleware configuration (app.php)
βββ config/ # Application & package settings
βββ database/ # Seeders & global migrations
βββ modules/ # Self-contained domain modules
β βββ Acl/ # Roles & permissions management
β βββ AdminAuth/ # Admin login & password reset
β βββ Blog/ # Blog posts, categories, tags, and authors
β βββ Cart/ # Client-side shopping cart endpoints
β βββ ContactMessage/ # Contact forms & submissions
β βββ Customer/ # Customer CRUD, addresses, & report generator
β βββ CustomerAuth/ # Customer login, signup, & address management
β βββ Dashboard/ # Admin analytics & KPI charts
β βββ Index/ # Home, sitemap, robots.txt & static page controllers
β βββ Order/ # Order processing, status updates & invoicing
β βββ Page/ # CMS system pages (About, Terms, Privacy)
β βββ Product/ # Products, categories, brands & attribute variants
β βββ Profile/ # Current user profile manager
β βββ Settings/ # Site-wide settings (SMTP, SEO, Pixels, Branding)
β βββ Slider/ # Homepage hero banners
β βββ Support/ # Base controllers, models, and shared traits
β βββ User/ # Admin user manager
βββ resources/ # Admin single page application source (Inertia + Vue)
βββ resources-site/ # Customer-facing storefront assets & views (Blade + CSS + Vue)
βββ routes/ # Fallback & local console routes
βββ tests/ # Global test bootstrap & TestCase
βββ vite.config.js # Vite compiler configuration
- PHP 8.4 or higher
- Composer
- Node.js 20+ & npm
- MySQL / MariaDB or SQLite database
-
Clone the Repository
git clone https://github.com/your-username/shopnow.git cd shopnow -
Install Composer & NPM Dependencies
composer install npm ci
-
Configure Environment
cp .env.example .env php artisan key:generate
Edit
.envand specify your database credentials (DB_DATABASE,DB_USERNAME, etc.). -
Run Migrations & Database Seeding
php artisan migrate --seed
-
Build Assets & Launch Development Server
# Compiles and serves assets via Vite + runs artisan dev servers concurrently composer run dev
ShopNow utilizes Laravel's task scheduler and queue system to handle asynchronous tasks such as sending customer order confirmation emails, administrative notifications, processing Meta Conversions API events, and periodic background maintenance.
To ensure these tasks run automatically on cPanel or shared hosting, configure a server Cron Job to execute Laravel's schedule:run command every minute.
- Log in to your cPanel Dashboard.
- Navigate to the Advanced section and click on Cron Jobs.
- Under Common Settings, select Once Per Minute (
* * * * *). - In the Command field, enter the following command (adjust paths for your server):
/usr/local/bin/php /home/your_username/public_html/artisan schedule:run >> /dev/null 2>&1π‘ Note: Replace
/home/your_username/public_htmlwith your actual project root path where theartisanfile is located.
Depending on your hosting provider and PHP version, use the specific PHP 8.4 binary path:
- cPanel EasyApache (ea-php):
/opt/cpanel/ea-php84/root/usr/bin/php /home/your_username/public_html/artisan schedule:run >> /dev/null 2>&1
- CloudLinux PHP Selector (alt-php):
/opt/alt/php84/usr/bin/php /home/your_username/public_html/artisan schedule:run >> /dev/null 2>&1
- Custom/Standard Path: Find your exact PHP path by running
which phpin the cPanel Terminal.
If your .env has QUEUE_CONNECTION=database and you want background jobs (like emails) to process automatically on shared hosting without a persistent daemon, add a second cron job running every minute:
/usr/local/bin/php /home/your_username/public_html/artisan queue:work --stop-when-empty >> /dev/null 2>&1ShopNow enforces high coding standards with integrated linting and automated tests:
# Run all Pest feature and unit tests
php artisan test --compact
# Auto-format PHP code according to PSR-12 conventions
vendor/bin/pint
# Run frontend ESLint and Prettier formatting checks
npm run lintShopNow is open-source software licensed under the MIT license.