# areebasaleem95/bakeryshop architecture

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

- Interactive diagram: https://gitdiagram.com/areebasaleem95/bakeryshop
- Repository: https://github.com/areebasaleem95/bakeryshop

## Overview

Sweet Crust is a bakery storefront: visitors browse the home page and menu, inspect products, add items to a persistent cart, then fill an order form and receive a local confirmation. The app also presents bakery story and contact information. The order flow is a client-side demo—its page explicitly says no real payment is collected, and no backend order service appears in the evidence. Edges reflect only shown imports, calls, and navigation; unsampled contact behavior is not inferred.

Main entry points: [`src/app/menu/page.tsx`](https://github.com/areebasaleem95/bakeryshop/blob/main/src/app/menu/page.tsx) (Menu browsing), [`src/components/cart-store.tsx`](https://github.com/areebasaleem95/bakeryshop/blob/main/src/components/cart-store.tsx) (Cart state), [`src/app/page.tsx`](https://github.com/areebasaleem95/bakeryshop/blob/main/src/app/page.tsx) (Home page), [`src/components/product-card.tsx`](https://github.com/areebasaleem95/bakeryshop/blob/main/src/components/product-card.tsx) (Product cards and details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_home["Home page<br/>[page.tsx]"]
  node_site_shell["Shared site shell<br/>[site-shell.tsx]"]
  node_site_chrome["Header, drawer, footer<br/>[site-chrome.tsx]"]
end

subgraph group_catalog["Product catalog"]
  node_menu["Menu browsing<br/>[page.tsx]"]
  node_products["Product data<br/>[products.ts]"]
  node_product_ui["Product cards and details<br/>[product-card.tsx]"]
end

subgraph group_cart["Cart and ordering"]
  node_cart_state["Cart state<br/>[cart-store.tsx]"]
  node_order["Order form and confirmation<br/>[page.tsx]"]
  node_price_format["Price formatting<br/>[utils.ts]"]
  node_browser_storage[("Browser local storage")]
end

subgraph group_story["Bakery information"]
  node_about["Bakery story<br/>[page.tsx]"]
  node_contact["Contact page<br/>[page.tsx]"]
end

node_visitor(("Shopper"))

node_visitor -->|"visits"| node_home
node_home -->|"renders"| node_product_ui
node_home -->|"links to"| node_menu
node_menu -->|"filters"| node_products
node_menu -->|"renders"| node_product_ui
node_product_ui -->|"updates"| node_cart_state
node_product_ui -->|"uses types"| node_products
node_site_shell -->|"provides"| node_cart_state
node_site_shell -->|"renders"| node_site_chrome
node_site_chrome -->|"reads and updates"| node_cart_state
node_site_chrome -->|"links to"| node_order
node_order -->|"reads and clears"| node_cart_state
node_order -->|"formats prices"| node_price_format
node_cart_state -->|"looks up products"| node_products
node_cart_state -->|"loads and saves"| node_browser_storage
node_visitor -->|"browses"| node_menu
node_visitor -->|"submits details"| node_order
node_visitor -->|"visits"| node_about
node_visitor -.->|"visits"| node_contact
node_home -->|"links to"| node_about
node_home -->|"links to"| node_contact
node_about -->|"links to"| node_menu
node_about -->|"links to"| node_contact
node_menu -->|"links to"| node_contact

click node_home "https://github.com/areebasaleem95/bakeryshop/blob/main/src/app/page.tsx"
click node_menu "https://github.com/areebasaleem95/bakeryshop/blob/main/src/app/menu/page.tsx"
click node_products "https://github.com/areebasaleem95/bakeryshop/blob/main/src/lib/products.ts"
click node_product_ui "https://github.com/areebasaleem95/bakeryshop/blob/main/src/components/product-card.tsx"
click node_cart_state "https://github.com/areebasaleem95/bakeryshop/blob/main/src/components/cart-store.tsx"
click node_site_shell "https://github.com/areebasaleem95/bakeryshop/blob/main/src/components/site-shell.tsx"
click node_site_chrome "https://github.com/areebasaleem95/bakeryshop/blob/main/src/components/site-chrome.tsx"
click node_order "https://github.com/areebasaleem95/bakeryshop/blob/main/src/app/order/page.tsx"
click node_price_format "https://github.com/areebasaleem95/bakeryshop/blob/main/src/lib/utils.ts"
click node_about "https://github.com/areebasaleem95/bakeryshop/blob/main/src/app/about/page.tsx"
click node_contact "https://github.com/areebasaleem95/bakeryshop/blob/main/src/app/contact/page.tsx"

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_home,node_site_shell,node_site_chrome toneBlue
class node_menu,node_products,node_product_ui toneAmber
class node_cart_state,node_order,node_price_format,node_browser_storage toneMint
class node_about,node_contact toneRose
class node_visitor toneIndigo
```

## Components

### Storefront

- [Home page](https://github.com/areebasaleem95/bakeryshop/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Shared site shell](https://github.com/areebasaleem95/bakeryshop/blob/main/src/components/site-shell.tsx): `src/components/site-shell.tsx`
- [Header, drawer, footer](https://github.com/areebasaleem95/bakeryshop/blob/main/src/components/site-chrome.tsx): `src/components/site-chrome.tsx`

### Product catalog

- [Menu browsing](https://github.com/areebasaleem95/bakeryshop/blob/main/src/app/menu/page.tsx): `src/app/menu/page.tsx`
- [Product data](https://github.com/areebasaleem95/bakeryshop/blob/main/src/lib/products.ts): `src/lib/products.ts`
- [Product cards and details](https://github.com/areebasaleem95/bakeryshop/blob/main/src/components/product-card.tsx): `src/components/product-card.tsx`

### Cart and ordering

- [Cart state](https://github.com/areebasaleem95/bakeryshop/blob/main/src/components/cart-store.tsx): `src/components/cart-store.tsx`
- [Order form and confirmation](https://github.com/areebasaleem95/bakeryshop/blob/main/src/app/order/page.tsx): `src/app/order/page.tsx`
- [Price formatting](https://github.com/areebasaleem95/bakeryshop/blob/main/src/lib/utils.ts): `src/lib/utils.ts`
- **Browser local storage**

### Bakery information

- [Bakery story](https://github.com/areebasaleem95/bakeryshop/blob/main/src/app/about/page.tsx): `src/app/about/page.tsx`
- [Contact page](https://github.com/areebasaleem95/bakeryshop/blob/main/src/app/contact/page.tsx): `src/app/contact/page.tsx`

### Other components

- **Shopper**

## Connections

- Shopper → Home page: visits (evidence: `src/app/page.tsx`)
- Home page → Product cards and details: renders (evidence: `src/app/page.tsx`)
- Home page → Menu browsing: links to (evidence: `src/app/page.tsx`)
- Menu browsing → Product data: filters (evidence: `src/app/menu/page.tsx`)
- Menu browsing → Product cards and details: renders (evidence: `src/app/menu/page.tsx`)
- Product cards and details → Cart state: updates (evidence: `src/components/product-card.tsx`)
- Product cards and details → Product data: uses types (evidence: `src/components/product-card.tsx`)
- Shared site shell → Cart state: provides (evidence: `src/components/site-shell.tsx`)
- Shared site shell → Header, drawer, footer: renders (evidence: `src/components/site-shell.tsx`)
- Header, drawer, footer → Cart state: reads and updates (evidence: `src/components/site-chrome.tsx`)
- Header, drawer, footer → Order form and confirmation: links to (evidence: `src/components/site-chrome.tsx`)
- Order form and confirmation → Cart state: reads and clears (evidence: `src/app/order/page.tsx`)
- Order form and confirmation → Price formatting: formats prices (evidence: `src/app/order/page.tsx`)
- Cart state → Product data: looks up products (evidence: `src/components/cart-store.tsx`)
- Cart state → Browser local storage: loads and saves (evidence: `src/components/cart-store.tsx`)
- Shopper → Menu browsing: browses (evidence: `src/app/menu/page.tsx`)
- Shopper → Order form and confirmation: submits details (evidence: `src/app/order/page.tsx`)
- Shopper → Bakery story: visits (evidence: `src/app/about/page.tsx`)
- Shopper → Contact page: visits
- Home page → Bakery story: links to (evidence: `src/app/page.tsx`)
- Home page → Contact page: links to (evidence: `src/app/page.tsx`)
- Bakery story → Menu browsing: links to (evidence: `src/app/about/page.tsx`)
- Bakery story → Contact page: links to (evidence: `src/app/about/page.tsx`)
- Menu browsing → Contact page: links to (evidence: `src/app/menu/page.tsx`)
