# aelagondaeshwarteja/spicy-biryani-restaurant-website architecture

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

- Interactive diagram: https://gitdiagram.com/aelagondaeshwarteja/spicy-biryani-restaurant-website
- Repository: https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website

## Overview

This is a restaurant ordering website: customers browse biryanis, add items to a shared cart, check out, then track an order; staff use an admin view to review orders and change status. The UI also presents restaurant information and contact details, item nutrition, and cart-level AI nutrition insights. Supabase supports order persistence and admin updates, while the nutrition function is called directly by the assistant. The README gives no further capability details; links to unsampled email/SMS functions are omitted because no shown source or documentation establishes their invocation.

Main entry points: [`src/App.tsx`](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/App.tsx) (App router), [`src/components/Checkout.tsx`](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/Checkout.tsx) (Checkout), [`src/lib/supabase.ts`](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/lib/supabase.ts) (Supabase client), [`src/components/Menu.tsx`](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/Menu.tsx) (Biryani menu)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer ordering"]
  node_app["App router<br/>[App.tsx]"]
  node_menu["Biryani menu<br/>[Menu.tsx]"]
  node_restaurant["Restaurant information<br/>[About.tsx]"]
  node_contact["Contact details<br/>[Contact.tsx]"]
  node_cart["Shopping cart<br/>[Cart.tsx]"]
end

subgraph group_order["Order operations"]
  node_checkout["Checkout<br/>[Checkout.tsx]"]
  node_tracking["Order tracking<br/>[OrderTracking.tsx]"]
  node_adminlogin["Admin sign-in<br/>[AdminLogin.tsx]"]
  node_admin["Order administration<br/>[AdminDashboard.tsx]"]
end

subgraph group_nutrition["Nutrition insights"]
  node_nutritioninfo["Item nutrition<br/>[NutritionInfo.tsx]"]
  node_assistant["AI health assistant"]
  node_nutritionfn["Nutrition analysis<br/>[index.ts]"]
end

subgraph group_platform["Shared services"]
  node_cartstate["Cart state<br/>[CartContext.tsx]"]
  node_ordersdb[("Order database")]
  node_supabase["Supabase client<br/>[supabase.ts]"]
  node_order_types["Order and menu types<br/>[order.ts]"]
end

node_customer(("Restaurant visitor"))

node_customer -->|"uses"| node_app
node_app -->|"renders"| node_menu
node_app -->|"renders"| node_restaurant
node_app -->|"renders"| node_contact
node_app -->|"opens"| node_cart
node_app -->|"opens"| node_checkout
node_app -->|"opens"| node_tracking
node_app -->|"routes"| node_adminlogin
node_app -->|"renders"| node_admin
node_menu -->|"adds items"| node_cartstate
node_cart -->|"updates"| node_cartstate
node_cart -->|"opens"| node_assistant
node_cart -->|"starts checkout"| node_checkout
node_menu -->|"shows details"| node_nutritioninfo
node_checkout -->|"reads and clears"| node_cartstate
node_checkout -->|"writes orders"| node_supabase
node_supabase -.->|"persists orders"| node_ordersdb
node_tracking -->|"looks up orders"| node_supabase
node_admin -->|"reads and updates"| node_supabase
node_supabase -.->|"accesses orders"| node_ordersdb
node_assistant -->|"requests analysis"| node_nutritionfn
node_menu -->|"uses item type"| node_order_types
node_checkout -->|"uses order types"| node_order_types
node_tracking -->|"uses order types"| node_order_types
node_cartstate -->|"uses cart types"| node_order_types

click node_app "https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/App.tsx"
click node_menu "https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/Menu.tsx"
click node_restaurant "https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/About.tsx"
click node_contact "https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/Contact.tsx"
click node_cart "https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/Cart.tsx"
click node_cartstate "https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/context/CartContext.tsx"
click node_checkout "https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/Checkout.tsx"
click node_tracking "https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/OrderTracking.tsx"
click node_adminlogin "https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/AdminLogin.tsx"
click node_admin "https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/AdminDashboard.tsx"
click node_ordersdb "https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/supabase/migrations/20251004050546_create_orders_schema.sql"
click node_supabase "https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/lib/supabase.ts"
click node_nutritioninfo "https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/NutritionInfo.tsx"
click node_assistant "https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/HealthAssistant.tsx"
click node_nutritionfn "https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/supabase/functions/nutrition-ai-analysis/index.ts"
click node_order_types "https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/types/order.ts"

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_menu,node_restaurant,node_contact,node_cart toneBlue
class node_checkout,node_tracking,node_adminlogin,node_admin toneAmber
class node_nutritioninfo,node_assistant,node_nutritionfn toneMint
class node_cartstate,node_ordersdb,node_supabase,node_order_types toneRose
class node_customer toneIndigo
```

## Components

### Customer ordering

- [App router](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/App.tsx): `src/App.tsx`
- [Biryani menu](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/Menu.tsx): `src/components/Menu.tsx`
- [Restaurant information](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/About.tsx): `src/components/About.tsx`
- [Contact details](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/Contact.tsx): `src/components/Contact.tsx`
- [Shopping cart](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/Cart.tsx): `src/components/Cart.tsx`

### Order operations

- [Checkout](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/Checkout.tsx): `src/components/Checkout.tsx`
- [Order tracking](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/OrderTracking.tsx): `src/components/OrderTracking.tsx`
- [Admin sign-in](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/AdminLogin.tsx): `src/components/AdminLogin.tsx`
- [Order administration](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/AdminDashboard.tsx): `src/components/AdminDashboard.tsx`

### Nutrition insights

- [Item nutrition](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/NutritionInfo.tsx): `src/components/NutritionInfo.tsx`
- [AI health assistant](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/components/HealthAssistant.tsx): `src/components/HealthAssistant.tsx`
- [Nutrition analysis](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/supabase/functions/nutrition-ai-analysis/index.ts): `supabase/functions/nutrition-ai-analysis/index.ts`

### Shared services

- [Cart state](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/context/CartContext.tsx): `src/context/CartContext.tsx`
- [Order database](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/supabase/migrations/20251004050546_create_orders_schema.sql): `supabase/migrations/20251004050546_create_orders_schema.sql`
- [Supabase client](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- [Order and menu types](https://github.com/aelagondaeshwarteja/spicy-biryani-restaurant-website/blob/main/src/types/order.ts): `src/types/order.ts`

### Other components

- **Restaurant visitor**

## Connections

- Restaurant visitor → App router: uses
- App router → Biryani menu: renders (evidence: `src/App.tsx`)
- App router → Restaurant information: renders (evidence: `src/App.tsx`)
- App router → Contact details: renders (evidence: `src/App.tsx`)
- App router → Shopping cart: opens (evidence: `src/App.tsx`)
- App router → Checkout: opens (evidence: `src/App.tsx`)
- App router → Order tracking: opens (evidence: `src/App.tsx`)
- App router → Admin sign-in: routes (evidence: `src/App.tsx`)
- App router → Order administration: renders (evidence: `src/App.tsx`)
- Biryani menu → Cart state: adds items (evidence: `src/components/Menu.tsx`)
- Shopping cart → Cart state: updates (evidence: `src/components/Cart.tsx`)
- Shopping cart → AI health assistant: opens (evidence: `src/components/Cart.tsx`)
- Shopping cart → Checkout: starts checkout (evidence: `src/App.tsx`)
- Biryani menu → Item nutrition: shows details (evidence: `src/components/Menu.tsx`)
- Checkout → Cart state: reads and clears (evidence: `src/components/Checkout.tsx`)
- Checkout → Supabase client: writes orders (evidence: `src/components/Checkout.tsx`)
- Supabase client → Order database: persists orders
- Order tracking → Supabase client: looks up orders (evidence: `src/components/OrderTracking.tsx`)
- Order administration → Supabase client: reads and updates (evidence: `src/components/AdminDashboard.tsx`)
- Supabase client → Order database: accesses orders
- AI health assistant → Nutrition analysis: requests analysis (evidence: `src/components/HealthAssistant.tsx`)
- Biryani menu → Order and menu types: uses item type (evidence: `src/components/Menu.tsx`)
- Checkout → Order and menu types: uses order types (evidence: `src/components/Checkout.tsx`)
- Order tracking → Order and menu types: uses order types (evidence: `src/components/OrderTracking.tsx`)
- Cart state → Order and menu types: uses cart types (evidence: `src/context/CartContext.tsx`)
