# rahulgawale/lwc-e-commerce-recipe architecture

> Architecture diagram of the GitHub repository rahulgawale/lwc-e-commerce-recipe, 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/rahulgawale/lwc-e-commerce-recipe
- Repository: https://github.com/rahulgawale/lwc-e-commerce-recipe

## Overview

This Salesforce LWC demo provides a product-browsing experience: users can search and filter products, view product listings and tiles, and interact with a tile’s cart controls. Search requests are wired to an Apex service; filter selections are published over Lightning Message Service and consumed by the search component. Source excerpts do not show how the page composes the UI, how results reach the list, or how the Apex service queries product records, so those connections are omitted or marked unverified.

Main entry points: [`force-app/main/default/lwc/productSearch/productSearch.js`](https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/lwc/productSearch/productSearch.js) (Product Search), [`force-app/main/default/messageChannels/productFilterChannel.messageChannel-meta.xml`](https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/messageChannels/productFilterChannel.messageChannel-meta.xml) (Filter Channel), [`force-app/main/default/classes/ProductService.cls`](https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/classes/ProductService.cls) (Product Service), [`force-app/main/default/lwc/productSearchForm/productSearchForm.js`](https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/lwc/productSearchForm/productSearchForm.js) (Search Form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Product Discovery"]
  node_searchform["Search Form"]
  node_filters["Product Filters<br/>[productFilters.js]"]
  node_filterchannel["Filter Channel"]
  node_search["Product Search<br/>[productSearch.js]"]
end

subgraph group_presentation["Product Presentation"]
  node_page["T-Shirts Page"]
  node_productslist["Products List<br/>[productsList.js]"]
  node_tile["Product Tile<br/>[productTile.js]"]
end

subgraph group_salesforce["Salesforce Data"]
  node_service["Product Service<br/>[ProductService.cls]"]
  node_productdata[("Product Records")]
end

node_shopper(("Shopper"))

node_filters -->|"publishes filters"| node_filterchannel
node_filterchannel -->|"delivers filters"| node_search
node_search -->|"requests products"| node_service
node_searchform -.->|"sends search"| node_search
node_service -.->|"queries records"| node_productdata
node_shopper -.->|"opens"| node_page

click node_page "https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/flexipages/T_Shirts.flexipage-meta.xml"
click node_searchform "https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/lwc/productSearchForm/productSearchForm.js"
click node_filters "https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/lwc/productFilters/productFilters.js"
click node_filterchannel "https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/messageChannels/productFilterChannel.messageChannel-meta.xml"
click node_search "https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/lwc/productSearch/productSearch.js"
click node_service "https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/classes/ProductService.cls"
click node_productdata "https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/objects/Product2/Product2.object-meta.xml"
click node_productslist "https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/lwc/productsList/productsList.js"
click node_tile "https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/lwc/productTile/productTile.js"

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_searchform,node_filters,node_filterchannel,node_search toneBlue
class node_page,node_productslist,node_tile toneAmber
class node_service,node_productdata toneMint
class node_shopper toneIndigo
```

## Components

### Product Discovery

- [Search Form](https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/lwc/productSearchForm/productSearchForm.js): `force-app/main/default/lwc/productSearchForm/productSearchForm.js`
- [Product Filters](https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/lwc/productFilters/productFilters.js): `force-app/main/default/lwc/productFilters/productFilters.js`
- [Filter Channel](https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/messageChannels/productFilterChannel.messageChannel-meta.xml): `force-app/main/default/messageChannels/productFilterChannel.messageChannel-meta.xml`
- [Product Search](https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/lwc/productSearch/productSearch.js): `force-app/main/default/lwc/productSearch/productSearch.js`

### Product Presentation

- [T-Shirts Page](https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/flexipages/T_Shirts.flexipage-meta.xml): `force-app/main/default/flexipages/T_Shirts.flexipage-meta.xml`
- [Products List](https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/lwc/productsList/productsList.js): `force-app/main/default/lwc/productsList/productsList.js`
- [Product Tile](https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/lwc/productTile/productTile.js): `force-app/main/default/lwc/productTile/productTile.js`

### Salesforce Data

- [Product Service](https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/classes/ProductService.cls): `force-app/main/default/classes/ProductService.cls`
- [Product Records](https://github.com/rahulgawale/lwc-e-commerce-recipe/blob/master/force-app/main/default/objects/Product2/Product2.object-meta.xml): `force-app/main/default/objects/Product2/Product2.object-meta.xml`

### Other components

- **Shopper**

## Connections

- Product Filters → Filter Channel: publishes filters (evidence: `force-app/main/default/lwc/productFilters/productFilters.js`)
- Filter Channel → Product Search: delivers filters (evidence: `force-app/main/default/lwc/productSearch/productSearch.js`)
- Product Search → Product Service: requests products (evidence: `force-app/main/default/lwc/productSearch/productSearch.js`)
- Search Form → Product Search: sends search
- Product Service → Product Records: queries records
- Shopper → T-Shirts Page: opens
