# suhassuhas4120/thoogudeepa-enterprise-suite architecture

> Architecture diagram of the GitHub repository suhassuhas4120/thoogudeepa-enterprise-suite, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/suhassuhas4120/thoogudeepa-enterprise-suite
- Repository: https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite

## Overview

Thoogudeepa is a dine-in restaurant operations suite: guests order and pay by table QR while waiter, captain, and kitchen portals coordinate seating, service, and preparation; managers oversee floor and cash operations. Its shared state layer synchronizes operational data across clients and Supabase. The README documents portal capabilities, while sampled source confirms selected store, query-hook, and API relationships; other portal-to-endpoint wiring is not established by the excerpts.

Main entry points: [`app/page.tsx`](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/page.tsx) (Customer portal), [`store/useSharedBridge.ts`](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/store/useSharedBridge.ts) (Shared operations bridge), [`lib/supabase.ts`](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/lib/supabase.ts) (Supabase client), [`app/waiter/tablet/page.tsx`](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/waiter/tablet/page.tsx) (Captain tablet)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_guest["Guest ordering"]
  node_customer_portal["Customer portal<br/>[page.tsx]"]
  node_menu["Menu catalog<br/>[menuItems.ts]"]
  node_customer_state["Customer state"]
  node_order_tracking["Order tracking"]
  node_qr_deck["Table QR deck<br/>[page.tsx]"]
end

subgraph group_floor["Floor service"]
  node_waiter_mobile["Waiter handheld<br/>[page.tsx]"]
  node_waiter_tablet["Captain tablet<br/>[page.tsx]"]
  node_waiter_state["Waiter state<br/>[useWaiterStore.ts]"]
  node_waiter_query["Floor feed query<br/>[useWaiterQuery.ts]"]
end

subgraph group_kitchen["Kitchen operations"]
  node_kitchen_portal["Kitchen display<br/>[page.tsx]"]
  node_kitchen_state["Kitchen state<br/>[useKitchenStore.ts]"]
end

subgraph group_management["Management"]
  node_manager_portal["Manager portal<br/>[page.tsx]"]
  node_manager_state["Manager operations state<br/>[useManagerStore.ts]"]
end

subgraph group_platform["Shared platform"]
  node_payment_api["Payment services<br/>[route.ts]"]
  node_receipt_api["Receipt delivery<br/>[route.ts]"]
  node_qr_verify["QR session verification<br/>[route.ts]"]
  node_kds_api["KDS ticket actions<br/>[route.ts]"]
  node_bridge["Shared operations bridge<br/>[useSharedBridge.ts]"]
  node_bridge_sync["Bridge synchronization<br/>[useBridgeSync.ts]"]
  node_supabase["Supabase client<br/>[supabase.ts]"]
  node_database[("Supabase database")]
  node_seat_api["Table seating API<br/>[route.ts]"]
  node_vacate_api["Table vacancy API<br/>[route.ts]"]
end

node_guest_actor(("Dine-in guest"))

node_guest_actor -->|"orders through"| node_customer_portal
node_customer_portal -->|"shows catalog"| node_menu
node_customer_portal -->|"reads state"| node_customer_state
node_customer_portal -->|"tracks orders"| node_order_tracking
node_customer_portal -.->|"initiates payment"| node_payment_api
node_customer_portal -.->|"requests receipt"| node_receipt_api
node_guest_actor -->|"scans table QR"| node_qr_deck
node_customer_portal -.->|"verifies session"| node_qr_verify
node_waiter_mobile -.->|"reads floor feed"| node_waiter_query
node_waiter_query -->|"reads tables, pings"| node_bridge
node_waiter_tablet -->|"reads floor state"| node_bridge
node_waiter_tablet -->|"reads captain state"| node_waiter_state
node_waiter_tablet -.->|"seats guests"| node_seat_api
node_kitchen_portal -->|"uses kitchen state"| node_kitchen_state
node_bridge -->|"posts item bump"| node_kds_api
node_manager_portal -->|"uses manager state"| node_manager_state
node_bridge -->|"posts seating"| node_seat_api
node_bridge_sync -.->|"synchronizes state"| node_bridge
node_bridge -->|"reads and writes"| node_supabase
node_supabase -.->|"accesses data"| node_database
node_qr_verify -->|"queries sessions"| node_supabase
node_qr_verify -->|"checks orders and tables"| node_database
node_vacate_api -->|"updates vacancy"| node_supabase

click node_customer_portal "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/page.tsx"
click node_menu "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/data/menuItems.ts"
click node_customer_state "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/store/useCustomerStore.ts"
click node_order_tracking "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/hooks/useOrderTrackingQuery.ts"
click node_payment_api "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/api/payments/initiate/route.ts"
click node_receipt_api "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/api/receipts/send/route.ts"
click node_qr_deck "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/qr-deck/page.tsx"
click node_qr_verify "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/api/session/verify/route.ts"
click node_waiter_mobile "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/waiter/mobile/page.tsx"
click node_waiter_tablet "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/waiter/tablet/page.tsx"
click node_waiter_state "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/store/useWaiterStore.ts"
click node_waiter_query "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/hooks/useWaiterQuery.ts"
click node_kitchen_portal "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/kitchen/page.tsx"
click node_kitchen_state "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/store/useKitchenStore.ts"
click node_kds_api "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/api/kds/bump-item/route.ts"
click node_manager_portal "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/manager/page.tsx"
click node_manager_state "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/store/useManagerStore.ts"
click node_bridge "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/store/useSharedBridge.ts"
click node_bridge_sync "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/hooks/useBridgeSync.ts"
click node_supabase "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/lib/supabase.ts"
click node_seat_api "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/api/tables/seat/route.ts"
click node_vacate_api "https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/api/tables/vacate/route.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_customer_portal,node_menu,node_customer_state,node_order_tracking,node_qr_deck toneBlue
class node_waiter_mobile,node_waiter_tablet,node_waiter_state,node_waiter_query toneAmber
class node_kitchen_portal,node_kitchen_state toneMint
class node_manager_portal,node_manager_state toneRose
class node_payment_api,node_receipt_api,node_qr_verify,node_kds_api,node_bridge,node_bridge_sync,node_supabase,node_database,node_seat_api,node_vacate_api,node_guest_actor toneIndigo
```

## Components

### Guest ordering

- [Customer portal](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/page.tsx): `app/page.tsx`
- [Menu catalog](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/data/menuItems.ts): `data/menuItems.ts`
- [Customer state](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/store/useCustomerStore.ts): `store/useCustomerStore.ts`
- [Order tracking](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/hooks/useOrderTrackingQuery.ts): `hooks/useOrderTrackingQuery.ts`
- [Table QR deck](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/qr-deck/page.tsx): `app/qr-deck/page.tsx`

### Floor service

- [Waiter handheld](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/waiter/mobile/page.tsx): `app/waiter/mobile/page.tsx`
- [Captain tablet](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/waiter/tablet/page.tsx): `app/waiter/tablet/page.tsx`
- [Waiter state](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/store/useWaiterStore.ts): `store/useWaiterStore.ts`
- [Floor feed query](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/hooks/useWaiterQuery.ts): `hooks/useWaiterQuery.ts`

### Kitchen operations

- [Kitchen display](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/kitchen/page.tsx): `app/kitchen/page.tsx`
- [Kitchen state](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/store/useKitchenStore.ts): `store/useKitchenStore.ts`

### Management

- [Manager portal](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/manager/page.tsx): `app/manager/page.tsx`
- [Manager operations state](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/store/useManagerStore.ts): `store/useManagerStore.ts`

### Shared platform

- [Payment services](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/api/payments/initiate/route.ts): `app/api/payments/initiate/route.ts`
- [Receipt delivery](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/api/receipts/send/route.ts): `app/api/receipts/send/route.ts`
- [QR session verification](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/api/session/verify/route.ts): `app/api/session/verify/route.ts`
- [KDS ticket actions](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/api/kds/bump-item/route.ts): `app/api/kds/bump-item/route.ts`
- [Shared operations bridge](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/store/useSharedBridge.ts): `store/useSharedBridge.ts`
- [Bridge synchronization](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/hooks/useBridgeSync.ts): `hooks/useBridgeSync.ts`
- [Supabase client](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/lib/supabase.ts): `lib/supabase.ts`
- **Supabase database**
- [Table seating API](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/api/tables/seat/route.ts): `app/api/tables/seat/route.ts`
- [Table vacancy API](https://github.com/suhassuhas4120/thoogudeepa-enterprise-suite/blob/main/app/api/tables/vacate/route.ts): `app/api/tables/vacate/route.ts`

### Other components

- **Dine-in guest**

## Connections

- Dine-in guest → Customer portal: orders through (evidence: `README.md`)
- Customer portal → Menu catalog: shows catalog
- Customer portal → Customer state: reads state (evidence: `app/page.tsx`)
- Customer portal → Order tracking: tracks orders (evidence: `hooks/useOrderTrackingQuery.ts`)
- Customer portal → Payment services: initiates payment (evidence: `README.md`)
- Customer portal → Receipt delivery: requests receipt (evidence: `README.md`)
- Dine-in guest → Table QR deck: scans table QR (evidence: `README.md`)
- Customer portal → QR session verification: verifies session (evidence: `app/api/session/verify/route.ts`)
- Waiter handheld → Floor feed query: reads floor feed (evidence: `hooks/useWaiterQuery.ts`)
- Floor feed query → Shared operations bridge: reads tables, pings (evidence: `hooks/useWaiterQuery.ts`)
- Captain tablet → Shared operations bridge: reads floor state (evidence: `app/waiter/tablet/page.tsx`)
- Captain tablet → Waiter state: reads captain state (evidence: `app/waiter/tablet/page.tsx`)
- Captain tablet → Table seating API: seats guests (evidence: `README.md`)
- Kitchen display → Kitchen state: uses kitchen state (evidence: `app/kitchen/page.tsx`)
- Shared operations bridge → KDS ticket actions: posts item bump (evidence: `store/useSharedBridge.ts`)
- Manager portal → Manager operations state: uses manager state (evidence: `app/manager/page.tsx`)
- Shared operations bridge → Table seating API: posts seating (evidence: `store/useSharedBridge.ts`)
- Bridge synchronization → Shared operations bridge: synchronizes state (evidence: `README.md`)
- Shared operations bridge → Supabase client: reads and writes (evidence: `store/useSharedBridge.ts`)
- Supabase client → Supabase database: accesses data (evidence: `README.md`)
- QR session verification → Supabase client: queries sessions (evidence: `app/api/session/verify/route.ts`)
- QR session verification → Supabase database: checks orders and tables (evidence: `app/api/session/verify/route.ts`)
- Table vacancy API → Supabase client: updates vacancy (evidence: `app/api/tables/vacate/route.ts`)
