Skip to content

Repository files navigation

Sodai

Sodai — Single Vendor E-Commerce Platform

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.

Laravel PHP Bootstrap Vite CI


About Sodai

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.

Key Features

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 Setting model
  • 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

Tech Stack

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

Getting Started

git clone https://github.com/yenHunter/Sodai.git
cd sodai
composer run setup   # installs deps, copies .env, generates key, migrates, builds assets

Or step by step:

composer install
cp .env.example .env
php artisan key:generate
npm install && npm run build
php artisan migrate --seed

Run the dev environment (server + queue listener + logs + Vite, all at once):

composer run dev

Default seeded accounts (see database/seeders/AdminSeeder.php / CustomerSeeder.php for current values — change these before any shared/public deployment).

Running Tests

composer test
# or target a suite
php artisan test --filter=ProductModuleTest

Project Structure Highlights

app/
├── 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

Roadmap

See .github/project-instructions.md for the full, up-to-date backlog. Near-term priorities:

  1. Wire the storefront views to real catalog/cart/order data
  2. Payment gateway integration
  3. Transactional customer emails (order confirmation, shipment updates)
  4. Admin dashboard KPIs
  5. CMS static page content (privacy policy, terms, shipping/refund policy)

Connect & Support

LinkedIn Buy Me a Coffee Fork me on GitHub

Contributing

This is currently a solo portfolio project, but the contribution guide documents the branching strategy and coding standards used, in case that changes.

License

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.

About

Single vendor e-commerce

Topics

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages