A full-featured, admin-first e-commerce application built with Laravel 13. Developed as a portfolio project to demonstrate real-world backend architecture, role-based access control, variant-based product modeling, and test-driven development.
Sodai is a single-vendor e-commerce platform with a completely separated admin panel and customer storefront, each with its own authentication guard. The project is currently admin-first: the admin panel is feature-complete for core catalog and order operations, while the customer-facing storefront is next on the roadmap.
This is a learning and portfolio project — it is not deployed to production, and some
areas (payment gateway, transactional customer emails, storefront UI) are intentionally
incomplete. See .github/project-instructions.md for a
detailed, continuously-updated breakdown of what's built vs. what's planned.
Admin Panel
- Role-based access control (Spatie Permission) with 5 seeded roles and granular permissions
- Product catalog with variant support (Color/Size/Weight/custom options), auto-generated SKUs, image galleries scoped per-variant or shared, related products, tags
- Category (2-level) and Brand management
- Order management with a POS-style builder: live AJAX shipping/tax/coupon calculation, editable overrides, full status-history audit trail
- Coupon engine (percentage/fixed, usage limits, validity windows)
- Refund workflow, independent from order cancellation, with approval/rejection
- Product review moderation with automatic rating recalculation
- Abandoned cart visibility + customer reminder emails
- CMS banners (position + scheduling based)
- A 10-group Settings module (company, design, shipping, payment, inventory, invoice,
order rules, tax, notifications, marketing/SEO/social) — all backed by a generic,
cached key-value
Settingmodel - reCAPTCHA v3 + rate limiting on all authentication surfaces (admin and customer)
Engineering practices
- Thin controllers, business logic in a dedicated Service layer
- ~15 PHPUnit Feature test suites covering permissions, validation edge cases, and business rules (e.g. stock locking on order creation, coupon eligibility, refund balances)
- Consistent Form Request validation, soft deletes on core models, security headers + CSP
| Layer | Technology |
|---|---|
| Backend | Laravel 13.17, PHP 8.3 |
| Database | SQLite (dev), MySQL-ready |
| Authorization | Spatie Laravel Permission |
| Image processing | Intervention Image v4 (WebP conversion) |
| Frontend | Blade, Bootstrap 5.3 (UBold admin theme), Vite |
| Testing | PHPUnit 12 |
git clone https://github.com/yenHunter/Sodai.git
cd sodai
composer run setup # installs deps, copies .env, generates key, migrates, builds assetsOr step by step:
composer install
cp .env.example .env
php artisan key:generate
npm install && npm run build
php artisan migrate --seedRun the dev environment (server + queue listener + logs + Vite, all at once):
composer run devDefault seeded accounts (see database/seeders/AdminSeeder.php / CustomerSeeder.php
for current values — change these before any shared/public deployment).
composer test
# or target a suite
php artisan test --filter=ProductModuleTestapp/
├── Http/Controllers/Admin/ # Thin admin controllers
├── Http/Controllers/Visitor/ # Customer-facing controllers
├── Services/Admin/ # Admin business logic
├── Services/Visitor/ # Customer-facing business logic
├── Models/ # Eloquent models (variant-based product graph)
routes/
├── admin.php # Prefixed /admin, permission-gated
├── visitor.php # Customer routes
├── web.php # Public + legacy template demo routes
tests/Feature/ # Module-level test suites
See .github/project-instructions.md for the full,
up-to-date backlog. Near-term priorities:
- Wire the storefront views to real catalog/cart/order data
- Payment gateway integration
- Transactional customer emails (order confirmation, shipment updates)
- Admin dashboard KPIs
- CMS static page content (privacy policy, terms, shipping/refund policy)
This is currently a solo portfolio project, but the contribution guide documents the branching strategy and coding standards used, in case that changes.
This project is built on the Laravel framework, which is open-sourced under the MIT license. Application-specific code follows the same license unless noted otherwise.
