How youssefelkhafif/morroco_shop works
This is a Laravel/Inertia storefront and commerce back office. Shoppers browse products, build a session cart, and submit a cash-on-delivery checkout; staff manage catalog content and progress orders through fulfillment. The map includes the product/order domain and admin capabilities listed in the tree. The README is empty, so coverage and relationships rely on the source index and excerpts; unsampled controllers and routes are represented only where their role is evident, without inferred call chains.
Main entry points: CheckoutController.php Checkout · OrderService.php Order lifecycle · OrderController.php Order operations · Product.php Products and taxonomy
Components 23
Shopper storefront
- Browse catalog
app/Http/Controllers/Shop/ProductController.php - Home and collections
app/Http/Controllers/Shop - Session cart
app/Services/Shop/CartService.php - Checkout
app/Http/Controllers/Shop/CheckoutController.php - Storefront pages
resources/js/pages/shop
Commerce operations
- Catalog management
app/Http/Controllers/Admin/ProductController.php - Order operations
app/Http/Controllers/Admin/OrderController.php - Store configuration
app/Http/Controllers/Admin - Admin pages
resources/js/pages/admin - Product images
app/Services/ProductImageService.php
Commerce domain
- Products and taxonomy
app/Models/Product.php - Orders and line items
app/Models/Order.php - Delivery zones
app/Models/DeliveryZone.php - Order lifecycle
app/Services/Orders/OrderService.php - Order confirmation notice
app/Notifications/OrderConfirmedNotification.php - WhatsApp notifications
app/Services/Orders/WhatsAppNotificationService.php
Web platform
- Laravel request entry
public/index.php - Web middleware
app/Http/Middleware/HandleInertiaRequests.php - Inertia frontend shell
resources/js/app.jsx - Session store
Other components
- Shopper
- Store staff
- Meta conversion API
Connections 29
- Shopper → Laravel request entry: requests pages
- Laravel request entry → Web middleware: applies middleware
- Web middleware → Inertia frontend shell: shares page data
- Browse catalog → Products and taxonomy: queries products
app/Http/Controllers/Shop/ProductController.php - Home and collections → Storefront pages: renders pages
- Browse catalog → Session cart: updates cart
app/Http/Controllers/Shop/ProductController.php - Session cart → Products and taxonomy: loads products
app/Services/Shop/CartService.php - Session cart → Session store: stores cart
app/Services/Shop/CartService.php - Checkout → Session cart: summarizes cart
app/Http/Controllers/Shop/CheckoutController.php - Checkout → Delivery zones: loads active zones
app/Http/Controllers/Shop/CheckoutController.php - Checkout → Order lifecycle: creates order
app/Http/Controllers/Shop/CheckoutController.php - Checkout → Meta conversion API: sends purchase event
app/Http/Controllers/Shop/CheckoutController.php - Checkout → Storefront pages: renders checkout
app/Http/Controllers/Shop/CheckoutController.php - Shopper → Checkout: submits checkout
- Store staff → Catalog management: manages catalog
- Catalog management → Products and taxonomy: creates and updates
app/Http/Controllers/Admin/ProductController.php - Catalog management → Product images: manages images
app/Http/Controllers/Admin/ProductController.php - Product images → Products and taxonomy: persists image records
app/Services/ProductImageService.php - Catalog management → Admin pages: renders product pages
app/Http/Controllers/Admin/ProductController.php - Store configuration → Admin pages: renders admin pages
- Store staff → Order operations: manages fulfillment
- Order operations → Orders and line items: loads order details
app/Http/Controllers/Admin/OrderController.php - Order operations → Order lifecycle: changes order state
app/Http/Controllers/Admin/OrderController.php - Order operations → Admin pages: renders order pages
app/Http/Controllers/Admin/OrderController.php - Order lifecycle → Products and taxonomy: checks stock
app/Services/Orders/OrderService.php - Order lifecycle → Orders and line items: creates and transitions
app/Services/Orders/OrderService.php - Order lifecycle → Delivery zones: uses delivery zone
app/Services/Orders/OrderService.php - Order lifecycle → Order confirmation notice: notifies customer
app/Services/Orders/OrderService.php - Order operations → WhatsApp notifications: triggers messaging