# p0ll-png/foodherons architecture

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

- Interactive diagram: https://gitdiagram.com/p0ll-png/foodherons
- Repository: https://github.com/p0ll-png/foodherons

## Overview

Food Herons is a React frontend for campus vendor discovery and cash-on-pickup pre-orders. Its main flow is directory search/filter → vendor menu → shared cart → order review and placement → status tracking; a separate vendor dashboard presents demo order, menu, profile, and pre-order controls. The README documents these capabilities, while sampled code confirms client-side routing and mock data. No backend calls or durable order submission are shown, so those relationships are omitted.

Main entry points: [`src/App.jsx`](https://github.com/p0ll-png/foodherons/blob/main/src/App.jsx) (Route shell), [`src/components/Icon.jsx`](https://github.com/p0ll-png/foodherons/blob/main/src/components/Icon.jsx) (SVG icons), [`src/pages/VendorStore.jsx`](https://github.com/p0ll-png/foodherons/blob/main/src/pages/VendorStore.jsx) (Vendor store), [`src/pages/Dashboard.jsx`](https://github.com/p0ll-png/foodherons/blob/main/src/pages/Dashboard.jsx) (Vendor dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["Route shell<br/>[App.jsx]"]
  node_header["Header navigation<br/>[Header.jsx]"]
  node_footer["Footer links<br/>[Footer.jsx]"]
  node_not_found["Not found page<br/>[NotFound.jsx]"]
end

subgraph group_discovery["Vendor discovery"]
  node_home["Vendor directory<br/>[Home.jsx]"]
  node_vendor_card["Vendor preview<br/>[VendorCard.jsx]"]
  node_vendor_data["Mock vendors and menus<br/>[vendors.js]"]
end

subgraph group_ordering["Pre-order flow"]
  node_store["Vendor store<br/>[VendorStore.jsx]"]
  node_cart["Cart review<br/>[Cart.jsx]"]
  node_order_status["Order tracking<br/>[OrderStatus.jsx]"]
end

subgraph group_vendor["Vendor tools"]
  node_dashboard["Vendor dashboard<br/>[Dashboard.jsx]"]
  node_login["Login stub<br/>[Login.jsx]"]
  node_signup["Signup stub<br/>[Signup.jsx]"]
end

subgraph group_shared["Shared state"]
  node_cart_state["Cart state<br/>[CartContext.jsx]"]
  node_theme["Theme preference<br/>[ThemeContext.jsx]"]
  node_mascot["Heron mascot<br/>[HeronMascot.jsx]"]
  node_blobs["Decorative blobs<br/>[BlobField.jsx]"]
  node_icons["SVG icons<br/>[Icon.jsx]"]
end

node_student(("Student"))
node_vendor_actor(("Vendor user"))

node_student -->|"opens app"| node_app
node_vendor_actor -->|"opens app"| node_app
node_app -->|"routes /"| node_home
node_app -->|"routes vendor"| node_store
node_app -->|"routes cart"| node_cart
node_app -->|"routes order"| node_order_status
node_app -->|"routes dashboard"| node_dashboard
node_app -->|"routes login"| node_login
node_app -->|"routes signup"| node_signup
node_app -->|"routes fallback"| node_not_found
node_app -->|"renders"| node_header
node_app -->|"renders"| node_footer
node_app -->|"provides theme"| node_theme
node_app -->|"provides cart"| node_cart_state
node_header -->|"toggles"| node_theme
node_header -->|"reads count"| node_cart_state
node_home -->|"filters vendors"| node_vendor_data
node_home -->|"renders results"| node_vendor_card
node_vendor_card -->|"reads category"| node_vendor_data
node_store -->|"loads vendor"| node_vendor_data
node_store -->|"adds items"| node_cart_state
node_store -->|"renders missing vendor"| node_not_found
node_cart -->|"reads and updates"| node_cart_state
node_cart -->|"loads vendor details"| node_vendor_data
node_cart -.->|"places order"| node_order_status
node_dashboard -->|"loads demo vendor"| node_vendor_data
node_dashboard -.->|"updates order status"| node_order_status
node_login -->|"renders"| node_blobs
node_signup -->|"renders"| node_blobs
node_header -->|"renders"| node_icons
node_header -->|"renders"| node_mascot
node_vendor_card -->|"renders"| node_icons
node_vendor_card -->|"renders"| node_mascot
node_store -->|"renders"| node_icons
node_store -->|"renders"| node_mascot
node_dashboard -->|"renders"| node_icons
node_dashboard -->|"renders"| node_mascot
node_home -->|"renders"| node_blobs
node_home -->|"renders"| node_icons
node_cart -->|"renders"| node_icons
node_order_status -->|"renders"| node_icons
node_signup -->|"renders"| node_icons
node_dashboard -->|"supports tools"| node_vendor_actor

click node_app "https://github.com/p0ll-png/foodherons/blob/main/src/App.jsx"
click node_header "https://github.com/p0ll-png/foodherons/blob/main/src/components/Header.jsx"
click node_footer "https://github.com/p0ll-png/foodherons/blob/main/src/components/Footer.jsx"
click node_home "https://github.com/p0ll-png/foodherons/blob/main/src/pages/Home.jsx"
click node_vendor_card "https://github.com/p0ll-png/foodherons/blob/main/src/components/VendorCard.jsx"
click node_vendor_data "https://github.com/p0ll-png/foodherons/blob/main/src/data/vendors.js"
click node_store "https://github.com/p0ll-png/foodherons/blob/main/src/pages/VendorStore.jsx"
click node_cart "https://github.com/p0ll-png/foodherons/blob/main/src/pages/Cart.jsx"
click node_cart_state "https://github.com/p0ll-png/foodherons/blob/main/src/context/CartContext.jsx"
click node_order_status "https://github.com/p0ll-png/foodherons/blob/main/src/pages/OrderStatus.jsx"
click node_dashboard "https://github.com/p0ll-png/foodherons/blob/main/src/pages/Dashboard.jsx"
click node_login "https://github.com/p0ll-png/foodherons/blob/main/src/pages/Login.jsx"
click node_signup "https://github.com/p0ll-png/foodherons/blob/main/src/pages/Signup.jsx"
click node_theme "https://github.com/p0ll-png/foodherons/blob/main/src/context/ThemeContext.jsx"
click node_not_found "https://github.com/p0ll-png/foodherons/blob/main/src/pages/NotFound.jsx"
click node_mascot "https://github.com/p0ll-png/foodherons/blob/main/src/components/HeronMascot.jsx"
click node_blobs "https://github.com/p0ll-png/foodherons/blob/main/src/components/BlobField.jsx"
click node_icons "https://github.com/p0ll-png/foodherons/blob/main/src/components/Icon.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_header,node_footer,node_not_found,node_vendor_actor toneBlue
class node_home,node_vendor_card,node_vendor_data toneAmber
class node_store,node_cart,node_order_status toneMint
class node_dashboard,node_login,node_signup toneRose
class node_cart_state,node_theme,node_mascot,node_blobs,node_icons,node_student toneIndigo
```

## Components

### App navigation

- [Route shell](https://github.com/p0ll-png/foodherons/blob/main/src/App.jsx): `src/App.jsx`
- [Header navigation](https://github.com/p0ll-png/foodherons/blob/main/src/components/Header.jsx): `src/components/Header.jsx`
- [Footer links](https://github.com/p0ll-png/foodherons/blob/main/src/components/Footer.jsx): `src/components/Footer.jsx`
- [Not found page](https://github.com/p0ll-png/foodherons/blob/main/src/pages/NotFound.jsx): `src/pages/NotFound.jsx`

### Vendor discovery

- [Vendor directory](https://github.com/p0ll-png/foodherons/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Vendor preview](https://github.com/p0ll-png/foodherons/blob/main/src/components/VendorCard.jsx): `src/components/VendorCard.jsx`
- [Mock vendors and menus](https://github.com/p0ll-png/foodherons/blob/main/src/data/vendors.js): `src/data/vendors.js`

### Pre-order flow

- [Vendor store](https://github.com/p0ll-png/foodherons/blob/main/src/pages/VendorStore.jsx): `src/pages/VendorStore.jsx`
- [Cart review](https://github.com/p0ll-png/foodherons/blob/main/src/pages/Cart.jsx): `src/pages/Cart.jsx`
- [Order tracking](https://github.com/p0ll-png/foodherons/blob/main/src/pages/OrderStatus.jsx): `src/pages/OrderStatus.jsx`

### Vendor tools

- [Vendor dashboard](https://github.com/p0ll-png/foodherons/blob/main/src/pages/Dashboard.jsx): `src/pages/Dashboard.jsx`
- [Login stub](https://github.com/p0ll-png/foodherons/blob/main/src/pages/Login.jsx): `src/pages/Login.jsx`
- [Signup stub](https://github.com/p0ll-png/foodherons/blob/main/src/pages/Signup.jsx): `src/pages/Signup.jsx`

### Shared state

- [Cart state](https://github.com/p0ll-png/foodherons/blob/main/src/context/CartContext.jsx): `src/context/CartContext.jsx`
- [Theme preference](https://github.com/p0ll-png/foodherons/blob/main/src/context/ThemeContext.jsx): `src/context/ThemeContext.jsx`
- [Heron mascot](https://github.com/p0ll-png/foodherons/blob/main/src/components/HeronMascot.jsx): `src/components/HeronMascot.jsx`
- [Decorative blobs](https://github.com/p0ll-png/foodherons/blob/main/src/components/BlobField.jsx): `src/components/BlobField.jsx`
- [SVG icons](https://github.com/p0ll-png/foodherons/blob/main/src/components/Icon.jsx): `src/components/Icon.jsx`

### Other components

- **Student**
- **Vendor user**

## Connections

- Student → Route shell: opens app (evidence: `README.md`)
- Vendor user → Route shell: opens app (evidence: `README.md`)
- Route shell → Vendor directory: routes / (evidence: `src/App.jsx`)
- Route shell → Vendor store: routes vendor (evidence: `src/App.jsx`)
- Route shell → Cart review: routes cart (evidence: `src/App.jsx`)
- Route shell → Order tracking: routes order (evidence: `src/App.jsx`)
- Route shell → Vendor dashboard: routes dashboard (evidence: `src/App.jsx`)
- Route shell → Login stub: routes login (evidence: `src/App.jsx`)
- Route shell → Signup stub: routes signup (evidence: `src/App.jsx`)
- Route shell → Not found page: routes fallback (evidence: `src/App.jsx`)
- Route shell → Header navigation: renders (evidence: `src/App.jsx`)
- Route shell → Footer links: renders (evidence: `src/App.jsx`)
- Route shell → Theme preference: provides theme (evidence: `src/App.jsx`)
- Route shell → Cart state: provides cart (evidence: `src/App.jsx`)
- Header navigation → Theme preference: toggles (evidence: `src/components/Header.jsx`)
- Header navigation → Cart state: reads count (evidence: `src/components/Header.jsx`)
- Vendor directory → Mock vendors and menus: filters vendors (evidence: `src/pages/Home.jsx`)
- Vendor directory → Vendor preview: renders results (evidence: `src/pages/Home.jsx`)
- Vendor preview → Mock vendors and menus: reads category (evidence: `src/components/VendorCard.jsx`)
- Vendor store → Mock vendors and menus: loads vendor (evidence: `src/pages/VendorStore.jsx`)
- Vendor store → Cart state: adds items (evidence: `src/pages/VendorStore.jsx`)
- Vendor store → Not found page: renders missing vendor (evidence: `src/pages/VendorStore.jsx`)
- Cart review → Cart state: reads and updates (evidence: `src/pages/Cart.jsx`)
- Cart review → Mock vendors and menus: loads vendor details (evidence: `src/pages/Cart.jsx`)
- Cart review → Order tracking: places order (evidence: `README.md`)
- Vendor dashboard → Mock vendors and menus: loads demo vendor (evidence: `src/pages/Dashboard.jsx`)
- Vendor dashboard → Order tracking: updates order status (evidence: `README.md`)
- Login stub → Decorative blobs: renders (evidence: `src/pages/Login.jsx`)
- Signup stub → Decorative blobs: renders (evidence: `src/pages/Signup.jsx`)
- Header navigation → SVG icons: renders (evidence: `src/components/Header.jsx`)
- Header navigation → Heron mascot: renders (evidence: `src/components/Header.jsx`)
- Vendor preview → SVG icons: renders (evidence: `src/components/VendorCard.jsx`)
- Vendor preview → Heron mascot: renders (evidence: `src/components/VendorCard.jsx`)
- Vendor store → SVG icons: renders (evidence: `src/pages/VendorStore.jsx`)
- Vendor store → Heron mascot: renders (evidence: `src/pages/VendorStore.jsx`)
- Vendor dashboard → SVG icons: renders (evidence: `src/pages/Dashboard.jsx`)
- Vendor dashboard → Heron mascot: renders (evidence: `src/pages/Dashboard.jsx`)
- Vendor directory → Decorative blobs: renders (evidence: `src/pages/Home.jsx`)
- Vendor directory → SVG icons: renders (evidence: `src/pages/Home.jsx`)
- Cart review → SVG icons: renders (evidence: `src/pages/Cart.jsx`)
- Order tracking → SVG icons: renders (evidence: `src/pages/OrderStatus.jsx`)
- Signup stub → SVG icons: renders (evidence: `src/pages/Signup.jsx`)
- Vendor dashboard → Vendor user: supports tools (evidence: `README.md`)
