# virtocommerce/vc-frontend architecture

> Architecture diagram of the GitHub repository virtocommerce/vc-frontend, 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/virtocommerce/vc-frontend
- Repository: https://github.com/virtocommerce/vc-frontend

## Overview

Virto Commerce Frontend is a Vue single-page commerce application for B2B and B2C storefronts. A shopper enters through the application router, browses catalog/search results, manages a cart, and proceeds through checkout; account, organization, and order workflows support the broader commerce experience. Sales-representative tools add customer, order, document, and task views, while customer reviews and page-builder preview extend the storefront. The graph reflects documented routing and sampled composable/API calls; unsampled domain links are omitted rather than inferred as confirmed calls.

Main entry points: [`client-app/router/routes/main.ts`](https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/router/routes/main.ts) (Route registry), [`client-app/modules/sales-rep/composables/useSalesRepHubQuery.ts`](https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/modules/sales-rep/composables/useSalesRepHubQuery.ts) (Hub query helper), [`client-app/modules/customer-reviews/useCustomerReviews.ts`](https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/modules/customer-reviews/useCustomerReviews.ts) (Customer reviews), [`client-app/core/api/graphql/client.ts`](https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/core/api/graphql/client.ts) (GraphQL API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application shell"]
  node_app["Application shell<br/>[App.vue]"]
  node_router["Route registry<br/>[main.ts]"]
  node_graphql["GraphQL API<br/>[client.ts]"]
end

subgraph group_commerce["Commerce domains"]
  node_catalog["Catalog and search"]
  node_cart["Cart"]
  node_checkout["Checkout<br/>[review.vue]"]
  node_account["Accounts"]
  node_orders["Orders"]
  node_organizations["Organizations"]
  node_fulfillment["Fulfillment centers"]
end

subgraph group_sales["Sales representative"]
  node_salesroutes["Sales rep routes<br/>[routes.ts]"]
  node_salestasks["Sales rep tasks"]
  node_hubquery["Hub query helper"]
end

subgraph group_extensions["Storefront extensions"]
  node_reviews["Customer reviews"]
  node_preview["Builder preview"]
  node_reviewsapi["Reviews GraphQL operations<br/>[index.ts]"]
end

node_shopper(("Shopper"))

node_shopper -.->|"navigates"| node_router
node_router -.->|"renders routes"| node_app
node_router -->|"mounts routes"| node_salesroutes
node_shopper -.->|"browses"| node_catalog
node_shopper -.->|"manages cart"| node_cart
node_shopper -.->|"checks out"| node_checkout
node_shopper -.->|"manages account"| node_account
node_shopper -.->|"views orders"| node_orders
node_shopper -.->|"manages organization"| node_organizations
node_fulfillment -->|"requests data"| node_graphql
node_salestasks -->|"queries tasks"| node_hubquery
node_hubquery -->|"executes query"| node_graphql
node_reviews -->|"calls operations"| node_reviewsapi
node_shopper -.->|"submits feedback"| node_reviews

click node_app "https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/App.vue"
click node_router "https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/router/routes/main.ts"
click node_graphql "https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/core/api/graphql/client.ts"
click node_catalog "https://github.com/virtocommerce/vc-frontend/tree/dev/client-app/core/api/graphql/catalog"
click node_cart "https://github.com/virtocommerce/vc-frontend/tree/dev/client-app/core/api/graphql/cart"
click node_checkout "https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/pages/checkout/review.vue"
click node_account "https://github.com/virtocommerce/vc-frontend/tree/dev/client-app/core/api/graphql/account"
click node_orders "https://github.com/virtocommerce/vc-frontend/tree/dev/client-app/core/api/graphql/orders"
click node_organizations "https://github.com/virtocommerce/vc-frontend/tree/dev/client-app/core/api/graphql/organization"
click node_fulfillment "https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/shared/fulfillmentCenters/composables/useFulfillmentCenters.ts"
click node_salesroutes "https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/modules/sales-rep/routes.ts"
click node_salestasks "https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/modules/sales-rep/composables/useSalesRepTasks.ts"
click node_hubquery "https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/modules/sales-rep/composables/useSalesRepHubQuery.ts"
click node_reviews "https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/modules/customer-reviews/useCustomerReviews.ts"
click node_preview "https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/plugins/builder-preview/builder-preview.plugin.ts"
click node_reviewsapi "https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/modules/customer-reviews/api/graphql/index.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_app,node_router,node_graphql toneBlue
class node_catalog,node_cart,node_checkout,node_account,node_orders,node_organizations,node_fulfillment toneAmber
class node_salesroutes,node_salestasks,node_hubquery toneMint
class node_reviews,node_preview,node_reviewsapi toneRose
class node_shopper toneIndigo
```

## Components

### Application shell

- [Application shell](https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/App.vue): `client-app/App.vue`
- [Route registry](https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/router/routes/main.ts): `client-app/router/routes/main.ts`
- [GraphQL API](https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/core/api/graphql/client.ts): `client-app/core/api/graphql/client.ts`

### Commerce domains

- [Catalog and search](https://github.com/virtocommerce/vc-frontend/tree/dev/client-app/core/api/graphql/catalog): `client-app/core/api/graphql/catalog`
- [Cart](https://github.com/virtocommerce/vc-frontend/tree/dev/client-app/core/api/graphql/cart): `client-app/core/api/graphql/cart`
- [Checkout](https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/pages/checkout/review.vue): `client-app/pages/checkout/review.vue`
- [Accounts](https://github.com/virtocommerce/vc-frontend/tree/dev/client-app/core/api/graphql/account): `client-app/core/api/graphql/account`
- [Orders](https://github.com/virtocommerce/vc-frontend/tree/dev/client-app/core/api/graphql/orders): `client-app/core/api/graphql/orders`
- [Organizations](https://github.com/virtocommerce/vc-frontend/tree/dev/client-app/core/api/graphql/organization): `client-app/core/api/graphql/organization`
- [Fulfillment centers](https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/shared/fulfillmentCenters/composables/useFulfillmentCenters.ts): `client-app/shared/fulfillmentCenters/composables/useFulfillmentCenters.ts`

### Sales representative

- [Sales rep routes](https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/modules/sales-rep/routes.ts): `client-app/modules/sales-rep/routes.ts`
- [Sales rep tasks](https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/modules/sales-rep/composables/useSalesRepTasks.ts): `client-app/modules/sales-rep/composables/useSalesRepTasks.ts`
- [Hub query helper](https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/modules/sales-rep/composables/useSalesRepHubQuery.ts): `client-app/modules/sales-rep/composables/useSalesRepHubQuery.ts`

### Storefront extensions

- [Customer reviews](https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/modules/customer-reviews/useCustomerReviews.ts): `client-app/modules/customer-reviews/useCustomerReviews.ts`
- [Builder preview](https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/plugins/builder-preview/builder-preview.plugin.ts): `client-app/plugins/builder-preview/builder-preview.plugin.ts`
- [Reviews GraphQL operations](https://github.com/virtocommerce/vc-frontend/blob/dev/client-app/modules/customer-reviews/api/graphql/index.ts): `client-app/modules/customer-reviews/api/graphql/index.ts`

### Other components

- **Shopper**

## Connections

- Shopper → Route registry: navigates (evidence: `README.md`)
- Route registry → Application shell: renders routes (evidence: `README.md`)
- Route registry → Sales rep routes: mounts routes (evidence: `client-app/modules/sales-rep/routes.ts`)
- Shopper → Catalog and search: browses (evidence: `README.md`)
- Shopper → Cart: manages cart (evidence: `README.md`)
- Shopper → Checkout: checks out (evidence: `README.md`)
- Shopper → Accounts: manages account (evidence: `README.md`)
- Shopper → Orders: views orders (evidence: `README.md`)
- Shopper → Organizations: manages organization (evidence: `README.md`)
- Fulfillment centers → GraphQL API: requests data (evidence: `client-app/shared/fulfillmentCenters/composables/useFulfillmentCenters.ts`)
- Sales rep tasks → Hub query helper: queries tasks (evidence: `client-app/modules/sales-rep/composables/useSalesRepTasks.ts`)
- Hub query helper → GraphQL API: executes query (evidence: `client-app/modules/sales-rep/composables/useSalesRepHubQuery.ts`)
- Customer reviews → Reviews GraphQL operations: calls operations (evidence: `client-app/modules/customer-reviews/useCustomerReviews.ts`)
- Shopper → Customer reviews: submits feedback (evidence: `README.md`)
