# divineninja/marketplace-dashboard architecture

> Architecture diagram of the GitHub repository divineninja/marketplace-dashboard, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/divineninja/marketplace-dashboard
- Repository: https://github.com/divineninja/marketplace-dashboard

## Overview

This Laravel application provides a business marketplace and inventory/order system. Customers browse and filter products, manage profiles, and place orders; business users manage inventory and review orders through dashboard APIs. The route provider loads separate client and inventory route sets, whose controllers own the request handling. The sampled code shows order and product models, profile registration, and portions of order processing; payment, shipping, reviews, subscriptions, and other documented-by-routes capabilities are included where the route declarations establish them. Uninspected implementations and external service connections are not inferred.

Main entry points: [`routes/ClientApi/Routes.php`](https://github.com/divineninja/marketplace-dashboard/blob/master/routes/ClientApi/Routes.php) (Client API Routes), [`app/Http/Controllers/InventoryClient/OrdersController.php`](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/InventoryClient/OrdersController.php) (Order Processing), [`routes/InventoryClient/Routes.php`](https://github.com/divineninja/marketplace-dashboard/blob/master/routes/InventoryClient/Routes.php) (Inventory Routes), [`app/Http/Controllers/ClientApi/ClientProductController.php`](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/ClientApi/ClientProductController.php) (Product Browse and Filters)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_marketplace["Marketplace"]
  node_product_browse["Product Browse and Filters"]
  node_product_api["Product Management"]
  node_variants[("Product Variants<br/>[ProductVariant.php]")]
  node_reviews["Product Reviews"]
end

subgraph group_commerce["Orders and Payments"]
  node_orders_controller["Order Processing"]
  node_order_resource["Order Response<br/>[OrderResource.php]"]
  node_square_trait["Square Payment Logic<br/>[SquareupTrait.php]"]
  node_payment_api["Payment Management"]
  node_shipping_api["Shipping Management"]
  node_subscription["Square Subscriptions"]
end

subgraph group_accounts["Accounts and Admin"]
  node_profile["Customer Profile"]
  node_dashboard["Admin Dashboard"]
end

subgraph group_runtime["Routing and Data"]
  node_client_routes["Client API Routes<br/>[Routes.php]"]
  node_inventory_routes["Inventory Routes<br/>[Routes.php]"]
  node_route_provider["Route Provider"]
  node_product_store[("Products<br/>[Product.php]")]
  node_product_details[("Product Details<br/>[Productdetails.php]")]
  node_orders_store[("Orders<br/>[Order.php]")]
  node_order_products[("Order Items<br/>[OrderProduct.php]")]
  node_payment_store[("Payments<br/>[Payment.php]")]
  node_shipping_store[("Shipping Records<br/>[Shipping.php]")]
  node_user_store[("Users<br/>[User.php]")]
end

node_customer(("Customer"))
node_business_user(("Business User"))

node_route_provider -->|"loads routes"| node_client_routes
node_route_provider -->|"loads routes"| node_inventory_routes
node_client_routes -->|"routes requests"| node_product_browse
node_client_routes -->|"routes registration"| node_profile
node_client_routes -->|"routes payments"| node_payment_api
node_client_routes -->|"routes shipping"| node_shipping_api
node_client_routes -->|"routes dashboard"| node_dashboard
node_inventory_routes -->|"routes order actions"| node_orders_controller
node_inventory_routes -->|"routes product actions"| node_product_api
node_inventory_routes -->|"routes payments"| node_payment_api
node_inventory_routes -->|"routes subscriptions"| node_subscription
node_customer -->|"uses storefront API"| node_client_routes
node_business_user -->|"uses inventory API"| node_inventory_routes
node_product_browse -->|"queries products"| node_product_store
node_product_browse -->|"queries filter details"| node_product_details
node_product_api -->|"manages products"| node_product_store
node_orders_controller -->|"loads orders"| node_orders_store
node_orders_controller -->|"loads order items"| node_order_products
node_orders_controller -->|"loads variants"| node_variants
node_orders_controller -->|"delegates payment"| node_square_trait
node_orders_controller -->|"formats orders"| node_order_resource
node_order_resource -->|"serializes order"| node_orders_store
node_payment_api -.->|"manages payments"| node_payment_store
node_shipping_api -.->|"manages shipping"| node_shipping_store
node_profile -->|"creates customers"| node_user_store
node_profile -->|"loads order history"| node_orders_store
node_reviews -.->|"reviews product data"| node_product_store

click node_client_routes "https://github.com/divineninja/marketplace-dashboard/blob/master/routes/ClientApi/Routes.php"
click node_inventory_routes "https://github.com/divineninja/marketplace-dashboard/blob/master/routes/InventoryClient/Routes.php"
click node_route_provider "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Providers/RouteServiceProvider.php"
click node_product_browse "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/ClientApi/ClientProductController.php"
click node_product_api "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/InventoryClient/ProductController.php"
click node_product_store "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Models/InventoryClient/Product.php"
click node_product_details "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Models/InventoryClient/Productdetails.php"
click node_variants "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Models/InventoryClient/ProductVariant.php"
click node_orders_controller "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/InventoryClient/OrdersController.php"
click node_orders_store "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Models/InventoryClient/Order.php"
click node_order_products "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Models/InventoryClient/OrderProduct.php"
click node_order_resource "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Resources/OrderResource.php"
click node_square_trait "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Traits/SquareupTrait.php"
click node_payment_api "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/InventoryClient/PaymentController.php"
click node_payment_store "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Models/InventoryClient/Payment.php"
click node_shipping_api "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/ClientApi/ShippingController.php"
click node_shipping_store "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Models/InventoryClient/Shipping.php"
click node_profile "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/InventoryClient/Client/ProfileController.php"
click node_user_store "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Models/User.php"
click node_dashboard "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/Dashboard/AdminDashboardController.php"
click node_reviews "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/ReviewsController.php"
click node_subscription "https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/InventoryClient/SquareSubscriptionController.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_product_browse,node_product_api,node_variants,node_reviews,node_business_user toneBlue
class node_orders_controller,node_order_resource,node_square_trait,node_payment_api,node_shipping_api,node_subscription toneAmber
class node_profile,node_dashboard toneMint
class node_client_routes,node_inventory_routes,node_route_provider,node_product_store,node_product_details,node_orders_store,node_order_products,node_payment_store,node_shipping_store,node_user_store toneRose
class node_customer toneIndigo
```

## Components

### Marketplace

- [Product Browse and Filters](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/ClientApi/ClientProductController.php): `app/Http/Controllers/ClientApi/ClientProductController.php`
- [Product Management](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/InventoryClient/ProductController.php): `app/Http/Controllers/InventoryClient/ProductController.php`
- [Product Variants](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Models/InventoryClient/ProductVariant.php): `app/Models/InventoryClient/ProductVariant.php`
- [Product Reviews](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/ReviewsController.php): `app/Http/Controllers/ReviewsController.php`

### Orders and Payments

- [Order Processing](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/InventoryClient/OrdersController.php): `app/Http/Controllers/InventoryClient/OrdersController.php`
- [Order Response](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Resources/OrderResource.php): `app/Http/Resources/OrderResource.php`
- [Square Payment Logic](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Traits/SquareupTrait.php): `app/Http/Traits/SquareupTrait.php`
- [Payment Management](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/InventoryClient/PaymentController.php): `app/Http/Controllers/InventoryClient/PaymentController.php`
- [Shipping Management](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/ClientApi/ShippingController.php): `app/Http/Controllers/ClientApi/ShippingController.php`
- [Square Subscriptions](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/InventoryClient/SquareSubscriptionController.php): `app/Http/Controllers/InventoryClient/SquareSubscriptionController.php`

### Accounts and Admin

- [Customer Profile](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/InventoryClient/Client/ProfileController.php): `app/Http/Controllers/InventoryClient/Client/ProfileController.php`
- [Admin Dashboard](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Http/Controllers/Dashboard/AdminDashboardController.php): `app/Http/Controllers/Dashboard/AdminDashboardController.php`

### Routing and Data

- [Client API Routes](https://github.com/divineninja/marketplace-dashboard/blob/master/routes/ClientApi/Routes.php): `routes/ClientApi/Routes.php`
- [Inventory Routes](https://github.com/divineninja/marketplace-dashboard/blob/master/routes/InventoryClient/Routes.php): `routes/InventoryClient/Routes.php`
- [Route Provider](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Providers/RouteServiceProvider.php): `app/Providers/RouteServiceProvider.php`
- [Products](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Models/InventoryClient/Product.php): `app/Models/InventoryClient/Product.php`
- [Product Details](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Models/InventoryClient/Productdetails.php): `app/Models/InventoryClient/Productdetails.php`
- [Orders](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Models/InventoryClient/Order.php): `app/Models/InventoryClient/Order.php`
- [Order Items](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Models/InventoryClient/OrderProduct.php): `app/Models/InventoryClient/OrderProduct.php`
- [Payments](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Models/InventoryClient/Payment.php): `app/Models/InventoryClient/Payment.php`
- [Shipping Records](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Models/InventoryClient/Shipping.php): `app/Models/InventoryClient/Shipping.php`
- [Users](https://github.com/divineninja/marketplace-dashboard/blob/master/app/Models/User.php): `app/Models/User.php`

### Other components

- **Customer**
- **Business User**

## Connections

- Route Provider → Client API Routes: loads routes (evidence: `app/Providers/RouteServiceProvider.php`)
- Route Provider → Inventory Routes: loads routes (evidence: `app/Providers/RouteServiceProvider.php`)
- Client API Routes → Product Browse and Filters: routes requests (evidence: `routes/ClientApi/Routes.php`)
- Client API Routes → Customer Profile: routes registration (evidence: `routes/ClientApi/Routes.php`)
- Client API Routes → Payment Management: routes payments (evidence: `routes/ClientApi/Routes.php`)
- Client API Routes → Shipping Management: routes shipping (evidence: `routes/ClientApi/Routes.php`)
- Client API Routes → Admin Dashboard: routes dashboard (evidence: `routes/ClientApi/Routes.php`)
- Inventory Routes → Order Processing: routes order actions (evidence: `routes/InventoryClient/Routes.php`)
- Inventory Routes → Product Management: routes product actions (evidence: `routes/InventoryClient/Routes.php`)
- Inventory Routes → Payment Management: routes payments (evidence: `routes/InventoryClient/Routes.php`)
- Inventory Routes → Square Subscriptions: routes subscriptions (evidence: `routes/InventoryClient/Routes.php`)
- Customer → Client API Routes: uses storefront API (evidence: `routes/ClientApi/Routes.php`)
- Business User → Inventory Routes: uses inventory API (evidence: `routes/InventoryClient/Routes.php`)
- Product Browse and Filters → Products: queries products (evidence: `app/Http/Controllers/ClientApi/ClientProductController.php`)
- Product Browse and Filters → Product Details: queries filter details (evidence: `app/Http/Controllers/ClientApi/ClientProductController.php`)
- Product Management → Products: manages products (evidence: `app/Http/Controllers/InventoryClient/ProductController.php`)
- Order Processing → Orders: loads orders (evidence: `app/Http/Controllers/InventoryClient/OrdersController.php`)
- Order Processing → Order Items: loads order items (evidence: `app/Http/Controllers/InventoryClient/OrdersController.php`)
- Order Processing → Product Variants: loads variants (evidence: `app/Http/Controllers/InventoryClient/OrdersController.php`)
- Order Processing → Square Payment Logic: delegates payment (evidence: `app/Http/Controllers/InventoryClient/OrdersController.php`)
- Order Processing → Order Response: formats orders (evidence: `app/Http/Controllers/InventoryClient/OrdersController.php`)
- Order Response → Orders: serializes order (evidence: `app/Http/Resources/OrderResource.php`)
- Payment Management → Payments: manages payments
- Shipping Management → Shipping Records: manages shipping
- Customer Profile → Users: creates customers (evidence: `app/Http/Controllers/InventoryClient/Client/ProfileController.php`)
- Customer Profile → Orders: loads order history (evidence: `app/Http/Controllers/InventoryClient/Client/ProfileController.php`)
- Product Reviews → Products: reviews product data
