# scayle-us/addon-demo-b2b architecture

> Architecture diagram of the GitHub repository scayle-us/addon-demo-b2b, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/scayle-us/addon-demo-b2b
- Repository: https://github.com/scayle-us/addon-demo-b2b

## Overview

This is a SCAYLE Panel Demo Add-on: a Vue application demonstrating panel pages and commerce-management workflows, not a complete commerce backend. Users navigate routed examples; the product-listing flow filters and paginates products, renders a table, and supports deletion. B2B examples include users, customers, business accounts, and price lists, with selected pages calling the admin API and business-account pages using browser storage. The product query and deletion use mock-product modules absent from the supplied tree; unsampled page behavior is represented conservatively, and edges show only documented or indexed relationships.

Main entry points: [`src/routes.ts`](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/routes.ts) (Route definitions), [`src/components/ProductsListing/ProductsListing.vue`](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/components/ProductsListing/ProductsListing.vue) (Product listing), [`src/pages/CustomerDetailPage.vue`](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/pages/CustomerDetailPage.vue) (Customer detail), [`src/components/Breadcrumbs/Breadcrumbs.vue`](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/components/Breadcrumbs/Breadcrumbs.vue) (Breadcrumbs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["Panel navigation"]
  node_router["Router<br/>[router.ts]"]
  node_route_definitions["Route definitions<br/>[routes.ts]"]
  node_demo_pages["Other demo pages"]
end

subgraph group_products["Product listing"]
  node_products_page["Products page<br/>[ProductsPage.vue]"]
  node_product_listing["Product listing"]
  node_listing_header["Listing header"]
  node_listing_body["Listing body"]
  node_product_query["Product query"]
  node_product_filters["Listing filters"]
  node_product_delete["Bulk deletion"]
  node_product_delete_one["Single deletion"]
  node_product_columns["Column templates"]
end

subgraph group_b2b["B2B management"]
  node_b2b_pages["B2B pages"]
  node_price_lists["Price lists<br/>[PriceListsPage.vue]"]
  node_customer_detail["Customer detail"]
  node_business_detail["Business account detail"]
  node_business_store[("Business account storage")]
end

subgraph group_shared["Shared services"]
  node_breadcrumbs["Breadcrumbs<br/>[Breadcrumbs.vue]"]
  node_api_facade["API configuration<br/>[index.ts]"]
  node_api_client["HTTP API client<br/>[client.ts]"]
end

node_panel_user(("Panel user"))
node_commerce_api{{"SCAYLE APIs"}}

node_panel_user -->|"navigates"| node_router
node_router -->|"loads routes"| node_route_definitions
node_route_definitions -->|"routes to"| node_demo_pages
node_route_definitions -->|"routes to"| node_products_page
node_route_definitions -->|"routes to"| node_b2b_pages
node_route_definitions -->|"routes to"| node_price_lists
node_route_definitions -->|"routes to"| node_customer_detail
node_route_definitions -->|"routes to"| node_business_detail
node_products_page -->|"renders"| node_breadcrumbs
node_products_page -->|"renders"| node_product_listing
node_product_listing -->|"renders"| node_listing_header
node_product_listing -->|"renders"| node_listing_body
node_product_listing -->|"configures"| node_product_columns
node_product_listing -->|"uses"| node_product_filters
node_product_listing -->|"queries"| node_product_query
node_product_listing -->|"deletes selected"| node_product_delete
node_product_delete_one -->|"delegates to"| node_product_delete
node_price_lists -->|"renders"| node_breadcrumbs
node_price_lists -->|"requests products"| node_api_facade
node_customer_detail -->|"renders"| node_breadcrumbs
node_customer_detail -->|"calls API"| node_api_facade
node_customer_detail -->|"uses"| node_business_store
node_business_detail -->|"renders"| node_breadcrumbs
node_business_detail -->|"uses"| node_business_store
node_api_facade -->|"creates clients"| node_api_client
node_api_client -->|"sends HTTP requests"| node_commerce_api

click node_router "https://github.com/scayle-us/addon-demo-b2b/blob/main/src/router.ts"
click node_route_definitions "https://github.com/scayle-us/addon-demo-b2b/blob/main/src/routes.ts"
click node_demo_pages "https://github.com/scayle-us/addon-demo-b2b/tree/main/src/pages"
click node_products_page "https://github.com/scayle-us/addon-demo-b2b/blob/main/src/components/ProductsListing/ProductsPage.vue"
click node_product_listing "https://github.com/scayle-us/addon-demo-b2b/blob/main/src/components/ProductsListing/ProductsListing.vue"
click node_listing_header "https://github.com/scayle-us/addon-demo-b2b/blob/main/src/components/ProductsListing/ProductsListingHeader/ProductsListingHeader.vue"
click node_listing_body "https://github.com/scayle-us/addon-demo-b2b/blob/main/src/components/ProductsListing/PrdocutsListingBody/ProductsListingBody.vue"
click node_product_query "https://github.com/scayle-us/addon-demo-b2b/blob/main/src/composables/useFetchProductsQuery.ts"
click node_product_filters "https://github.com/scayle-us/addon-demo-b2b/blob/main/src/composables/useProductListingFilters.ts"
click node_product_delete "https://github.com/scayle-us/addon-demo-b2b/blob/main/src/composables/useDeleteProductsMutation.ts"
click node_product_delete_one "https://github.com/scayle-us/addon-demo-b2b/blob/main/src/composables/useDeleteProductMutation.ts"
click node_product_columns "https://github.com/scayle-us/addon-demo-b2b/tree/main/src/components/ColumnTemplates"
click node_b2b_pages "https://github.com/scayle-us/addon-demo-b2b/tree/main/src/pages"
click node_price_lists "https://github.com/scayle-us/addon-demo-b2b/blob/main/src/pages/PriceListsPage.vue"
click node_customer_detail "https://github.com/scayle-us/addon-demo-b2b/blob/main/src/pages/CustomerDetailPage.vue"
click node_business_detail "https://github.com/scayle-us/addon-demo-b2b/blob/main/src/pages/BusinessAccountDetailPage.vue"
click node_business_store "https://github.com/scayle-us/addon-demo-b2b/blob/main/src/store/businessAccounts.ts"
click node_breadcrumbs "https://github.com/scayle-us/addon-demo-b2b/blob/main/src/components/Breadcrumbs/Breadcrumbs.vue"
click node_api_facade "https://github.com/scayle-us/addon-demo-b2b/blob/main/src/api/index.ts"
click node_api_client "https://github.com/scayle-us/addon-demo-b2b/blob/main/src/api/client.ts"

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_router,node_route_definitions,node_demo_pages,node_panel_user toneBlue
class node_products_page,node_product_listing,node_listing_header,node_listing_body,node_product_query,node_product_filters,node_product_delete,node_product_delete_one,node_product_columns toneAmber
class node_b2b_pages,node_price_lists,node_customer_detail,node_business_detail,node_business_store,node_commerce_api toneMint
class node_breadcrumbs,node_api_facade,node_api_client toneRose
```

## Components

### Panel navigation

- [Router](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/router.ts): `src/router.ts`
- [Route definitions](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/routes.ts): `src/routes.ts`
- [Other demo pages](https://github.com/scayle-us/addon-demo-b2b/tree/main/src/pages): `src/pages`

### Product listing

- [Products page](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/components/ProductsListing/ProductsPage.vue): `src/components/ProductsListing/ProductsPage.vue`
- [Product listing](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/components/ProductsListing/ProductsListing.vue): `src/components/ProductsListing/ProductsListing.vue`
- [Listing header](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/components/ProductsListing/ProductsListingHeader/ProductsListingHeader.vue): `src/components/ProductsListing/ProductsListingHeader/ProductsListingHeader.vue`
- [Listing body](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/components/ProductsListing/PrdocutsListingBody/ProductsListingBody.vue): `src/components/ProductsListing/PrdocutsListingBody/ProductsListingBody.vue`
- [Product query](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/composables/useFetchProductsQuery.ts): `src/composables/useFetchProductsQuery.ts`
- [Listing filters](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/composables/useProductListingFilters.ts): `src/composables/useProductListingFilters.ts`
- [Bulk deletion](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/composables/useDeleteProductsMutation.ts): `src/composables/useDeleteProductsMutation.ts`
- [Single deletion](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/composables/useDeleteProductMutation.ts): `src/composables/useDeleteProductMutation.ts`
- [Column templates](https://github.com/scayle-us/addon-demo-b2b/tree/main/src/components/ColumnTemplates): `src/components/ColumnTemplates`

### B2B management

- [B2B pages](https://github.com/scayle-us/addon-demo-b2b/tree/main/src/pages): `src/pages`
- [Price lists](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/pages/PriceListsPage.vue): `src/pages/PriceListsPage.vue`
- [Customer detail](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/pages/CustomerDetailPage.vue): `src/pages/CustomerDetailPage.vue`
- [Business account detail](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/pages/BusinessAccountDetailPage.vue): `src/pages/BusinessAccountDetailPage.vue`
- [Business account storage](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/store/businessAccounts.ts): `src/store/businessAccounts.ts`

### Shared services

- [Breadcrumbs](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/components/Breadcrumbs/Breadcrumbs.vue): `src/components/Breadcrumbs/Breadcrumbs.vue`
- [API configuration](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/api/index.ts): `src/api/index.ts`
- [HTTP API client](https://github.com/scayle-us/addon-demo-b2b/blob/main/src/api/client.ts): `src/api/client.ts`

### Other components

- **Panel user**
- **SCAYLE APIs**

## Connections

- Panel user → Router: navigates
- Router → Route definitions: loads routes (evidence: `src/router.ts`)
- Route definitions → Other demo pages: routes to (evidence: `src/routes.ts`)
- Route definitions → Products page: routes to (evidence: `src/routes.ts`)
- Route definitions → B2B pages: routes to (evidence: `src/routes.ts`)
- Route definitions → Price lists: routes to (evidence: `src/routes.ts`)
- Route definitions → Customer detail: routes to (evidence: `src/routes.ts`)
- Route definitions → Business account detail: routes to (evidence: `src/routes.ts`)
- Products page → Breadcrumbs: renders (evidence: `src/components/ProductsListing/ProductsPage.vue`)
- Products page → Product listing: renders (evidence: `src/components/ProductsListing/ProductsPage.vue`)
- Product listing → Listing header: renders (evidence: `src/components/ProductsListing/ProductsListing.vue`)
- Product listing → Listing body: renders (evidence: `src/components/ProductsListing/ProductsListing.vue`)
- Product listing → Column templates: configures (evidence: `src/components/ProductsListing/ProductsListing.vue`)
- Product listing → Listing filters: uses (evidence: `src/components/ProductsListing/ProductsListing.vue`)
- Product listing → Product query: queries (evidence: `src/components/ProductsListing/ProductsListing.vue`)
- Product listing → Bulk deletion: deletes selected (evidence: `src/components/ProductsListing/ProductsListing.vue`)
- Single deletion → Bulk deletion: delegates to (evidence: `src/composables/useDeleteProductMutation.ts`)
- Price lists → Breadcrumbs: renders (evidence: `src/pages/PriceListsPage.vue`)
- Price lists → API configuration: requests products (evidence: `src/pages/PriceListsPage.vue`)
- Customer detail → Breadcrumbs: renders (evidence: `src/pages/CustomerDetailPage.vue`)
- Customer detail → API configuration: calls API (evidence: `src/pages/CustomerDetailPage.vue`)
- Customer detail → Business account storage: uses (evidence: `src/pages/CustomerDetailPage.vue`)
- Business account detail → Breadcrumbs: renders (evidence: `src/pages/BusinessAccountDetailPage.vue`)
- Business account detail → Business account storage: uses (evidence: `src/pages/BusinessAccountDetailPage.vue`)
- API configuration → HTTP API client: creates clients (evidence: `src/api/index.ts`)
- HTTP API client → SCAYLE APIs: sends HTTP requests (evidence: `src/api/client.ts`)
