# durwank2002/doors_timberframe architecture

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

- Interactive diagram: https://gitdiagram.com/durwank2002/doors_timberframe
- Repository: https://github.com/durwank2002/doors_timberframe

## Overview

TimberCraft is a React storefront for handcrafted wooden doors and frames. Shoppers browse and filter the catalog, inspect products, optionally configure a door, then add selections to a quote cart or contact the business through an enquiry form or WhatsApp. Cart and wishlist state persist in browser storage, with toast feedback. The graph covers the principal storefront and quote workflow plus product visualization and timber guidance; some App wiring and unsampled component behavior are supported only by the source index, so uncertain links are omitted.

Main entry points: [`src/App.jsx`](https://github.com/durwank2002/doors_timberframe/blob/main/src/App.jsx) (Storefront app), [`src/components/product/ProductDetailModal.jsx`](https://github.com/durwank2002/doors_timberframe/blob/main/src/components/product/ProductDetailModal.jsx) (Product details), [`src/context/CartContext.jsx`](https://github.com/durwank2002/doors_timberframe/blob/main/src/context/CartContext.jsx) (Quote cart), [`src/components/enquiry/EnquiryModal.jsx`](https://github.com/durwank2002/doors_timberframe/blob/main/src/components/enquiry/EnquiryModal.jsx) (Enquiry form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_app["Storefront app<br/>[App.jsx]"]
  node_layout["Storefront layout"]
end

subgraph group_discovery["Product discovery"]
  node_catalog["Catalog grid<br/>[CatalogGrid.jsx]"]
  node_filters["Catalog filters<br/>[FilterSidebar.jsx]"]
  node_search["Catalog search<br/>[SearchBar.jsx]"]
  node_sorting["Catalog sorting<br/>[SortDropdown.jsx]"]
  node_productcard["Product cards<br/>[ProductCard.jsx]"]
  node_products["Product catalog data<br/>[products.js]"]
end

subgraph group_customize["Product exploration"]
  node_productdetail["Product details"]
  node_gallery["Product gallery<br/>[ProductGallery.jsx]"]
  node_configurator["Door configurator"]
  node_visualizer["Room visualizer<br/>[RoomVisualizer.jsx]"]
  node_timberguide["Timber guide"]
end

subgraph group_quote["Quotes and state"]
  node_cart["Quote cart<br/>[CartContext.jsx]"]
  node_cartdrawer["Cart drawer<br/>[CartDrawer.jsx]"]
  node_wishlist["Wishlist state"]
  node_wishlistdrawer["Wishlist drawer<br/>[WishlistDrawer.jsx]"]
  node_enquiry["Enquiry form<br/>[EnquiryModal.jsx]"]
end

subgraph group_shared["Shared logic"]
  node_toast["Toast feedback<br/>[ToastContext.jsx]"]
  node_storagehook["Persistent state hook<br/>[useLocalStorage.js]"]
  node_formatters["Price formatting<br/>[formatters.js]"]
  node_validation["Form validation<br/>[validators.js]"]
  node_whatsapp["WhatsApp link builder<br/>[whatsapp.js]"]
end

node_shopper(("Shopper"))
node_browserstorage[("Browser local storage")]
node_whatsappservice["WhatsApp"]

node_shopper -->|"browses"| node_app
node_app -->|"renders"| node_layout
node_app -->|"renders"| node_search
node_app -->|"renders"| node_sorting
node_app -->|"renders"| node_filters
node_app -->|"renders"| node_catalog
node_catalog -->|"renders"| node_productcard
node_app -->|"renders"| node_productdetail
node_productdetail -->|"renders"| node_gallery
node_app -->|"renders"| node_configurator
node_app -->|"renders"| node_visualizer
node_app -->|"renders"| node_timberguide
node_productdetail -->|"adds items"| node_cart
node_configurator -->|"adds items"| node_cart
node_cartdrawer -->|"updates cart"| node_cart
node_app -->|"renders"| node_cartdrawer
node_app -->|"renders"| node_wishlistdrawer
node_productdetail -->|"toggles items"| node_wishlist
node_wishlistdrawer -->|"reads state"| node_wishlist
node_app -->|"renders"| node_enquiry
node_enquiry -->|"reads quote"| node_cart
node_enquiry -->|"builds link"| node_whatsapp
node_cartdrawer -->|"builds link"| node_whatsapp
node_productdetail -->|"builds link"| node_whatsapp
node_whatsapp -->|"opens chat"| node_whatsappservice
node_enquiry -->|"validates input"| node_validation
node_cart -->|"persists state"| node_storagehook
node_wishlist -->|"persists state"| node_storagehook
node_storagehook -->|"reads and writes"| node_browserstorage
node_cart -->|"shows feedback"| node_toast
node_wishlist -->|"shows feedback"| node_toast
node_enquiry -->|"shows feedback"| node_toast
node_catalog -.->|"displays products"| node_products
node_productdetail -->|"formats prices"| node_formatters
node_whatsapp -->|"formats currency"| node_formatters

click node_app "https://github.com/durwank2002/doors_timberframe/blob/main/src/App.jsx"
click node_layout "https://github.com/durwank2002/doors_timberframe/tree/main/src/components/layout"
click node_catalog "https://github.com/durwank2002/doors_timberframe/blob/main/src/components/catalog/CatalogGrid.jsx"
click node_filters "https://github.com/durwank2002/doors_timberframe/blob/main/src/components/catalog/FilterSidebar.jsx"
click node_search "https://github.com/durwank2002/doors_timberframe/blob/main/src/components/catalog/SearchBar.jsx"
click node_sorting "https://github.com/durwank2002/doors_timberframe/blob/main/src/components/catalog/SortDropdown.jsx"
click node_productcard "https://github.com/durwank2002/doors_timberframe/blob/main/src/components/catalog/ProductCard.jsx"
click node_products "https://github.com/durwank2002/doors_timberframe/blob/main/src/data/products.js"
click node_productdetail "https://github.com/durwank2002/doors_timberframe/blob/main/src/components/product/ProductDetailModal.jsx"
click node_gallery "https://github.com/durwank2002/doors_timberframe/blob/main/src/components/product/ProductGallery.jsx"
click node_configurator "https://github.com/durwank2002/doors_timberframe/blob/main/src/components/configurator/CustomDoorConfigurator.jsx"
click node_visualizer "https://github.com/durwank2002/doors_timberframe/blob/main/src/components/product/RoomVisualizer.jsx"
click node_timberguide "https://github.com/durwank2002/doors_timberframe/blob/main/src/components/catalog/TimberSpeciesGuide.jsx"
click node_cart "https://github.com/durwank2002/doors_timberframe/blob/main/src/context/CartContext.jsx"
click node_cartdrawer "https://github.com/durwank2002/doors_timberframe/blob/main/src/components/cart/CartDrawer.jsx"
click node_wishlist "https://github.com/durwank2002/doors_timberframe/blob/main/src/context/WishlistContext.jsx"
click node_wishlistdrawer "https://github.com/durwank2002/doors_timberframe/blob/main/src/components/wishlist/WishlistDrawer.jsx"
click node_enquiry "https://github.com/durwank2002/doors_timberframe/blob/main/src/components/enquiry/EnquiryModal.jsx"
click node_toast "https://github.com/durwank2002/doors_timberframe/blob/main/src/context/ToastContext.jsx"
click node_storagehook "https://github.com/durwank2002/doors_timberframe/blob/main/src/hooks/useLocalStorage.js"
click node_formatters "https://github.com/durwank2002/doors_timberframe/blob/main/src/utils/formatters.js"
click node_validation "https://github.com/durwank2002/doors_timberframe/blob/main/src/utils/validators.js"
click node_whatsapp "https://github.com/durwank2002/doors_timberframe/blob/main/src/utils/whatsapp.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_app,node_layout toneBlue
class node_catalog,node_filters,node_search,node_sorting,node_productcard,node_products,node_browserstorage toneAmber
class node_productdetail,node_gallery,node_configurator,node_visualizer,node_timberguide toneMint
class node_cart,node_cartdrawer,node_wishlist,node_wishlistdrawer,node_enquiry toneRose
class node_toast,node_storagehook,node_formatters,node_validation,node_whatsapp,node_shopper,node_whatsappservice toneIndigo
```

## Components

### Storefront

- [Storefront app](https://github.com/durwank2002/doors_timberframe/blob/main/src/App.jsx): `src/App.jsx`
- [Storefront layout](https://github.com/durwank2002/doors_timberframe/tree/main/src/components/layout): `src/components/layout`

### Product discovery

- [Catalog grid](https://github.com/durwank2002/doors_timberframe/blob/main/src/components/catalog/CatalogGrid.jsx): `src/components/catalog/CatalogGrid.jsx`
- [Catalog filters](https://github.com/durwank2002/doors_timberframe/blob/main/src/components/catalog/FilterSidebar.jsx): `src/components/catalog/FilterSidebar.jsx`
- [Catalog search](https://github.com/durwank2002/doors_timberframe/blob/main/src/components/catalog/SearchBar.jsx): `src/components/catalog/SearchBar.jsx`
- [Catalog sorting](https://github.com/durwank2002/doors_timberframe/blob/main/src/components/catalog/SortDropdown.jsx): `src/components/catalog/SortDropdown.jsx`
- [Product cards](https://github.com/durwank2002/doors_timberframe/blob/main/src/components/catalog/ProductCard.jsx): `src/components/catalog/ProductCard.jsx`
- [Product catalog data](https://github.com/durwank2002/doors_timberframe/blob/main/src/data/products.js): `src/data/products.js`

### Product exploration

- [Product details](https://github.com/durwank2002/doors_timberframe/blob/main/src/components/product/ProductDetailModal.jsx): `src/components/product/ProductDetailModal.jsx`
- [Product gallery](https://github.com/durwank2002/doors_timberframe/blob/main/src/components/product/ProductGallery.jsx): `src/components/product/ProductGallery.jsx`
- [Door configurator](https://github.com/durwank2002/doors_timberframe/blob/main/src/components/configurator/CustomDoorConfigurator.jsx): `src/components/configurator/CustomDoorConfigurator.jsx`
- [Room visualizer](https://github.com/durwank2002/doors_timberframe/blob/main/src/components/product/RoomVisualizer.jsx): `src/components/product/RoomVisualizer.jsx`
- [Timber guide](https://github.com/durwank2002/doors_timberframe/blob/main/src/components/catalog/TimberSpeciesGuide.jsx): `src/components/catalog/TimberSpeciesGuide.jsx`

### Quotes and state

- [Quote cart](https://github.com/durwank2002/doors_timberframe/blob/main/src/context/CartContext.jsx): `src/context/CartContext.jsx`
- [Cart drawer](https://github.com/durwank2002/doors_timberframe/blob/main/src/components/cart/CartDrawer.jsx): `src/components/cart/CartDrawer.jsx`
- [Wishlist state](https://github.com/durwank2002/doors_timberframe/blob/main/src/context/WishlistContext.jsx): `src/context/WishlistContext.jsx`
- [Wishlist drawer](https://github.com/durwank2002/doors_timberframe/blob/main/src/components/wishlist/WishlistDrawer.jsx): `src/components/wishlist/WishlistDrawer.jsx`
- [Enquiry form](https://github.com/durwank2002/doors_timberframe/blob/main/src/components/enquiry/EnquiryModal.jsx): `src/components/enquiry/EnquiryModal.jsx`

### Shared logic

- [Toast feedback](https://github.com/durwank2002/doors_timberframe/blob/main/src/context/ToastContext.jsx): `src/context/ToastContext.jsx`
- [Persistent state hook](https://github.com/durwank2002/doors_timberframe/blob/main/src/hooks/useLocalStorage.js): `src/hooks/useLocalStorage.js`
- [Price formatting](https://github.com/durwank2002/doors_timberframe/blob/main/src/utils/formatters.js): `src/utils/formatters.js`
- [Form validation](https://github.com/durwank2002/doors_timberframe/blob/main/src/utils/validators.js): `src/utils/validators.js`
- [WhatsApp link builder](https://github.com/durwank2002/doors_timberframe/blob/main/src/utils/whatsapp.js): `src/utils/whatsapp.js`

### Other components

- **Shopper**
- **Browser local storage**
- **WhatsApp**

## Connections

- Shopper → Storefront app: browses (evidence: `src/App.jsx`)
- Storefront app → Storefront layout: renders (evidence: `src/App.jsx`)
- Storefront app → Catalog search: renders (evidence: `src/App.jsx`)
- Storefront app → Catalog sorting: renders (evidence: `src/App.jsx`)
- Storefront app → Catalog filters: renders (evidence: `src/App.jsx`)
- Storefront app → Catalog grid: renders (evidence: `src/App.jsx`)
- Catalog grid → Product cards: renders (evidence: `src/components/catalog/CatalogGrid.jsx`)
- Storefront app → Product details: renders (evidence: `src/App.jsx`)
- Product details → Product gallery: renders (evidence: `src/components/product/ProductDetailModal.jsx`)
- Storefront app → Door configurator: renders (evidence: `src/App.jsx`)
- Storefront app → Room visualizer: renders (evidence: `src/App.jsx`)
- Storefront app → Timber guide: renders (evidence: `src/App.jsx`)
- Product details → Quote cart: adds items (evidence: `src/components/product/ProductDetailModal.jsx`)
- Door configurator → Quote cart: adds items (evidence: `src/components/configurator/CustomDoorConfigurator.jsx`)
- Cart drawer → Quote cart: updates cart (evidence: `src/components/cart/CartDrawer.jsx`)
- Storefront app → Cart drawer: renders (evidence: `src/App.jsx`)
- Storefront app → Wishlist drawer: renders (evidence: `src/App.jsx`)
- Product details → Wishlist state: toggles items (evidence: `src/components/product/ProductDetailModal.jsx`)
- Wishlist drawer → Wishlist state: reads state (evidence: `src/components/wishlist/WishlistDrawer.jsx`)
- Storefront app → Enquiry form: renders (evidence: `src/App.jsx`)
- Enquiry form → Quote cart: reads quote (evidence: `src/components/enquiry/EnquiryModal.jsx`)
- Enquiry form → WhatsApp link builder: builds link (evidence: `src/components/enquiry/EnquiryModal.jsx`)
- Cart drawer → WhatsApp link builder: builds link (evidence: `src/components/cart/CartDrawer.jsx`)
- Product details → WhatsApp link builder: builds link (evidence: `src/components/product/ProductDetailModal.jsx`)
- WhatsApp link builder → WhatsApp: opens chat (evidence: `src/utils/whatsapp.js`)
- Enquiry form → Form validation: validates input (evidence: `src/components/enquiry/EnquiryModal.jsx`)
- Quote cart → Persistent state hook: persists state (evidence: `src/context/CartContext.jsx`)
- Wishlist state → Persistent state hook: persists state (evidence: `src/context/WishlistContext.jsx`)
- Persistent state hook → Browser local storage: reads and writes (evidence: `src/hooks/useLocalStorage.js`)
- Quote cart → Toast feedback: shows feedback (evidence: `src/context/CartContext.jsx`)
- Wishlist state → Toast feedback: shows feedback (evidence: `src/context/WishlistContext.jsx`)
- Enquiry form → Toast feedback: shows feedback (evidence: `src/components/enquiry/EnquiryModal.jsx`)
- Catalog grid → Product catalog data: displays products
- Product details → Price formatting: formats prices (evidence: `src/components/product/ProductDetailModal.jsx`)
- WhatsApp link builder → Price formatting: formats currency (evidence: `src/utils/whatsapp.js`)
