# stangrinn/hg-storefront architecture

> Architecture diagram of the GitHub repository stangrinn/hg-storefront, 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/stangrinn/hg-storefront
- Repository: https://github.com/stangrinn/hg-storefront

## Overview

This is an Angular storefront for Helena Grisnhpun Art, backed by Vendure through a GraphQL/Apollo data layer. A shopper browses collections and products, manages a cart, checks out through shipping and payment, and can register or manage an account and orders. The graph preserves those domain stages plus shared state and data-access layers. Routing and sampled calls support the shown connections; broader capabilities and SSR are included where the README documents them, without implying unsampled implementation details.

Main entry points: [`src/app/app.component.ts`](https://github.com/stangrinn/hg-storefront/blob/main/src/app/app.component.ts) (App shell), [`src/app/core/providers/data/data.service.ts`](https://github.com/stangrinn/hg-storefront/blob/main/src/app/core/providers/data/data.service.ts) (GraphQL data service), [`src/app/checkout/checkout.routes.ts`](https://github.com/stangrinn/hg-storefront/blob/main/src/app/checkout/checkout.routes.ts) (Checkout routing), [`src/app/checkout/components/checkout-shipping/checkout-shipping.component.ts`](https://github.com/stangrinn/hg-storefront/blob/main/src/app/checkout/components/checkout-shipping/checkout-shipping.component.ts) (Shipping selection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Storefront experience"]
  node_app["App shell<br/>[app.component.ts]"]
  node_catalog["Product catalog"]
  node_product["Product detail"]
  node_search["Product search"]
end

subgraph group_commerce["Commerce flows"]
  node_cart["Shopping cart"]
  node_checkout["Checkout flow"]
  node_shipping["Shipping selection"]
  node_payment["Payment processing"]
  node_confirmation["Order confirmation"]
  node_checkout_routes["Checkout routing<br/>[checkout.routes.ts]"]
end

subgraph group_account["Customer accounts"]
  node_account["Account management"]
  node_account_routes["Account routing<br/>[account.routes.ts]"]
end

subgraph group_platform["Application platform"]
  node_routes["App routing<br/>[app.routes.ts]"]
  node_state["Application state<br/>[state.service.ts]"]
  node_shared["Shared UI"]
  node_ssr["SSR server<br/>[server.ts]"]
end

subgraph group_data["Data integration"]
  node_data_service["GraphQL data service<br/>[data.service.ts]"]
  node_apollo["Apollo client"]
  node_graphql_docs["GraphQL operations"]
  node_types["Generated API types<br/>[generated-types.ts]"]
end

node_shopper(("Shopper"))
node_vendure{{"Vendure shop API"}}

node_shopper -->|"visits"| node_app
node_app -->|"routes to"| node_catalog
node_app -->|"routes to"| node_product
node_app -->|"loads"| node_account_routes
node_app -->|"loads"| node_checkout_routes
node_app -->|"queries collections"| node_data_service
node_app -->|"reads state"| node_state
node_catalog -->|"queries products"| node_data_service
node_product -->|"queries product"| node_data_service
node_catalog -.->|"uses search"| node_search
node_product -.->|"adds to cart"| node_cart
node_cart -.->|"updates state"| node_state
node_checkout_routes -->|"routes to"| node_checkout
node_checkout_routes -->|"routes to"| node_shipping
node_checkout_routes -->|"routes to"| node_payment
node_checkout_routes -->|"routes to"| node_confirmation
node_checkout -->|"hosts stage"| node_shipping
node_shipping -->|"loads and mutates"| node_data_service
node_shipping -->|"uses address form"| node_shared
node_shipping -->|"reads sign-in state"| node_state
node_account_routes -->|"routes account pages"| node_account
node_account -.->|"manages account data"| node_data_service
node_data_service -->|"calls"| node_apollo
node_apollo -->|"queries GraphQL"| node_vendure
node_app -->|"uses operations"| node_graphql_docs
node_app -->|"uses types"| node_types
node_ssr -->|"serves rendered app"| node_app

click node_app "https://github.com/stangrinn/hg-storefront/blob/main/src/app/app.component.ts"
click node_catalog "https://github.com/stangrinn/hg-storefront/blob/main/src/app/core/components/product-list/product-list.component.ts"
click node_product "https://github.com/stangrinn/hg-storefront/blob/main/src/app/core/components/product-detail/product-detail.component.ts"
click node_search "https://github.com/stangrinn/hg-storefront/blob/main/src/app/core/components/product-search-bar/product-search-bar.component.ts"
click node_cart "https://github.com/stangrinn/hg-storefront/blob/main/src/app/core/components/cart-drawer/cart-drawer.component.ts"
click node_checkout "https://github.com/stangrinn/hg-storefront/blob/main/src/app/checkout/components/checkout-process/checkout-process.component.ts"
click node_shipping "https://github.com/stangrinn/hg-storefront/blob/main/src/app/checkout/components/checkout-shipping/checkout-shipping.component.ts"
click node_payment "https://github.com/stangrinn/hg-storefront/blob/main/src/app/checkout/components/checkout-payment/checkout-payment.component.ts"
click node_confirmation "https://github.com/stangrinn/hg-storefront/blob/main/src/app/checkout/components/checkout-confirmation/checkout-confirmation.component.ts"
click node_account "https://github.com/stangrinn/hg-storefront/blob/main/src/app/account/components/account-address-detail/account-address-detail.component.ts"
click node_account_routes "https://github.com/stangrinn/hg-storefront/blob/main/src/app/account/account.routes.ts"
click node_checkout_routes "https://github.com/stangrinn/hg-storefront/blob/main/src/app/checkout/checkout.routes.ts"
click node_routes "https://github.com/stangrinn/hg-storefront/blob/main/src/app/app.routes.ts"
click node_state "https://github.com/stangrinn/hg-storefront/blob/main/src/app/core/providers/state/state.service.ts"
click node_shared "https://github.com/stangrinn/hg-storefront/blob/main/src/app/shared/components/address-form/address-form.component.ts"
click node_data_service "https://github.com/stangrinn/hg-storefront/blob/main/src/app/core/providers/data/data.service.ts"
click node_apollo "https://github.com/stangrinn/hg-storefront/blob/main/src/app/core/apollo-client-provider.ts"
click node_graphql_docs "https://github.com/stangrinn/hg-storefront/blob/main/src/app/common/graphql/documents.graphql.ts"
click node_types "https://github.com/stangrinn/hg-storefront/blob/main/src/app/common/generated-types.ts"
click node_ssr "https://github.com/stangrinn/hg-storefront/blob/main/server.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_catalog,node_product,node_search toneBlue
class node_cart,node_checkout,node_shipping,node_payment,node_confirmation,node_checkout_routes toneAmber
class node_account,node_account_routes,node_vendure toneMint
class node_routes,node_state,node_shared,node_ssr toneRose
class node_data_service,node_apollo,node_graphql_docs,node_types,node_shopper toneIndigo
```

## Components

### Storefront experience

- [App shell](https://github.com/stangrinn/hg-storefront/blob/main/src/app/app.component.ts): `src/app/app.component.ts`
- [Product catalog](https://github.com/stangrinn/hg-storefront/blob/main/src/app/core/components/product-list/product-list.component.ts): `src/app/core/components/product-list/product-list.component.ts`
- [Product detail](https://github.com/stangrinn/hg-storefront/blob/main/src/app/core/components/product-detail/product-detail.component.ts): `src/app/core/components/product-detail/product-detail.component.ts`
- [Product search](https://github.com/stangrinn/hg-storefront/blob/main/src/app/core/components/product-search-bar/product-search-bar.component.ts): `src/app/core/components/product-search-bar/product-search-bar.component.ts`

### Commerce flows

- [Shopping cart](https://github.com/stangrinn/hg-storefront/blob/main/src/app/core/components/cart-drawer/cart-drawer.component.ts): `src/app/core/components/cart-drawer/cart-drawer.component.ts`
- [Checkout flow](https://github.com/stangrinn/hg-storefront/blob/main/src/app/checkout/components/checkout-process/checkout-process.component.ts): `src/app/checkout/components/checkout-process/checkout-process.component.ts`
- [Shipping selection](https://github.com/stangrinn/hg-storefront/blob/main/src/app/checkout/components/checkout-shipping/checkout-shipping.component.ts): `src/app/checkout/components/checkout-shipping/checkout-shipping.component.ts`
- [Payment processing](https://github.com/stangrinn/hg-storefront/blob/main/src/app/checkout/components/checkout-payment/checkout-payment.component.ts): `src/app/checkout/components/checkout-payment/checkout-payment.component.ts`
- [Order confirmation](https://github.com/stangrinn/hg-storefront/blob/main/src/app/checkout/components/checkout-confirmation/checkout-confirmation.component.ts): `src/app/checkout/components/checkout-confirmation/checkout-confirmation.component.ts`
- [Checkout routing](https://github.com/stangrinn/hg-storefront/blob/main/src/app/checkout/checkout.routes.ts): `src/app/checkout/checkout.routes.ts`

### Customer accounts

- [Account management](https://github.com/stangrinn/hg-storefront/blob/main/src/app/account/components/account-address-detail/account-address-detail.component.ts): `src/app/account/components/account-address-detail/account-address-detail.component.ts`
- [Account routing](https://github.com/stangrinn/hg-storefront/blob/main/src/app/account/account.routes.ts): `src/app/account/account.routes.ts`

### Application platform

- [App routing](https://github.com/stangrinn/hg-storefront/blob/main/src/app/app.routes.ts): `src/app/app.routes.ts`
- [Application state](https://github.com/stangrinn/hg-storefront/blob/main/src/app/core/providers/state/state.service.ts): `src/app/core/providers/state/state.service.ts`
- [Shared UI](https://github.com/stangrinn/hg-storefront/blob/main/src/app/shared/components/address-form/address-form.component.ts): `src/app/shared/components/address-form/address-form.component.ts`
- [SSR server](https://github.com/stangrinn/hg-storefront/blob/main/server.ts): `server.ts`

### Data integration

- [GraphQL data service](https://github.com/stangrinn/hg-storefront/blob/main/src/app/core/providers/data/data.service.ts): `src/app/core/providers/data/data.service.ts`
- [Apollo client](https://github.com/stangrinn/hg-storefront/blob/main/src/app/core/apollo-client-provider.ts): `src/app/core/apollo-client-provider.ts`
- [GraphQL operations](https://github.com/stangrinn/hg-storefront/blob/main/src/app/common/graphql/documents.graphql.ts): `src/app/common/graphql/documents.graphql.ts`
- [Generated API types](https://github.com/stangrinn/hg-storefront/blob/main/src/app/common/generated-types.ts): `src/app/common/generated-types.ts`

### Other components

- **Shopper**
- **Vendure shop API**

## Connections

- Shopper → App shell: visits (evidence: `README.md`)
- App shell → Product catalog: routes to
- App shell → Product detail: routes to
- App shell → Account routing: loads
- App shell → Checkout routing: loads
- App shell → GraphQL data service: queries collections (evidence: `src/app/app.component.ts`)
- App shell → Application state: reads state (evidence: `src/app/app.component.ts`)
- Product catalog → GraphQL data service: queries products (evidence: `src/app/core/components/product-list/product-list.component.ts`)
- Product detail → GraphQL data service: queries product (evidence: `src/app/core/components/product-detail/product-detail.component.ts`)
- Product catalog → Product search: uses search
- Product detail → Shopping cart: adds to cart
- Shopping cart → Application state: updates state
- Checkout routing → Checkout flow: routes to (evidence: `src/app/checkout/checkout.routes.ts`)
- Checkout routing → Shipping selection: routes to (evidence: `src/app/checkout/checkout.routes.ts`)
- Checkout routing → Payment processing: routes to (evidence: `src/app/checkout/checkout.routes.ts`)
- Checkout routing → Order confirmation: routes to (evidence: `src/app/checkout/checkout.routes.ts`)
- Checkout flow → Shipping selection: hosts stage (evidence: `src/app/checkout/checkout.routes.ts`)
- Shipping selection → GraphQL data service: loads and mutates (evidence: `src/app/checkout/components/checkout-shipping/checkout-shipping.component.ts`)
- Shipping selection → Shared UI: uses address form (evidence: `src/app/checkout/components/checkout-shipping/checkout-shipping.component.ts`)
- Shipping selection → Application state: reads sign-in state (evidence: `src/app/checkout/components/checkout-shipping/checkout-shipping.component.ts`)
- Account routing → Account management: routes account pages (evidence: `src/app/account/account.routes.ts`)
- Account management → GraphQL data service: manages account data (evidence: `src/app/account/components/account-address-detail/account-address-detail.component.ts`)
- GraphQL data service → Apollo client: calls (evidence: `src/app/core/providers/data/data.service.ts`)
- Apollo client → Vendure shop API: queries GraphQL (evidence: `README.md`)
- App shell → GraphQL operations: uses operations (evidence: `src/app/app.component.ts`)
- App shell → Generated API types: uses types (evidence: `src/app/app.component.ts`)
- SSR server → App shell: serves rendered app (evidence: `README.md`)
