# narengupta84/indiakitchen architecture

> Architecture diagram of the GitHub repository narengupta84/indiakitchen, 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/narengupta84/indiakitchen
- Repository: https://github.com/narengupta84/indiakitchen

## Overview

India Kitchen is a static, vanilla-JavaScript food-ordering SPA. A customer browses and filters a JSON-backed menu, adjusts a cart, and submits an order through WhatsApp. The controller handles menu loading, targeted menu updates, cart totals, and checkout; HTML and CSS provide the interface and presentation. The README documents the flying-cart animation and configuration options. The supplied source excerpt is partial, so some feature connections below rely on README statements rather than inspected implementation.

Main entry points: [`app.js`](https://github.com/narengupta84/indiakitchen/blob/main/app.js) (Cart state), [`index.html`](https://github.com/narengupta84/indiakitchen/blob/main/index.html) (Ordering page), [`style.css`](https://github.com/narengupta84/indiakitchen/blob/main/style.css) (Responsive styling), [`menu.json`](https://github.com/narengupta84/indiakitchen/blob/main/menu.json) (Menu dataset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Menu experience"]
  node_page["Ordering page<br/>[index.html]"]
  node_presentation["Responsive styling<br/>[style.css]"]
  node_cart_animation["Flying cart animation<br/>[app.js]"]
end

subgraph group_ordering["Cart and checkout"]
  node_cart_state["Cart state<br/>[app.js]"]
  node_cart_display["Cart display and totals<br/>[app.js]"]
  node_checkout["Order checkout<br/>[app.js]"]
end

subgraph group_content["App content"]
  node_menu_loading["Menu loading<br/>[app.js]"]
  node_menu_data["Menu dataset<br/>[menu.json]"]
  node_menu_browsing["Menu browsing<br/>[app.js]"]
  node_menu_filtering["Menu filtering<br/>[app.js]"]
end

node_customer(("Customer"))
node_whatsapp["WhatsApp"]

node_customer -->|"uses"| node_page
node_page -->|"styled by"| node_presentation
node_page -->|"starts app"| node_menu_loading
node_menu_loading -->|"fetches"| node_menu_data
node_menu_loading -->|"renders"| node_menu_browsing
node_customer -->|"selects filters"| node_menu_filtering
node_menu_filtering -->|"filters"| node_menu_browsing
node_menu_browsing -->|"animates add"| node_cart_animation
node_cart_animation -->|"adds item"| node_cart_state
node_customer -->|"changes quantity"| node_cart_state
node_cart_state -->|"updates"| node_cart_display
node_cart_state -->|"updates buttons"| node_menu_browsing
node_customer -->|"submits order"| node_checkout
node_checkout -->|"sends order"| node_whatsapp

click node_page "https://github.com/narengupta84/indiakitchen/blob/main/index.html"
click node_presentation "https://github.com/narengupta84/indiakitchen/blob/main/style.css"
click node_menu_loading "https://github.com/narengupta84/indiakitchen/blob/main/app.js"
click node_menu_data "https://github.com/narengupta84/indiakitchen/blob/main/menu.json"
click node_menu_browsing "https://github.com/narengupta84/indiakitchen/blob/main/app.js"
click node_menu_filtering "https://github.com/narengupta84/indiakitchen/blob/main/app.js"
click node_cart_animation "https://github.com/narengupta84/indiakitchen/blob/main/app.js"
click node_cart_state "https://github.com/narengupta84/indiakitchen/blob/main/app.js"
click node_cart_display "https://github.com/narengupta84/indiakitchen/blob/main/app.js"
click node_checkout "https://github.com/narengupta84/indiakitchen/blob/main/app.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_page,node_presentation,node_cart_animation toneBlue
class node_cart_state,node_cart_display,node_checkout toneAmber
class node_menu_loading,node_menu_data,node_menu_browsing,node_menu_filtering toneMint
class node_customer,node_whatsapp toneIndigo
```

## Components

### Menu experience

- [Ordering page](https://github.com/narengupta84/indiakitchen/blob/main/index.html): `index.html`
- [Responsive styling](https://github.com/narengupta84/indiakitchen/blob/main/style.css): `style.css`
- [Flying cart animation](https://github.com/narengupta84/indiakitchen/blob/main/app.js): `app.js`

### Cart and checkout

- [Cart state](https://github.com/narengupta84/indiakitchen/blob/main/app.js): `app.js`
- [Cart display and totals](https://github.com/narengupta84/indiakitchen/blob/main/app.js): `app.js`
- [Order checkout](https://github.com/narengupta84/indiakitchen/blob/main/app.js): `app.js`

### App content

- [Menu loading](https://github.com/narengupta84/indiakitchen/blob/main/app.js): `app.js`
- [Menu dataset](https://github.com/narengupta84/indiakitchen/blob/main/menu.json): `menu.json`
- [Menu browsing](https://github.com/narengupta84/indiakitchen/blob/main/app.js): `app.js`
- [Menu filtering](https://github.com/narengupta84/indiakitchen/blob/main/app.js): `app.js`

### Other components

- **Customer**
- **WhatsApp**

## Connections

- Customer → Ordering page: uses (evidence: `README.md`)
- Ordering page → Responsive styling: styled by (evidence: `README.md`)
- Ordering page → Menu loading: starts app (evidence: `README.md`)
- Menu loading → Menu dataset: fetches (evidence: `app.js`)
- Menu loading → Menu browsing: renders (evidence: `app.js`)
- Customer → Menu filtering: selects filters (evidence: `README.md`)
- Menu filtering → Menu browsing: filters (evidence: `app.js`)
- Menu browsing → Flying cart animation: animates add (evidence: `app.js`)
- Flying cart animation → Cart state: adds item (evidence: `app.js`)
- Customer → Cart state: changes quantity (evidence: `app.js`)
- Cart state → Cart display and totals: updates (evidence: `app.js`)
- Cart state → Menu browsing: updates buttons (evidence: `app.js`)
- Customer → Order checkout: submits order (evidence: `README.md`)
- Order checkout → WhatsApp: sends order (evidence: `README.md`)
