# ojsholly/laravel-ecommerce-cart architecture

> Architecture diagram of the GitHub repository ojsholly/laravel-ecommerce-cart, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ojsholly/laravel-ecommerce-cart
- Repository: https://github.com/ojsholly/laravel-ecommerce-cart

## Overview

This is a Laravel e-commerce application whose main customer journey is browsing products, managing a cart or wishlist, checking out, and reviewing orders. Its services implement cart, wishlist, pricing, and checkout rules over persistent models; the README also documents authentication, two-factor authentication, and operational email notifications. The graph includes those documented capabilities, but several UI-to-service connections are unverified because the corresponding Livewire implementations were not sampled; those links are dashed.

Main entry points: [`app/Services/WishlistService.php`](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Services/WishlistService.php) (Wishlist Service), [`app/Services/CheckoutService.php`](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Services/CheckoutService.php) (Checkout Service), [`app/Services/CartService.php`](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Services/CartService.php) (Cart Service), [`app/Jobs/SendDailySalesReport.php`](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Jobs/SendDailySalesReport.php) (Sales Report Job)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_catalog["Product Catalog<br/>[index.blade.php]"]
  node_product_detail["Product Details<br/>[show.blade.php]"]
  node_cart_ui["Cart UI<br/>[index.blade.php]"]
  node_checkout_ui["Checkout UI<br/>[index.blade.php]"]
  node_wishlist_ui["Wishlist UI<br/>[index.blade.php]"]
  node_orders_ui["Order History<br/>[index.blade.php]"]
end

subgraph group_commerce["Commerce Services"]
  node_cart_service["Cart Service<br/>[CartService.php]"]
  node_wishlist_service["Wishlist Service"]
  node_checkout_service["Checkout Service"]
  node_pricing["Price Calculation"]
  node_pricing_pipes["Pricing Pipes"]
end

subgraph group_records["Domain Records"]
  node_products[("Products<br/>[Product.php]")]
  node_cart_records[("Cart Records<br/>[Cart.php]")]
  node_wishlist_records[("Wishlist Records<br/>[Wishlist.php]")]
  node_order_records[("Orders and Items<br/>[Order.php]")]
  node_database[("Application Database<br/>[database.php]")]
end

subgraph group_accounts["Accounts"]
  node_auth_ui["Authentication UI<br/>[login.blade.php]"]
  node_registration["User Registration<br/>[CreateNewUser.php]"]
  node_user[("User Account<br/>[User.php]")]
end

subgraph group_operations["Operations"]
  node_scheduler["Daily Scheduler<br/>[app.php]"]
  node_report_command["Report Command"]
  node_sales_job["Sales Report Job"]
  node_sales_mail["Sales Report Mail"]
  node_stock_job["Low Stock Job"]
  node_stock_mail["Low Stock Mail"]
end

node_customer(("Customer"))

node_customer -->|"browses"| node_catalog
node_customer -->|"manages cart"| node_cart_ui
node_customer -->|"manages wishlist"| node_wishlist_ui
node_customer -->|"checks out"| node_checkout_ui
node_customer -->|"reviews orders"| node_orders_ui
node_customer -->|"authenticates"| node_auth_ui
node_catalog -.->|"uses cart"| node_cart_service
node_catalog -.->|"uses wishlist"| node_wishlist_service
node_cart_ui -->|"uses cart"| node_cart_service
node_cart_ui -->|"uses wishlist"| node_wishlist_service
node_checkout_ui -.->|"submits checkout"| node_checkout_service
node_wishlist_ui -.->|"uses wishlist"| node_wishlist_service
node_orders_ui -.->|"shows orders"| node_order_records
node_checkout_service -->|"calculates pricing"| node_pricing
node_pricing -->|"runs pipeline"| node_pricing_pipes
node_cart_service -->|"moves items"| node_wishlist_service
node_wishlist_service -->|"moves items"| node_cart_service
node_cart_service -->|"reads and writes"| node_cart_records
node_cart_service -->|"checks stock"| node_products
node_wishlist_service -->|"reads and writes"| node_wishlist_records
node_wishlist_service -->|"checks stock"| node_products
node_checkout_service -->|"reads cart"| node_cart_records
node_checkout_service -->|"validates stock"| node_products
node_checkout_service -->|"creates order"| node_order_records
node_checkout_service -->|"dispatches alert"| node_stock_job
node_cart_records -->|"persists"| node_database
node_wishlist_records -->|"persists"| node_database
node_order_records -->|"persists"| node_database
node_products -->|"persists"| node_database
node_auth_ui -.->|"registers"| node_registration
node_registration -->|"creates account"| node_user
node_scheduler -->|"schedules"| node_sales_job
node_report_command -->|"dispatches"| node_sales_job
node_sales_job -->|"queries sales"| node_order_records
node_sales_job -->|"sends report"| node_sales_mail
node_stock_job -->|"sends alert"| node_stock_mail

click node_catalog "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/resources/views/livewire/products/index.blade.php"
click node_product_detail "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/resources/views/livewire/products/show.blade.php"
click node_cart_ui "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/resources/views/livewire/cart/index.blade.php"
click node_checkout_ui "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/resources/views/livewire/checkout/index.blade.php"
click node_wishlist_ui "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/resources/views/livewire/wishlist/index.blade.php"
click node_orders_ui "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/resources/views/livewire/orders/index.blade.php"
click node_cart_service "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Services/CartService.php"
click node_wishlist_service "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Services/WishlistService.php"
click node_checkout_service "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Services/CheckoutService.php"
click node_pricing "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Services/PriceCalculationService.php"
click node_pricing_pipes "https://github.com/ojsholly/laravel-ecommerce-cart/tree/master/app/Services/Pricing"
click node_products "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Models/Product.php"
click node_cart_records "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Models/Cart.php"
click node_wishlist_records "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Models/Wishlist.php"
click node_order_records "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Models/Order.php"
click node_database "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/config/database.php"
click node_auth_ui "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/resources/views/livewire/auth/login.blade.php"
click node_registration "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Actions/Fortify/CreateNewUser.php"
click node_user "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Models/User.php"
click node_scheduler "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/bootstrap/app.php"
click node_report_command "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Console/Commands/SendDailySalesReportCommand.php"
click node_sales_job "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Jobs/SendDailySalesReport.php"
click node_sales_mail "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Mail/DailySalesReport.php"
click node_stock_job "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Jobs/SendLowStockNotification.php"
click node_stock_mail "https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Mail/LowStockNotification.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_catalog,node_product_detail,node_cart_ui,node_checkout_ui,node_wishlist_ui,node_orders_ui toneBlue
class node_cart_service,node_wishlist_service,node_checkout_service,node_pricing,node_pricing_pipes toneAmber
class node_products,node_cart_records,node_wishlist_records,node_order_records,node_database toneMint
class node_auth_ui,node_registration,node_user toneRose
class node_scheduler,node_report_command,node_sales_job,node_sales_mail,node_stock_job,node_stock_mail,node_customer toneIndigo
```

## Components

### Storefront

- [Product Catalog](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/resources/views/livewire/products/index.blade.php): `resources/views/livewire/products/index.blade.php`
- [Product Details](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/resources/views/livewire/products/show.blade.php): `resources/views/livewire/products/show.blade.php`
- [Cart UI](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/resources/views/livewire/cart/index.blade.php): `resources/views/livewire/cart/index.blade.php`
- [Checkout UI](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/resources/views/livewire/checkout/index.blade.php): `resources/views/livewire/checkout/index.blade.php`
- [Wishlist UI](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/resources/views/livewire/wishlist/index.blade.php): `resources/views/livewire/wishlist/index.blade.php`
- [Order History](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/resources/views/livewire/orders/index.blade.php): `resources/views/livewire/orders/index.blade.php`

### Commerce Services

- [Cart Service](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Services/CartService.php): `app/Services/CartService.php`
- [Wishlist Service](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Services/WishlistService.php): `app/Services/WishlistService.php`
- [Checkout Service](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Services/CheckoutService.php): `app/Services/CheckoutService.php`
- [Price Calculation](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Services/PriceCalculationService.php): `app/Services/PriceCalculationService.php`
- [Pricing Pipes](https://github.com/ojsholly/laravel-ecommerce-cart/tree/master/app/Services/Pricing): `app/Services/Pricing`

### Domain Records

- [Products](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Models/Product.php): `app/Models/Product.php`
- [Cart Records](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Models/Cart.php): `app/Models/Cart.php`
- [Wishlist Records](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Models/Wishlist.php): `app/Models/Wishlist.php`
- [Orders and Items](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Models/Order.php): `app/Models/Order.php`
- [Application Database](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/config/database.php): `config/database.php`

### Accounts

- [Authentication UI](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/resources/views/livewire/auth/login.blade.php): `resources/views/livewire/auth/login.blade.php`
- [User Registration](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Actions/Fortify/CreateNewUser.php): `app/Actions/Fortify/CreateNewUser.php`
- [User Account](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Models/User.php): `app/Models/User.php`

### Operations

- [Daily Scheduler](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/bootstrap/app.php): `bootstrap/app.php`
- [Report Command](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Console/Commands/SendDailySalesReportCommand.php): `app/Console/Commands/SendDailySalesReportCommand.php`
- [Sales Report Job](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Jobs/SendDailySalesReport.php): `app/Jobs/SendDailySalesReport.php`
- [Sales Report Mail](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Mail/DailySalesReport.php): `app/Mail/DailySalesReport.php`
- [Low Stock Job](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Jobs/SendLowStockNotification.php): `app/Jobs/SendLowStockNotification.php`
- [Low Stock Mail](https://github.com/ojsholly/laravel-ecommerce-cart/blob/master/app/Mail/LowStockNotification.php): `app/Mail/LowStockNotification.php`

### Other components

- **Customer**

## Connections

- Customer → Product Catalog: browses (evidence: `README.md`)
- Customer → Cart UI: manages cart (evidence: `README.md`)
- Customer → Wishlist UI: manages wishlist (evidence: `README.md`)
- Customer → Checkout UI: checks out (evidence: `README.md`)
- Customer → Order History: reviews orders (evidence: `README.md`)
- Customer → Authentication UI: authenticates (evidence: `README.md`)
- Product Catalog → Cart Service: uses cart (evidence: `resources/views/livewire/products/index.blade.php`)
- Product Catalog → Wishlist Service: uses wishlist (evidence: `resources/views/livewire/products/index.blade.php`)
- Cart UI → Cart Service: uses cart (evidence: `resources/views/livewire/cart/index.blade.php`)
- Cart UI → Wishlist Service: uses wishlist (evidence: `resources/views/livewire/cart/index.blade.php`)
- Checkout UI → Checkout Service: submits checkout
- Wishlist UI → Wishlist Service: uses wishlist
- Order History → Orders and Items: shows orders
- Checkout Service → Price Calculation: calculates pricing (evidence: `app/Services/CheckoutService.php`)
- Price Calculation → Pricing Pipes: runs pipeline (evidence: `app/Services/PriceCalculationService.php`)
- Cart Service → Wishlist Service: moves items (evidence: `app/Services/CartService.php`)
- Wishlist Service → Cart Service: moves items (evidence: `app/Services/WishlistService.php`)
- Cart Service → Cart Records: reads and writes (evidence: `app/Services/CartService.php`)
- Cart Service → Products: checks stock (evidence: `app/Services/CartService.php`)
- Wishlist Service → Wishlist Records: reads and writes (evidence: `app/Services/WishlistService.php`)
- Wishlist Service → Products: checks stock (evidence: `app/Services/WishlistService.php`)
- Checkout Service → Cart Records: reads cart (evidence: `app/Services/CheckoutService.php`)
- Checkout Service → Products: validates stock (evidence: `app/Services/CheckoutService.php`)
- Checkout Service → Orders and Items: creates order (evidence: `app/Services/CheckoutService.php`)
- Checkout Service → Low Stock Job: dispatches alert (evidence: `app/Services/CheckoutService.php`)
- Cart Records → Application Database: persists (evidence: `app/Models/Cart.php`)
- Wishlist Records → Application Database: persists (evidence: `app/Models/Wishlist.php`)
- Orders and Items → Application Database: persists (evidence: `app/Models/Order.php`)
- Products → Application Database: persists (evidence: `app/Models/Product.php`)
- Authentication UI → User Registration: registers
- User Registration → User Account: creates account (evidence: `app/Actions/Fortify/CreateNewUser.php`)
- Daily Scheduler → Sales Report Job: schedules (evidence: `bootstrap/app.php`)
- Report Command → Sales Report Job: dispatches (evidence: `app/Console/Commands/SendDailySalesReportCommand.php`)
- Sales Report Job → Orders and Items: queries sales (evidence: `app/Jobs/SendDailySalesReport.php`)
- Sales Report Job → Sales Report Mail: sends report (evidence: `app/Jobs/SendDailySalesReport.php`)
- Low Stock Job → Low Stock Mail: sends alert (evidence: `app/Jobs/SendLowStockNotification.php`)
