# srinath-manivannan/week-8---anna-mess---crud architecture

> Architecture diagram of the GitHub repository srinath-manivannan/week-8---anna-mess---crud, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/srinath-manivannan/week-8---anna-mess---crud
- Repository: https://github.com/srinath-manivannan/week-8---anna-mess---crud

## Overview

Anna Mess is a small React teaching project presented as a tiffin-shop SPA. The browser entry mounts App, which owns shop-wide state, filters the menu data, and renders the shop’s status, dish cards, login, stock, cart and order form; child callbacks update parent state. Cart also updates the browser tab title, while cards use shared GST/total helpers. The README documents these product features; only a subset of component source was excerpted, so omitted component-call details are not inferred beyond App’s visible imports and render structure.

Main entry points: [`src/App.jsx`](https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/App.jsx) (Shop state and page), [`src/components/DishCard.jsx`](https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/DishCard.jsx) (Dish cards), [`src/main.jsx`](https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/main.jsx) (React entry), [`src/components/ShopStatus.jsx`](https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/ShopStatus.jsx) (Shop status)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Shop application"]
  node_entry["React entry<br/>[main.jsx]"]
  node_app["Shop state and page<br/>[App.jsx]"]
end

subgraph group_domain["Shop features"]
  node_menu["Dish menu data<br/>[dishes.js]"]
  node_status["Shop status<br/>[ShopStatus.jsx]"]
  node_filter["Vegetarian toggle<br/>[VegToggle.jsx]"]
  node_dish["Dish cards<br/>[DishCard.jsx]"]
  node_counter["Token counter<br/>[TokenCounter.jsx]"]
  node_login["Owner login<br/>[LoginPanel.jsx]"]
  node_stock["Stock checklist<br/>[StockList.jsx]"]
  node_cart["Cart and title<br/>[Cart.jsx]"]
  node_order["Order form<br/>[OrderForm.jsx]"]
  node_header["Shop header<br/>[Header.jsx]"]
  node_footer["Menu count footer<br/>[Footer.jsx]"]
end

subgraph group_logic["Shared logic"]
  node_helpers["Price helpers<br/>[helper.js]"]
end

node_customer(("Shop visitor"))

node_customer -->|"opens app"| node_entry
node_entry -->|"mounts"| node_app
node_app -->|"reads menu"| node_menu
node_app -->|"renders"| node_status
node_app -->|"renders"| node_filter
node_app -->|"renders cards"| node_dish
node_app -->|"renders"| node_counter
node_app -->|"renders"| node_login
node_app -->|"conditionally renders"| node_stock
node_app -->|"renders"| node_cart
node_app -->|"renders"| node_order
node_app -->|"renders"| node_header
node_app -->|"renders"| node_footer
node_dish -->|"calculates prices"| node_helpers
node_customer -.->|"toggles shutter"| node_status
node_customer -.->|"filters menu"| node_filter
node_customer -.->|"adds dish"| node_dish
node_customer -.->|"logs in"| node_login
node_customer -.->|"manages cart"| node_cart
node_customer -.->|"places order"| node_order

click node_entry "https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/main.jsx"
click node_app "https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/App.jsx"
click node_menu "https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/data/dishes.js"
click node_status "https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/ShopStatus.jsx"
click node_filter "https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/VegToggle.jsx"
click node_dish "https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/DishCard.jsx"
click node_counter "https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/TokenCounter.jsx"
click node_login "https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/LoginPanel.jsx"
click node_stock "https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/StockList.jsx"
click node_cart "https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/Cart.jsx"
click node_order "https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/OrderForm.jsx"
click node_header "https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/Header.jsx"
click node_footer "https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/Footer.jsx"
click node_helpers "https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/utils/helper.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_entry,node_app toneBlue
class node_menu,node_status,node_filter,node_dish,node_counter,node_login,node_stock,node_cart,node_order,node_header,node_footer toneAmber
class node_helpers toneMint
class node_customer toneIndigo
```

## Components

### Shop application

- [React entry](https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/main.jsx): `src/main.jsx`
- [Shop state and page](https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/App.jsx): `src/App.jsx`

### Shop features

- [Dish menu data](https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/data/dishes.js): `src/data/dishes.js`
- [Shop status](https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/ShopStatus.jsx): `src/components/ShopStatus.jsx`
- [Vegetarian toggle](https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/VegToggle.jsx): `src/components/VegToggle.jsx`
- [Dish cards](https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/DishCard.jsx): `src/components/DishCard.jsx`
- [Token counter](https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/TokenCounter.jsx): `src/components/TokenCounter.jsx`
- [Owner login](https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/LoginPanel.jsx): `src/components/LoginPanel.jsx`
- [Stock checklist](https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/StockList.jsx): `src/components/StockList.jsx`
- [Cart and title](https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/Cart.jsx): `src/components/Cart.jsx`
- [Order form](https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/OrderForm.jsx): `src/components/OrderForm.jsx`
- [Shop header](https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/Header.jsx): `src/components/Header.jsx`
- [Menu count footer](https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/components/Footer.jsx): `src/components/Footer.jsx`

### Shared logic

- [Price helpers](https://github.com/srinath-manivannan/week-8---anna-mess---crud/blob/main/src/utils/helper.js): `src/utils/helper.js`

### Other components

- **Shop visitor**

## Connections

- Shop visitor → React entry: opens app (evidence: `README.md`)
- React entry → Shop state and page: mounts (evidence: `src/main.jsx`)
- Shop state and page → Dish menu data: reads menu (evidence: `src/App.jsx`)
- Shop state and page → Shop status: renders (evidence: `src/App.jsx`)
- Shop state and page → Vegetarian toggle: renders (evidence: `src/App.jsx`)
- Shop state and page → Dish cards: renders cards (evidence: `src/App.jsx`)
- Shop state and page → Token counter: renders (evidence: `src/App.jsx`)
- Shop state and page → Owner login: renders (evidence: `src/App.jsx`)
- Shop state and page → Stock checklist: conditionally renders (evidence: `src/App.jsx`)
- Shop state and page → Cart and title: renders (evidence: `src/App.jsx`)
- Shop state and page → Order form: renders (evidence: `src/App.jsx`)
- Shop state and page → Shop header: renders (evidence: `src/App.jsx`)
- Shop state and page → Menu count footer: renders (evidence: `src/App.jsx`)
- Dish cards → Price helpers: calculates prices (evidence: `src/components/DishCard.jsx`)
- Shop visitor → Shop status: toggles shutter
- Shop visitor → Vegetarian toggle: filters menu
- Shop visitor → Dish cards: adds dish
- Shop visitor → Owner login: logs in
- Shop visitor → Cart and title: manages cart
- Shop visitor → Order form: places order
