# madhumithra-r/creme-and-crust architecture

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

- Interactive diagram: https://gitdiagram.com/madhumithra-r/creme-and-crust
- Repository: https://github.com/madhumithra-r/creme-and-crust

## Overview

Crème & Crust is a bakery storefront implemented as a client-side React application. Customers browse featured products or the shop, view product details, add items to a shared cart, and proceed through a simulated checkout to an order confirmation. The app also includes bakery information and contact pages. Cart state and order details persist in browser local storage. The README is empty; unsampled page behavior is represented only where the source index identifies its imports, so the graph omits uncertain integrations and operational details.

Main entry points: [`src/App.jsx`](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/App.jsx) (Route Shell), [`src/data/products.js`](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/data/products.js) (Product Data), [`src/context/CartContext.jsx`](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/context/CartContext.jsx) (Cart State), [`src/components/Button.jsx`](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/components/Button.jsx) (Button)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application Shell"]
  node_app["Route Shell<br/>[App.jsx]"]
  node_about["About Page<br/>[About.jsx]"]
  node_contact["Contact Page<br/>[Contact.jsx]"]
end

subgraph group_catalog["Bakery Catalog"]
  node_home["Home<br/>[Home.jsx]"]
  node_shop["Shop<br/>[Shop.jsx]"]
  node_product_details["Product Details<br/>[ProductDetails.jsx]"]
  node_product_data["Product Data<br/>[products.js]"]
end

subgraph group_commerce["Cart and Checkout"]
  node_cart["Cart Page<br/>[Cart.jsx]"]
  node_checkout["Checkout<br/>[Checkout.jsx]"]
  node_order_success["Order Confirmation<br/>[OrderSuccess.jsx]"]
  node_cart_state["Cart State<br/>[CartContext.jsx]"]
  node_cart_storage[("Browser Storage")]
end

subgraph group_shared["Shared UI and Content"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_footer["Footer<br/>[Footer.jsx]"]
  node_toast["Cart Notifications<br/>[Toast.jsx]"]
  node_product_card["Product Card<br/>[ProductCard.jsx]"]
  node_category_card["Category Card<br/>[CategoryCard.jsx]"]
  node_cart_item["Cart Item<br/>[CartItem.jsx]"]
  node_button["Button<br/>[Button.jsx]"]
end

node_customer(("Customer"))

node_customer -->|"opens storefront"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_shop
node_app -->|"routes to"| node_product_details
node_app -->|"routes to"| node_cart
node_app -->|"routes to"| node_checkout
node_app -->|"routes to"| node_order_success
node_app -->|"routes to"| node_about
node_app -->|"routes to"| node_contact
node_app -->|"renders"| node_navbar
node_app -->|"renders"| node_footer
node_app -->|"renders"| node_toast
node_home -->|"reads catalog"| node_product_data
node_home -->|"renders products"| node_product_card
node_home -->|"renders categories"| node_category_card
node_shop -->|"reads catalog"| node_product_data
node_shop -->|"renders products"| node_product_card
node_product_details -->|"reads product"| node_product_data
node_product_details -->|"renders related products"| node_product_card
node_product_card -->|"adds item"| node_cart_state
node_product_card -->|"uses image fallback"| node_product_data
node_navbar -->|"reads cart count"| node_cart_state
node_navbar -->|"reads categories"| node_product_data
node_cart -->|"reads and updates"| node_cart_state
node_cart -->|"renders entries"| node_cart_item
node_cart_item -->|"updates item"| node_cart_state
node_cart_item -->|"uses product data"| node_product_data
node_checkout -->|"reads cart and saves order"| node_cart_state
node_checkout -->|"uses product data"| node_product_data
node_order_success -->|"reads saved order"| node_cart_state
node_order_success -->|"uses product data"| node_product_data
node_cart_state -->|"persists cart and order"| node_cart_storage
node_toast -->|"reads notification state"| node_cart_state
node_footer -->|"reads bakery content"| node_product_data
node_about -->|"reads bakery content"| node_product_data
node_contact -->|"uses controls"| node_button
node_home -->|"uses controls"| node_button
node_about -->|"uses controls"| node_button
node_checkout -->|"uses controls"| node_button
node_cart -->|"uses controls"| node_button
node_product_details -->|"uses controls"| node_button
node_shop -->|"uses controls"| node_button
node_order_success -->|"uses controls"| node_button

click node_app "https://github.com/madhumithra-r/creme-and-crust/blob/main/src/App.jsx"
click node_home "https://github.com/madhumithra-r/creme-and-crust/blob/main/src/pages/Home.jsx"
click node_shop "https://github.com/madhumithra-r/creme-and-crust/blob/main/src/pages/Shop.jsx"
click node_product_details "https://github.com/madhumithra-r/creme-and-crust/blob/main/src/pages/ProductDetails.jsx"
click node_product_data "https://github.com/madhumithra-r/creme-and-crust/blob/main/src/data/products.js"
click node_cart "https://github.com/madhumithra-r/creme-and-crust/blob/main/src/pages/Cart.jsx"
click node_checkout "https://github.com/madhumithra-r/creme-and-crust/blob/main/src/pages/Checkout.jsx"
click node_order_success "https://github.com/madhumithra-r/creme-and-crust/blob/main/src/pages/OrderSuccess.jsx"
click node_cart_state "https://github.com/madhumithra-r/creme-and-crust/blob/main/src/context/CartContext.jsx"
click node_navbar "https://github.com/madhumithra-r/creme-and-crust/blob/main/src/components/Navbar.jsx"
click node_footer "https://github.com/madhumithra-r/creme-and-crust/blob/main/src/components/Footer.jsx"
click node_toast "https://github.com/madhumithra-r/creme-and-crust/blob/main/src/components/Toast.jsx"
click node_product_card "https://github.com/madhumithra-r/creme-and-crust/blob/main/src/components/ProductCard.jsx"
click node_category_card "https://github.com/madhumithra-r/creme-and-crust/blob/main/src/components/CategoryCard.jsx"
click node_cart_item "https://github.com/madhumithra-r/creme-and-crust/blob/main/src/components/CartItem.jsx"
click node_button "https://github.com/madhumithra-r/creme-and-crust/blob/main/src/components/Button.jsx"
click node_about "https://github.com/madhumithra-r/creme-and-crust/blob/main/src/pages/About.jsx"
click node_contact "https://github.com/madhumithra-r/creme-and-crust/blob/main/src/pages/Contact.jsx"

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_about,node_contact toneBlue
class node_home,node_shop,node_product_details,node_product_data toneAmber
class node_cart,node_checkout,node_order_success,node_cart_state,node_cart_storage toneMint
class node_navbar,node_footer,node_toast,node_product_card,node_category_card,node_cart_item,node_button toneRose
class node_customer toneIndigo
```

## Components

### Application Shell

- [Route Shell](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/App.jsx): `src/App.jsx`
- [About Page](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/pages/About.jsx): `src/pages/About.jsx`
- [Contact Page](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/pages/Contact.jsx): `src/pages/Contact.jsx`

### Bakery Catalog

- [Home](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Shop](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/pages/Shop.jsx): `src/pages/Shop.jsx`
- [Product Details](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/pages/ProductDetails.jsx): `src/pages/ProductDetails.jsx`
- [Product Data](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/data/products.js): `src/data/products.js`

### Cart and Checkout

- [Cart Page](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/pages/Cart.jsx): `src/pages/Cart.jsx`
- [Checkout](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/pages/Checkout.jsx): `src/pages/Checkout.jsx`
- [Order Confirmation](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/pages/OrderSuccess.jsx): `src/pages/OrderSuccess.jsx`
- [Cart State](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/context/CartContext.jsx): `src/context/CartContext.jsx`
- **Browser Storage**

### Shared UI and Content

- [Navigation](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`
- [Footer](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/components/Footer.jsx): `src/components/Footer.jsx`
- [Cart Notifications](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/components/Toast.jsx): `src/components/Toast.jsx`
- [Product Card](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/components/ProductCard.jsx): `src/components/ProductCard.jsx`
- [Category Card](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/components/CategoryCard.jsx): `src/components/CategoryCard.jsx`
- [Cart Item](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/components/CartItem.jsx): `src/components/CartItem.jsx`
- [Button](https://github.com/madhumithra-r/creme-and-crust/blob/main/src/components/Button.jsx): `src/components/Button.jsx`

### Other components

- **Customer**

## Connections

- Customer → Route Shell: opens storefront
- Route Shell → Home: routes to (evidence: `src/App.jsx`)
- Route Shell → Shop: routes to (evidence: `src/App.jsx`)
- Route Shell → Product Details: routes to (evidence: `src/App.jsx`)
- Route Shell → Cart Page: routes to (evidence: `src/App.jsx`)
- Route Shell → Checkout: routes to (evidence: `src/App.jsx`)
- Route Shell → Order Confirmation: routes to (evidence: `src/App.jsx`)
- Route Shell → About Page: routes to (evidence: `src/App.jsx`)
- Route Shell → Contact Page: routes to (evidence: `src/App.jsx`)
- Route Shell → Navigation: renders (evidence: `src/App.jsx`)
- Route Shell → Footer: renders (evidence: `src/App.jsx`)
- Route Shell → Cart Notifications: renders (evidence: `src/App.jsx`)
- Home → Product Data: reads catalog (evidence: `src/pages/Home.jsx`)
- Home → Product Card: renders products (evidence: `src/pages/Home.jsx`)
- Home → Category Card: renders categories (evidence: `src/pages/Home.jsx`)
- Shop → Product Data: reads catalog (evidence: `src/pages/Shop.jsx`)
- Shop → Product Card: renders products (evidence: `src/pages/Shop.jsx`)
- Product Details → Product Data: reads product (evidence: `src/pages/ProductDetails.jsx`)
- Product Details → Product Card: renders related products (evidence: `src/pages/ProductDetails.jsx`)
- Product Card → Cart State: adds item (evidence: `src/components/ProductCard.jsx`)
- Product Card → Product Data: uses image fallback (evidence: `src/components/ProductCard.jsx`)
- Navigation → Cart State: reads cart count (evidence: `src/components/Navbar.jsx`)
- Navigation → Product Data: reads categories (evidence: `src/components/Navbar.jsx`)
- Cart Page → Cart State: reads and updates (evidence: `src/pages/Cart.jsx`)
- Cart Page → Cart Item: renders entries (evidence: `src/pages/Cart.jsx`)
- Cart Item → Cart State: updates item (evidence: `src/components/CartItem.jsx`)
- Cart Item → Product Data: uses product data (evidence: `src/components/CartItem.jsx`)
- Checkout → Cart State: reads cart and saves order (evidence: `src/pages/Checkout.jsx`)
- Checkout → Product Data: uses product data (evidence: `src/pages/Checkout.jsx`)
- Order Confirmation → Cart State: reads saved order (evidence: `src/pages/OrderSuccess.jsx`)
- Order Confirmation → Product Data: uses product data (evidence: `src/pages/OrderSuccess.jsx`)
- Cart State → Browser Storage: persists cart and order (evidence: `src/context/CartContext.jsx`)
- Cart Notifications → Cart State: reads notification state (evidence: `src/components/Toast.jsx`)
- Footer → Product Data: reads bakery content (evidence: `src/components/Footer.jsx`)
- About Page → Product Data: reads bakery content (evidence: `src/pages/About.jsx`)
- Contact Page → Button: uses controls (evidence: `src/pages/Contact.jsx`)
- Home → Button: uses controls (evidence: `src/pages/Home.jsx`)
- About Page → Button: uses controls (evidence: `src/pages/About.jsx`)
- Checkout → Button: uses controls (evidence: `src/pages/Checkout.jsx`)
- Cart Page → Button: uses controls (evidence: `src/pages/Cart.jsx`)
- Product Details → Button: uses controls (evidence: `src/pages/ProductDetails.jsx`)
- Shop → Button: uses controls (evidence: `src/pages/Shop.jsx`)
- Order Confirmation → Button: uses controls (evidence: `src/pages/OrderSuccess.jsx`)
