# md-gulshan/foodie-ultimate-professional-v3 architecture

> Architecture diagram of the GitHub repository md-gulshan/foodie-ultimate-professional-v3, 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/md-gulshan/foodie-ultimate-professional-v3
- Repository: https://github.com/md-gulshan/foodie-ultimate-professional-v3

## Overview

Foodie is a browser-only food ordering and discovery frontend. The principal journey is restaurant/food discovery, adding items to a cart, checkout, and viewing confirmation, order history, or simulated tracking; account access gates some flows. The README also documents recommendations, mood discovery, combos, group-order simulation, rewards, voice search, offers, and regional foods. The excerpts show core behavior in js/script.js and regional dish data in js/state-foods.js; the small feature-named JS files explicitly defer to script.js. Several feature details and page wiring are documented but not sampled, so those relationships are not asserted here.

Main entry points: [`js/script.js`](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/js/script.js) (Browser Order and Cart State), [`checkout.html`](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/checkout.html) (Checkout), [`cart.html`](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/cart.html) (Cart), [`index.html`](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/index.html) (Home)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Food Discovery"]
  node_home["Home<br/>[index.html]"]
  node_restaurant_browse["Restaurant Browse<br/>[restaurants.html]"]
  node_restaurant_detail["Restaurant Detail"]
  node_regional_food["Regional Food<br/>[state-foods.html]"]
  node_regional_dataset["Regional Dish Data<br/>[state-foods.js]"]
  node_discovery_features["Discovery Features<br/>[script.js]"]
end

subgraph group_ordering["Ordering"]
  node_cart["Cart<br/>[cart.html]"]
  node_checkout["Checkout<br/>[checkout.html]"]
  node_offers["Offers<br/>[offers.html]"]
  node_order_record["Order History<br/>[orders.html]"]
  node_confirmation["Order Confirmation"]
end

subgraph group_account["Account and Delivery"]
  node_auth["Authentication<br/>[auth.js]"]
  node_login["Login and Signup<br/>[login.html]"]
  node_profile["Profile<br/>[profile.html]"]
  node_tracking["Delivery Tracking"]
end

subgraph group_runtime["Browser Runtime"]
  node_order_storage[("Browser Order and Cart State<br/>[script.js]")]
  node_app_runtime["Shared App Runtime<br/>[script.js]"]
end

node_customer(("Customer"))

node_customer -->|"browses"| node_home
node_home -->|"finds restaurants"| node_restaurant_browse
node_restaurant_browse -->|"opens listing"| node_restaurant_detail
node_restaurant_detail -->|"adds items"| node_cart
node_customer -->|"explores dishes"| node_regional_food
node_regional_food -.->|"uses dish catalog"| node_regional_dataset
node_customer -->|"uses discovery tools"| node_discovery_features
node_customer -->|"reviews cart"| node_cart
node_cart -->|"reads and updates"| node_order_storage
node_customer -->|"checks out"| node_checkout
node_checkout -->|"saves order"| node_order_storage
node_customer -->|"browses offers"| node_offers
node_customer -->|"signs in"| node_login
node_login -.->|"uses localStorage auth"| node_auth
node_customer -->|"views profile"| node_profile
node_customer -->|"reviews orders"| node_order_record
node_order_record -->|"reads history"| node_order_storage
node_checkout -->|"redirects after order"| node_confirmation
node_customer -->|"tracks delivery"| node_tracking
node_tracking -->|"reads order"| node_order_storage
node_app_runtime -->|"coordinates"| node_auth

click node_home "https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/index.html"
click node_restaurant_browse "https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/restaurants.html"
click node_restaurant_detail "https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/restaurant-details.html"
click node_regional_food "https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/state-foods.html"
click node_regional_dataset "https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/js/state-foods.js"
click node_discovery_features "https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/js/script.js"
click node_cart "https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/cart.html"
click node_checkout "https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/checkout.html"
click node_offers "https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/offers.html"
click node_order_record "https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/orders.html"
click node_confirmation "https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/order-confirmation.html"
click node_order_storage "https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/js/script.js"
click node_auth "https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/js/auth.js"
click node_login "https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/login.html"
click node_profile "https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/profile.html"
click node_tracking "https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/order-tracking.html"
click node_app_runtime "https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/js/script.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_home,node_restaurant_browse,node_restaurant_detail,node_regional_food,node_regional_dataset,node_discovery_features toneBlue
class node_cart,node_checkout,node_offers,node_order_record,node_confirmation toneAmber
class node_auth,node_login,node_profile,node_tracking toneMint
class node_order_storage,node_app_runtime toneRose
class node_customer toneIndigo
```

## Components

### Food Discovery

- [Home](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/index.html): `index.html`
- [Restaurant Browse](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/restaurants.html): `restaurants.html`
- [Restaurant Detail](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/restaurant-details.html): `restaurant-details.html`
- [Regional Food](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/state-foods.html): `state-foods.html`
- [Regional Dish Data](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/js/state-foods.js): `js/state-foods.js`
- [Discovery Features](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/js/script.js): `js/script.js`

### Ordering

- [Cart](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/cart.html): `cart.html`
- [Checkout](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/checkout.html): `checkout.html`
- [Offers](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/offers.html): `offers.html`
- [Order History](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/orders.html): `orders.html`
- [Order Confirmation](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/order-confirmation.html): `order-confirmation.html`

### Account and Delivery

- [Authentication](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/js/auth.js): `js/auth.js`
- [Login and Signup](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/login.html): `login.html`
- [Profile](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/profile.html): `profile.html`
- [Delivery Tracking](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/order-tracking.html): `order-tracking.html`

### Browser Runtime

- [Browser Order and Cart State](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/js/script.js): `js/script.js`
- [Shared App Runtime](https://github.com/md-gulshan/foodie-ultimate-professional-v3/blob/main/js/script.js): `js/script.js`

### Other components

- **Customer**

## Connections

- Customer → Home: browses (evidence: `README.md`)
- Home → Restaurant Browse: finds restaurants
- Restaurant Browse → Restaurant Detail: opens listing
- Restaurant Detail → Cart: adds items
- Customer → Regional Food: explores dishes (evidence: `README.md`)
- Regional Food → Regional Dish Data: uses dish catalog
- Customer → Discovery Features: uses discovery tools (evidence: `README.md`)
- Customer → Cart: reviews cart (evidence: `README.md`)
- Cart → Browser Order and Cart State: reads and updates (evidence: `js/script.js`)
- Customer → Checkout: checks out (evidence: `README.md`)
- Checkout → Browser Order and Cart State: saves order (evidence: `js/script.js`)
- Customer → Offers: browses offers (evidence: `README.md`)
- Customer → Login and Signup: signs in (evidence: `README.md`)
- Login and Signup → Authentication: uses localStorage auth
- Customer → Profile: views profile
- Customer → Order History: reviews orders (evidence: `README.md`)
- Order History → Browser Order and Cart State: reads history (evidence: `js/script.js`)
- Checkout → Order Confirmation: redirects after order
- Customer → Delivery Tracking: tracks delivery (evidence: `README.md`)
- Delivery Tracking → Browser Order and Cart State: reads order (evidence: `js/script.js`)
- Shared App Runtime → Authentication: coordinates (evidence: `js/auth.js`)
