# okay-mahima/coffee_shop architecture

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

- Interactive diagram: https://gitdiagram.com/okay-mahima/coffee_shop
- Repository: https://github.com/okay-mahima/coffee_shop

## Overview

Cinder Coffee Roasters is a React coffee-shop storefront. Visitors browse featured items or filter the menu, add products to a cart, adjust quantities, and reach a simulated checkout; the cart persists in localStorage. Separate pages present the shop story and contact details/form, while shared reveal components provide scroll animations. Contact submission is local UI state, not a backend integration. The graph follows relationships visible in excerpts or documented by the README; unsampled page/component internals are not assumed.

Main entry points: [`src/App.jsx`](https://github.com/okay-mahima/coffee_shop/blob/main/src/App.jsx) (App and routing), [`src/pages/Home.jsx`](https://github.com/okay-mahima/coffee_shop/blob/main/src/pages/Home.jsx) (Home page), [`src/pages/Menu.jsx`](https://github.com/okay-mahima/coffee_shop/blob/main/src/pages/Menu.jsx) (Filtered menu), [`src/context/CartContext.jsx`](https://github.com/okay-mahima/coffee_shop/blob/main/src/context/CartContext.jsx) (Cart state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront experience"]
  node_app["App and routing<br/>[App.jsx]"]
  node_home["Home page<br/>[Home.jsx]"]
  node_about["About page<br/>[About.jsx]"]
  node_contact["Contact page<br/>[Contact.jsx]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_footer["Footer<br/>[Footer.jsx]"]
  node_hero["Home hero<br/>[Hero.jsx]"]
end

subgraph group_catalog["Menu and products"]
  node_menu["Filtered menu<br/>[Menu.jsx]"]
  node_catalogdata["Product catalog<br/>[products.js]"]
  node_productcard["Product card<br/>[ProductCard.jsx]"]
end

subgraph group_cart["Cart and checkout"]
  node_cartui["Cart drawer<br/>[CartDrawer.jsx]"]
  node_cartstate["Cart state<br/>[CartContext.jsx]"]
  node_localstorage[("Browser storage")]
end

subgraph group_shared["Shared presentation"]
  node_reveal["Reveal wrapper<br/>[Reveal.jsx]"]
  node_stagger["Staggered grid<br/>[StaggerGrid.jsx]"]
  node_revealhook["Visibility hook<br/>[useReveal.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens site"| node_app
node_app -->|"renders"| node_navbar
node_app -->|"renders"| node_footer
node_app -->|"renders"| node_cartui
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_menu
node_app -->|"routes to"| node_about
node_app -->|"routes to"| node_contact
node_home -->|"renders"| node_hero
node_home -->|"reads featured items"| node_catalogdata
node_home -->|"renders"| node_productcard
node_menu -->|"filters items"| node_catalogdata
node_menu -->|"renders"| node_productcard
node_productcard -->|"adds product"| node_cartstate
node_navbar -->|"reads cart"| node_cartstate
node_cartui -->|"uses cart actions"| node_cartstate
node_cartstate -->|"loads and persists"| node_localstorage
node_home -->|"wraps sections"| node_reveal
node_home -->|"renders grid"| node_stagger
node_menu -->|"renders grid"| node_stagger
node_menu -->|"uses wrapper"| node_reveal
node_contact -->|"wraps content"| node_reveal
node_reveal -->|"observes visibility"| node_revealhook
node_stagger -->|"observes visibility"| node_revealhook

click node_app "https://github.com/okay-mahima/coffee_shop/blob/main/src/App.jsx"
click node_home "https://github.com/okay-mahima/coffee_shop/blob/main/src/pages/Home.jsx"
click node_about "https://github.com/okay-mahima/coffee_shop/blob/main/src/pages/About.jsx"
click node_contact "https://github.com/okay-mahima/coffee_shop/blob/main/src/pages/Contact.jsx"
click node_navbar "https://github.com/okay-mahima/coffee_shop/blob/main/src/components/Navbar.jsx"
click node_footer "https://github.com/okay-mahima/coffee_shop/blob/main/src/components/Footer.jsx"
click node_hero "https://github.com/okay-mahima/coffee_shop/blob/main/src/components/Hero.jsx"
click node_menu "https://github.com/okay-mahima/coffee_shop/blob/main/src/pages/Menu.jsx"
click node_catalogdata "https://github.com/okay-mahima/coffee_shop/blob/main/src/data/products.js"
click node_productcard "https://github.com/okay-mahima/coffee_shop/blob/main/src/components/ProductCard.jsx"
click node_cartui "https://github.com/okay-mahima/coffee_shop/blob/main/src/components/CartDrawer.jsx"
click node_cartstate "https://github.com/okay-mahima/coffee_shop/blob/main/src/context/CartContext.jsx"
click node_reveal "https://github.com/okay-mahima/coffee_shop/blob/main/src/components/Reveal.jsx"
click node_stagger "https://github.com/okay-mahima/coffee_shop/blob/main/src/components/StaggerGrid.jsx"
click node_revealhook "https://github.com/okay-mahima/coffee_shop/blob/main/src/hooks/useReveal.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_home,node_about,node_contact,node_navbar,node_footer,node_hero toneBlue
class node_menu,node_catalogdata,node_productcard toneAmber
class node_cartui,node_cartstate,node_localstorage toneMint
class node_reveal,node_stagger,node_revealhook toneRose
class node_visitor toneIndigo
```

## Components

### Storefront experience

- [App and routing](https://github.com/okay-mahima/coffee_shop/blob/main/src/App.jsx): `src/App.jsx`
- [Home page](https://github.com/okay-mahima/coffee_shop/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [About page](https://github.com/okay-mahima/coffee_shop/blob/main/src/pages/About.jsx): `src/pages/About.jsx`
- [Contact page](https://github.com/okay-mahima/coffee_shop/blob/main/src/pages/Contact.jsx): `src/pages/Contact.jsx`
- [Navigation](https://github.com/okay-mahima/coffee_shop/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`
- [Footer](https://github.com/okay-mahima/coffee_shop/blob/main/src/components/Footer.jsx): `src/components/Footer.jsx`
- [Home hero](https://github.com/okay-mahima/coffee_shop/blob/main/src/components/Hero.jsx): `src/components/Hero.jsx`

### Menu and products

- [Filtered menu](https://github.com/okay-mahima/coffee_shop/blob/main/src/pages/Menu.jsx): `src/pages/Menu.jsx`
- [Product catalog](https://github.com/okay-mahima/coffee_shop/blob/main/src/data/products.js): `src/data/products.js`
- [Product card](https://github.com/okay-mahima/coffee_shop/blob/main/src/components/ProductCard.jsx): `src/components/ProductCard.jsx`

### Cart and checkout

- [Cart drawer](https://github.com/okay-mahima/coffee_shop/blob/main/src/components/CartDrawer.jsx): `src/components/CartDrawer.jsx`
- [Cart state](https://github.com/okay-mahima/coffee_shop/blob/main/src/context/CartContext.jsx): `src/context/CartContext.jsx`
- **Browser storage**

### Shared presentation

- [Reveal wrapper](https://github.com/okay-mahima/coffee_shop/blob/main/src/components/Reveal.jsx): `src/components/Reveal.jsx`
- [Staggered grid](https://github.com/okay-mahima/coffee_shop/blob/main/src/components/StaggerGrid.jsx): `src/components/StaggerGrid.jsx`
- [Visibility hook](https://github.com/okay-mahima/coffee_shop/blob/main/src/hooks/useReveal.js): `src/hooks/useReveal.js`

### Other components

- **Visitor**

## Connections

- Visitor → App and routing: opens site
- App and routing → Navigation: renders (evidence: `src/App.jsx`)
- App and routing → Footer: renders (evidence: `src/App.jsx`)
- App and routing → Cart drawer: renders (evidence: `src/App.jsx`)
- App and routing → Home page: routes to (evidence: `src/App.jsx`)
- App and routing → Filtered menu: routes to (evidence: `src/App.jsx`)
- App and routing → About page: routes to (evidence: `src/App.jsx`)
- App and routing → Contact page: routes to (evidence: `src/App.jsx`)
- Home page → Home hero: renders (evidence: `src/pages/Home.jsx`)
- Home page → Product catalog: reads featured items (evidence: `src/pages/Home.jsx`)
- Home page → Product card: renders (evidence: `src/pages/Home.jsx`)
- Filtered menu → Product catalog: filters items (evidence: `src/pages/Menu.jsx`)
- Filtered menu → Product card: renders (evidence: `src/pages/Menu.jsx`)
- Product card → Cart state: adds product (evidence: `src/components/ProductCard.jsx`)
- Navigation → Cart state: reads cart (evidence: `src/components/Navbar.jsx`)
- Cart drawer → Cart state: uses cart actions (evidence: `src/components/CartDrawer.jsx`)
- Cart state → Browser storage: loads and persists (evidence: `src/context/CartContext.jsx`)
- Home page → Reveal wrapper: wraps sections (evidence: `src/pages/Home.jsx`)
- Home page → Staggered grid: renders grid (evidence: `src/pages/Home.jsx`)
- Filtered menu → Staggered grid: renders grid (evidence: `src/pages/Menu.jsx`)
- Filtered menu → Reveal wrapper: uses wrapper (evidence: `src/pages/Menu.jsx`)
- Contact page → Reveal wrapper: wraps content (evidence: `src/pages/Contact.jsx`)
- Reveal wrapper → Visibility hook: observes visibility (evidence: `src/components/Reveal.jsx`)
- Staggered grid → Visibility hook: observes visibility (evidence: `src/components/StaggerGrid.jsx`)
