# svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype- architecture

> Architecture diagram of the GitHub repository svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-
- Repository: https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-

## Overview

Hunger Bites is a client-side restaurant ordering prototype with a customer portal and an administrative dashboard. Customers browse dishes and offers, build a persistent cart, and use a simulated checkout that clears the cart before navigating to order confirmation. Admins sign in and manage dashboard views for orders, menu, offers, customers, and analytics; the README also describes notifications. The sampled implementation shows mock data and browser-persisted state, not a backend order or payment service. Some admin features are represented by their exact page paths; their internal relationships are not inferred where source was unsampled.

Main entry points: [`lib/data.ts`](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/lib/data.ts) (Mock Restaurant Data), [`store/cartStore.ts`](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/store/cartStore.ts) (Cart State), [`lib/utils.ts`](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/lib/utils.ts) (Pricing & Utilities), [`app/checkout/page.tsx`](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/checkout/page.tsx) (Checkout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer Ordering"]
  node_home["Home Page<br/>[page.tsx]"]
  node_menu["Menu Browser<br/>[page.tsx]"]
  node_foodcard["Dish Cards<br/>[FoodCard.tsx]"]
  node_offers["Offers Hub<br/>[page.tsx]"]
  node_cartdrawer["Cart Drawer<br/>[CartDrawer.tsx]"]
  node_checkout["Checkout<br/>[page.tsx]"]
  node_confirmation["Order Confirmation<br/>[page.tsx]"]
end

subgraph group_admin["Administration"]
  node_login["Admin Login<br/>[page.tsx]"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_analytics["Analytics<br/>[page.tsx]"]
  node_orders["Order Manager<br/>[page.tsx]"]
  node_menuadmin["Menu Manager<br/>[page.tsx]"]
  node_offersadmin["Offers Manager<br/>[page.tsx]"]
  node_customers["Customer Manager<br/>[page.tsx]"]
  node_notifications["Notifications"]
end

subgraph group_state["Client State"]
  node_cartstate["Cart State<br/>[cartStore.ts]"]
  node_authstate["Auth State<br/>[authStore.ts]"]
  node_notificationstate["Notification State"]
end

subgraph group_domain["Shared Domain"]
  node_authlogic["Auth Logic<br/>[auth.ts]"]
  node_data["Mock Restaurant Data<br/>[data.ts]"]
  node_types["Domain Types<br/>[types.ts]"]
  node_utils["Pricing &amp; Utilities<br/>[utils.ts]"]
end

node_customer(("Customer"))
node_adminuser(("Admin User"))

node_home -->|"reads items"| node_data
node_menu -->|"reads menu"| node_data
node_menu -->|"renders dishes"| node_foodcard
node_foodcard -->|"updates cart"| node_cartstate
node_offers -->|"reads offers"| node_data
node_cartdrawer -->|"reads and updates"| node_cartstate
node_checkout -->|"reads and clears"| node_cartstate
node_checkout -->|"generates order ID"| node_utils
node_checkout -->|"navigates to"| node_confirmation
node_customer -.->|"opens"| node_home
node_adminuser -.->|"signs in"| node_login
node_login -->|"validates credentials"| node_authlogic
node_login -->|"updates session"| node_authstate
node_authstate -->|"uses token helpers"| node_authlogic
node_dashboard -->|"reads dashboard data"| node_data
node_menuadmin -->|"uses menu data"| node_data
node_offersadmin -->|"uses offer data"| node_data
node_orders -->|"uses order data"| node_data
node_analytics -->|"uses formatting"| node_utils
node_customers -->|"uses formatting"| node_utils
node_notifications -->|"reads notifications"| node_notificationstate
node_cartstate -->|"uses coupons"| node_data
node_cartstate -->|"calculates fees and tax"| node_utils
node_data -->|"types records"| node_types
node_cartstate -->|"types cart items"| node_types

click node_home "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/page.tsx"
click node_menu "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/menu/page.tsx"
click node_foodcard "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/components/FoodCard.tsx"
click node_offers "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/offers/page.tsx"
click node_cartdrawer "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/components/CartDrawer.tsx"
click node_checkout "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/checkout/page.tsx"
click node_confirmation "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/order-confirmation/page.tsx"
click node_login "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/admin/login/page.tsx"
click node_dashboard "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/admin/page.tsx"
click node_analytics "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/admin/analytics/page.tsx"
click node_orders "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/admin/orders/page.tsx"
click node_menuadmin "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/admin/menu/page.tsx"
click node_offersadmin "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/admin/offers/page.tsx"
click node_customers "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/admin/customers/page.tsx"
click node_notifications "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/components/admin/NotificationBell.tsx"
click node_cartstate "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/store/cartStore.ts"
click node_authstate "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/store/authStore.ts"
click node_notificationstate "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/store/notificationStore.ts"
click node_authlogic "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/lib/auth.ts"
click node_data "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/lib/data.ts"
click node_types "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/lib/types.ts"
click node_utils "https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/lib/utils.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_home,node_menu,node_foodcard,node_offers,node_cartdrawer,node_checkout,node_confirmation,node_adminuser toneBlue
class node_login,node_dashboard,node_analytics,node_orders,node_menuadmin,node_offersadmin,node_customers,node_notifications toneAmber
class node_cartstate,node_authstate,node_notificationstate toneMint
class node_authlogic,node_data,node_types,node_utils toneRose
class node_customer toneIndigo
```

## Components

### Customer Ordering

- [Home Page](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/page.tsx): `app/page.tsx`
- [Menu Browser](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/menu/page.tsx): `app/menu/page.tsx`
- [Dish Cards](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/components/FoodCard.tsx): `components/FoodCard.tsx`
- [Offers Hub](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/offers/page.tsx): `app/offers/page.tsx`
- [Cart Drawer](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/components/CartDrawer.tsx): `components/CartDrawer.tsx`
- [Checkout](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/checkout/page.tsx): `app/checkout/page.tsx`
- [Order Confirmation](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/order-confirmation/page.tsx): `app/order-confirmation/page.tsx`

### Administration

- [Admin Login](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/admin/login/page.tsx): `app/admin/login/page.tsx`
- [Dashboard](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/admin/page.tsx): `app/admin/page.tsx`
- [Analytics](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/admin/analytics/page.tsx): `app/admin/analytics/page.tsx`
- [Order Manager](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/admin/orders/page.tsx): `app/admin/orders/page.tsx`
- [Menu Manager](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/admin/menu/page.tsx): `app/admin/menu/page.tsx`
- [Offers Manager](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/admin/offers/page.tsx): `app/admin/offers/page.tsx`
- [Customer Manager](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/app/admin/customers/page.tsx): `app/admin/customers/page.tsx`
- [Notifications](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/components/admin/NotificationBell.tsx): `components/admin/NotificationBell.tsx`

### Client State

- [Cart State](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/store/cartStore.ts): `store/cartStore.ts`
- [Auth State](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/store/authStore.ts): `store/authStore.ts`
- [Notification State](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/store/notificationStore.ts): `store/notificationStore.ts`

### Shared Domain

- [Auth Logic](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/lib/auth.ts): `lib/auth.ts`
- [Mock Restaurant Data](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/lib/data.ts): `lib/data.ts`
- [Domain Types](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/lib/types.ts): `lib/types.ts`
- [Pricing & Utilities](https://github.com/svrkishore-glitch/restaurant-ordering-admin-dashboard-prototype-/blob/main/lib/utils.ts): `lib/utils.ts`

### Other components

- **Customer**
- **Admin User**

## Connections

- Home Page → Mock Restaurant Data: reads items (evidence: `app/page.tsx`)
- Menu Browser → Mock Restaurant Data: reads menu (evidence: `app/menu/page.tsx`)
- Menu Browser → Dish Cards: renders dishes (evidence: `app/menu/page.tsx`)
- Dish Cards → Cart State: updates cart (evidence: `components/FoodCard.tsx`)
- Offers Hub → Mock Restaurant Data: reads offers (evidence: `app/offers/page.tsx`)
- Cart Drawer → Cart State: reads and updates (evidence: `components/CartDrawer.tsx`)
- Checkout → Cart State: reads and clears (evidence: `app/checkout/page.tsx`)
- Checkout → Pricing & Utilities: generates order ID (evidence: `app/checkout/page.tsx`)
- Checkout → Order Confirmation: navigates to (evidence: `app/checkout/page.tsx`)
- Customer → Home Page: opens
- Admin User → Admin Login: signs in
- Admin Login → Auth Logic: validates credentials (evidence: `app/admin/login/page.tsx`)
- Admin Login → Auth State: updates session (evidence: `app/admin/login/page.tsx`)
- Auth State → Auth Logic: uses token helpers (evidence: `store/authStore.ts`)
- Dashboard → Mock Restaurant Data: reads dashboard data (evidence: `app/admin/page.tsx`)
- Menu Manager → Mock Restaurant Data: uses menu data (evidence: `app/admin/menu/page.tsx`)
- Offers Manager → Mock Restaurant Data: uses offer data (evidence: `app/admin/offers/page.tsx`)
- Order Manager → Mock Restaurant Data: uses order data (evidence: `app/admin/orders/page.tsx`)
- Analytics → Pricing & Utilities: uses formatting (evidence: `app/admin/analytics/page.tsx`)
- Customer Manager → Pricing & Utilities: uses formatting (evidence: `app/admin/customers/page.tsx`)
- Notifications → Notification State: reads notifications (evidence: `components/admin/NotificationBell.tsx`)
- Cart State → Mock Restaurant Data: uses coupons (evidence: `store/cartStore.ts`)
- Cart State → Pricing & Utilities: calculates fees and tax (evidence: `store/cartStore.ts`)
- Mock Restaurant Data → Domain Types: types records (evidence: `lib/data.ts`)
- Cart State → Domain Types: types cart items (evidence: `store/cartStore.ts`)
