# abu-nasim-lomani/atelier-webar-commerce architecture

> Architecture diagram of the GitHub repository abu-nasim-lomani/atelier-webar-commerce, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abu-nasim-lomani/atelier-webar-commerce
- Repository: https://github.com/abu-nasim-lomani/atelier-webar-commerce

## Overview

Atelier is a furniture-commerce experience with product configuration, room-fit assessment, 3D viewing, AR launch, and share/order handoff. The product route orchestrates URL and stored configuration, commerce calculations, capability checks, and presentation; render and UI remain separate layers. The README describes an earlier scaffold phase, while the sampled source and SOURCE INDEX document later product capabilities. Some subsystem internals were not sampled, so uncertain links are omitted.

Main entry points: [`app/product/[slug]/ProductOrchestrator.tsx`](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/app/product/%5Bslug%5D/ProductOrchestrator.tsx) (Product orchestrator), [`src/ui/modules/product/RoomPreview.tsx`](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/ui/modules/product/RoomPreview.tsx) (Room preview UI), [`app/page.tsx`](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/app/page.tsx) (Landing page), [`src/app/CanvasMount.tsx`](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/app/CanvasMount.tsx) (Canvas mount)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Site experience"]
  node_landing["Landing page<br/>[page.tsx]"]
  node_product["Product orchestrator"]
  node_productui["Product presentation"]
  node_roomui["Room preview UI<br/>[RoomPreview.tsx]"]
  node_legal["Legal and contact pages"]
  node_landingui["Landing sections"]
end

subgraph group_commerce["Commerce domain"]
  node_catalog["Product catalog<br/>[catalog.ts]"]
  node_finishes["Finish options<br/>[finishes.ts]"]
  node_fit["Fit checker<br/>[fitChecker.ts]"]
  node_urlstate["Configuration URLs<br/>[urlState.ts]"]
  node_handoff["Decision and handoff"]
  node_configstate["Product config store<br/>[productConfig.ts]"]
end

subgraph group_rendering["3D and AR"]
  node_canvasmount["Canvas mount<br/>[CanvasMount.tsx]"]
  node_rendercanvas["Product render canvas<br/>[RenderCanvas.tsx]"]
  node_previewmount["Preview canvas mount"]
  node_previewcanvas["Room preview canvas"]
  node_scene["Room and sofa scene<br/>[RoomSofa.tsx]"]
  node_arlaunch["AR launch resolver<br/>[launch.ts]"]
  node_arcanvas["AR canvas and session<br/>[ArCanvas.tsx]"]
  node_capability["AR capability detection<br/>[arSupport.ts]"]
end

subgraph group_foundation["Shared foundation"]
  node_tokens["Design tokens<br/>[primitive.ts]"]
  node_primitives["UI primitives"]
end

subgraph group_assets["Asset pipeline"]
  node_assets["Offline asset pipeline"]
end

node_visitor(("Shopper"))

node_visitor -->|"opens"| node_landing
node_visitor -.->|"configures"| node_product
node_landing -->|"renders"| node_landingui
node_landing -->|"mounts"| node_canvasmount
node_product -->|"composes"| node_productui
node_product -->|"reads and updates"| node_configstate
node_product -->|"resolves product"| node_catalog
node_product -->|"resolves finish"| node_finishes
node_product -->|"checks fit"| node_fit
node_product -->|"syncs URL"| node_urlstate
node_product -->|"composes handoff"| node_handoff
node_product -->|"checks support"| node_capability
node_product -->|"resolves launch"| node_arlaunch
node_product -->|"mounts stage"| node_canvasmount
node_product -.->|"mounts AR"| node_arcanvas
node_product -->|"presents preview"| node_roomui
node_roomui -.->|"renders stage"| node_previewmount
node_roomui -.->|"uses handoff URL"| node_handoff
node_roomui -->|"composes room shot"| node_previewcanvas
node_canvasmount -->|"loads canvas"| node_rendercanvas
node_previewmount -->|"loads canvas"| node_previewcanvas
node_previewcanvas -->|"renders sofa"| node_scene
node_product -.->|"offers contact pages"| node_legal
node_primitives -.->|"consumes tokens"| node_tokens

click node_landing "https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/app/page.tsx"
click node_product "https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/app/product/%5Bslug%5D/ProductOrchestrator.tsx"
click node_productui "https://github.com/abu-nasim-lomani/atelier-webar-commerce/tree/main/src/ui/modules/product"
click node_roomui "https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/ui/modules/product/RoomPreview.tsx"
click node_legal "https://github.com/abu-nasim-lomani/atelier-webar-commerce/tree/main/src/ui/modules/legal"
click node_landingui "https://github.com/abu-nasim-lomani/atelier-webar-commerce/tree/main/src/ui/modules/landing"
click node_catalog "https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/commerce/catalog.ts"
click node_finishes "https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/commerce/finishes.ts"
click node_fit "https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/commerce/fitChecker.ts"
click node_urlstate "https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/commerce/urlState.ts"
click node_handoff "https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/commerce/decisionArtifact.ts"
click node_configstate "https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/state/productConfig.ts"
click node_canvasmount "https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/app/CanvasMount.tsx"
click node_rendercanvas "https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/render/RenderCanvas.tsx"
click node_previewmount "https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/app/RoomPreviewMount.tsx"
click node_previewcanvas "https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/render/RoomPreviewCanvas.tsx"
click node_scene "https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/render/scene/RoomSofa.tsx"
click node_arlaunch "https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/ar/launch.ts"
click node_arcanvas "https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/render/xr/ArCanvas.tsx"
click node_capability "https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/capability/arSupport.ts"
click node_tokens "https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/tokens/primitive.ts"
click node_primitives "https://github.com/abu-nasim-lomani/atelier-webar-commerce/tree/main/src/ui/primitives"
click node_assets "https://github.com/abu-nasim-lomani/atelier-webar-commerce/tree/main/assets-pipeline"

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_landing,node_product,node_productui,node_roomui,node_legal,node_landingui toneBlue
class node_catalog,node_finishes,node_fit,node_urlstate,node_handoff,node_configstate toneAmber
class node_canvasmount,node_rendercanvas,node_previewmount,node_previewcanvas,node_scene,node_arlaunch,node_arcanvas,node_capability toneMint
class node_tokens,node_primitives toneRose
class node_assets,node_visitor toneIndigo
```

## Components

### Site experience

- [Landing page](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/app/page.tsx): `app/page.tsx`
- [Product orchestrator](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/app/product/%5Bslug%5D/ProductOrchestrator.tsx): `app/product/[slug]/ProductOrchestrator.tsx`
- [Product presentation](https://github.com/abu-nasim-lomani/atelier-webar-commerce/tree/main/src/ui/modules/product): `src/ui/modules/product`
- [Room preview UI](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/ui/modules/product/RoomPreview.tsx): `src/ui/modules/product/RoomPreview.tsx`
- [Legal and contact pages](https://github.com/abu-nasim-lomani/atelier-webar-commerce/tree/main/src/ui/modules/legal): `src/ui/modules/legal`
- [Landing sections](https://github.com/abu-nasim-lomani/atelier-webar-commerce/tree/main/src/ui/modules/landing): `src/ui/modules/landing`

### Commerce domain

- [Product catalog](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/commerce/catalog.ts): `src/commerce/catalog.ts`
- [Finish options](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/commerce/finishes.ts): `src/commerce/finishes.ts`
- [Fit checker](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/commerce/fitChecker.ts): `src/commerce/fitChecker.ts`
- [Configuration URLs](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/commerce/urlState.ts): `src/commerce/urlState.ts`
- [Decision and handoff](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/commerce/decisionArtifact.ts): `src/commerce/decisionArtifact.ts`
- [Product config store](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/state/productConfig.ts): `src/state/productConfig.ts`

### 3D and AR

- [Canvas mount](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/app/CanvasMount.tsx): `src/app/CanvasMount.tsx`
- [Product render canvas](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/render/RenderCanvas.tsx): `src/render/RenderCanvas.tsx`
- [Preview canvas mount](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/app/RoomPreviewMount.tsx): `src/app/RoomPreviewMount.tsx`
- [Room preview canvas](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/render/RoomPreviewCanvas.tsx): `src/render/RoomPreviewCanvas.tsx`
- [Room and sofa scene](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/render/scene/RoomSofa.tsx): `src/render/scene/RoomSofa.tsx`
- [AR launch resolver](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/ar/launch.ts): `src/ar/launch.ts`
- [AR canvas and session](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/render/xr/ArCanvas.tsx): `src/render/xr/ArCanvas.tsx`
- [AR capability detection](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/capability/arSupport.ts): `src/capability/arSupport.ts`

### Shared foundation

- [Design tokens](https://github.com/abu-nasim-lomani/atelier-webar-commerce/blob/main/src/tokens/primitive.ts): `src/tokens/primitive.ts`
- [UI primitives](https://github.com/abu-nasim-lomani/atelier-webar-commerce/tree/main/src/ui/primitives): `src/ui/primitives`

### Asset pipeline

- [Offline asset pipeline](https://github.com/abu-nasim-lomani/atelier-webar-commerce/tree/main/assets-pipeline): `assets-pipeline`

### Other components

- **Shopper**

## Connections

- Shopper → Landing page: opens (evidence: `app/page.tsx`)
- Shopper → Product orchestrator: configures
- Landing page → Landing sections: renders (evidence: `app/page.tsx`)
- Landing page → Canvas mount: mounts (evidence: `app/page.tsx`)
- Product orchestrator → Product presentation: composes (evidence: `app/product/[slug]/ProductOrchestrator.tsx`)
- Product orchestrator → Product config store: reads and updates (evidence: `app/product/[slug]/ProductOrchestrator.tsx`)
- Product orchestrator → Product catalog: resolves product (evidence: `app/product/[slug]/ProductOrchestrator.tsx`)
- Product orchestrator → Finish options: resolves finish (evidence: `app/product/[slug]/ProductOrchestrator.tsx`)
- Product orchestrator → Fit checker: checks fit (evidence: `app/product/[slug]/ProductOrchestrator.tsx`)
- Product orchestrator → Configuration URLs: syncs URL (evidence: `app/product/[slug]/ProductOrchestrator.tsx`)
- Product orchestrator → Decision and handoff: composes handoff (evidence: `app/product/[slug]/ProductOrchestrator.tsx`)
- Product orchestrator → AR capability detection: checks support (evidence: `app/product/[slug]/ProductOrchestrator.tsx`)
- Product orchestrator → AR launch resolver: resolves launch (evidence: `app/product/[slug]/ProductOrchestrator.tsx`)
- Product orchestrator → Canvas mount: mounts stage (evidence: `app/product/[slug]/ProductOrchestrator.tsx`)
- Product orchestrator → AR canvas and session: mounts AR
- Product orchestrator → Room preview UI: presents preview (evidence: `app/product/[slug]/ProductOrchestrator.tsx`)
- Room preview UI → Preview canvas mount: renders stage
- Room preview UI → Decision and handoff: uses handoff URL
- Room preview UI → Room preview canvas: composes room shot (evidence: `src/ui/modules/product/RoomPreview.tsx`)
- Canvas mount → Product render canvas: loads canvas (evidence: `src/app/CanvasMount.tsx`)
- Preview canvas mount → Room preview canvas: loads canvas (evidence: `src/app/RoomPreviewMount.tsx`)
- Room preview canvas → Room and sofa scene: renders sofa (evidence: `src/render/RoomPreviewCanvas.tsx`)
- Product orchestrator → Legal and contact pages: offers contact pages
- UI primitives → Design tokens: consumes tokens
