# 11monther33-cell/menu-ai architecture

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

- Interactive diagram: https://gitdiagram.com/11monther33-cell/menu-ai
- Repository: https://github.com/11monther33-cell/menu-ai

## Overview

VISIONO is a restaurant-management and customer-facing digital-menu platform, with separate funnel, TableX, and iOS capture applications in the repository. The main customer workflow is opening a public menu, browsing dishes, and using its cart or 3D viewing features; restaurant users manage menus, branches, and POS operations through a dashboard. Authentication and admin tools support those workflows, while WhatsApp automation and 3D/AR capture are distinct capabilities. Edges rely on the App, PublicMenu, auth, POS, and iOS excerpts or indexed references; unsampled service wiring is not inferred.

Main entry points: [`src/pages/restaurant/Dashboard.tsx`](https://github.com/11monther33-cell/menu-ai/blob/main/src/pages/restaurant/Dashboard.tsx) (Restaurant dashboard), [`src/App.tsx`](https://github.com/11monther33-cell/menu-ai/blob/main/src/App.tsx) (Web app router), [`src/pages/PublicMenu.tsx`](https://github.com/11monther33-cell/menu-ai/blob/main/src/pages/PublicMenu.tsx) (Public menu), [`src/hooks/useAuth.ts`](https://github.com/11monther33-cell/menu-ai/blob/main/src/hooks/useAuth.ts) (User authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer Menu"]
  node_publicmenu["Public menu<br/>[PublicMenu.tsx]"]
  node_cart["Menu cart<br/>[MenuCartSheet.tsx]"]
  node_chat["AI menu chat<br/>[AIChatDrawer.tsx]"]
end

subgraph group_restaurant["Restaurant Operations"]
  node_dashboard["Restaurant dashboard<br/>[Dashboard.tsx]"]
  node_menubuilder["Menu management<br/>[MenuBuilder.tsx]"]
  node_dishform["Dish editing<br/>[DishFormPage.tsx]"]
  node_branches["Branch management<br/>[POSBranches.tsx]"]
  node_pos["POS operations<br/>[posService.ts]"]
  node_whatsapp["WhatsApp sales"]
end

subgraph group_platform["Platform Services"]
  node_app["Web app router<br/>[App.tsx]"]
  node_auth["User authentication<br/>[useAuth.ts]"]
  node_staff["Staff sessions<br/>[useStaffSession.ts]"]
  node_admin["Admin dashboard<br/>[Dashboard.tsx]"]
  node_supabase[("Supabase service<br/>[supabase.ts]")]
  node_storage["Asset storage<br/>[storage.ts]"]
  node_whatsappservice["WhatsApp service<br/>[whatsappService.ts]"]
  node_supabasefunctions["WhatsApp webhook<br/>[index.ts]"]
end

subgraph group_immersive["3D And Capture"]
  node_viewer["3D dish viewer"]
  node_ioscapture["iOS capture"]
  node_capturefiles["Capture files"]
  node_iosapi["iOS API client<br/>[APIClient.swift]"]
end

subgraph group_adjacent["Other Applications"]
  node_funnel["Funnel application<br/>[App.tsx]"]
  node_tablex["TableX API routes<br/>[apiRoutes.ts]"]
end

node_customer(("Menu visitor"))
node_restaurantuser(("Restaurant user"))

node_customer -->|"opens"| node_app
node_app -->|"routes to"| node_publicmenu
node_restaurantuser -->|"opens"| node_app
node_app -->|"routes to"| node_dashboard
node_dashboard -->|"loads"| node_menubuilder
node_dashboard -->|"loads"| node_dishform
node_dashboard -->|"loads"| node_branches
node_dashboard -->|"loads"| node_whatsapp
node_publicmenu -->|"renders"| node_cart
node_publicmenu -->|"renders"| node_chat
node_publicmenu -->|"renders"| node_viewer
node_auth -->|"reads profile"| node_supabase
node_pos -->|"reads and writes"| node_supabase
node_dashboard -->|"uses"| node_auth
node_dashboard -->|"uses"| node_staff
node_admin -->|"uses"| node_auth
node_whatsappservice -->|"uses"| node_supabase
node_ioscapture -->|"stores captures"| node_capturefiles
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_staff
node_funnel -.->|"serves entry"| node_customer

click node_app "https://github.com/11monther33-cell/menu-ai/blob/main/src/App.tsx"
click node_publicmenu "https://github.com/11monther33-cell/menu-ai/blob/main/src/pages/PublicMenu.tsx"
click node_cart "https://github.com/11monther33-cell/menu-ai/blob/main/src/components/menu/MenuCartSheet.tsx"
click node_chat "https://github.com/11monther33-cell/menu-ai/blob/main/src/components/qr/AIChatDrawer.tsx"
click node_viewer "https://github.com/11monther33-cell/menu-ai/blob/main/src/components/3d/ThreeDViewerFull.tsx"
click node_dashboard "https://github.com/11monther33-cell/menu-ai/blob/main/src/pages/restaurant/Dashboard.tsx"
click node_menubuilder "https://github.com/11monther33-cell/menu-ai/blob/main/src/pages/restaurant/pages/MenuBuilder.tsx"
click node_dishform "https://github.com/11monther33-cell/menu-ai/blob/main/src/pages/restaurant/pages/DishFormPage.tsx"
click node_branches "https://github.com/11monther33-cell/menu-ai/blob/main/src/pages/restaurant/pages/POSBranches.tsx"
click node_pos "https://github.com/11monther33-cell/menu-ai/blob/main/src/services/posService.ts"
click node_whatsapp "https://github.com/11monther33-cell/menu-ai/blob/main/src/pages/restaurant/pages/WhatsAppSalesAgent.tsx"
click node_auth "https://github.com/11monther33-cell/menu-ai/blob/main/src/hooks/useAuth.ts"
click node_staff "https://github.com/11monther33-cell/menu-ai/blob/main/src/hooks/useStaffSession.ts"
click node_admin "https://github.com/11monther33-cell/menu-ai/blob/main/src/pages/admin/Dashboard.tsx"
click node_supabase "https://github.com/11monther33-cell/menu-ai/blob/main/src/lib/supabase.ts"
click node_storage "https://github.com/11monther33-cell/menu-ai/blob/main/src/lib/storage.ts"
click node_whatsappservice "https://github.com/11monther33-cell/menu-ai/blob/main/src/services/whatsappService.ts"
click node_ioscapture "https://github.com/11monther33-cell/menu-ai/blob/main/ios-app/ARCodeCaptureApp/Features/Capture/ReconstructionManager.swift"
click node_capturefiles "https://github.com/11monther33-cell/menu-ai/blob/main/ios-app/ARCodeCaptureApp/Persistence/CaptureFileManager.swift"
click node_iosapi "https://github.com/11monther33-cell/menu-ai/blob/main/ios-app/ARCodeCaptureApp/Networking/APIClient.swift"
click node_funnel "https://github.com/11monther33-cell/menu-ai/blob/main/visiono-funnel/client/src/App.tsx"
click node_tablex "https://github.com/11monther33-cell/menu-ai/blob/main/tablexapp/src/lib/apiRoutes.ts"
click node_supabasefunctions "https://github.com/11monther33-cell/menu-ai/blob/main/supabase/functions/whatsapp-webhook/index.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_publicmenu,node_cart,node_chat,node_restaurantuser toneBlue
class node_dashboard,node_menubuilder,node_dishform,node_branches,node_pos,node_whatsapp toneAmber
class node_app,node_auth,node_staff,node_admin,node_supabase,node_storage,node_whatsappservice,node_supabasefunctions toneMint
class node_viewer,node_ioscapture,node_capturefiles,node_iosapi toneRose
class node_funnel,node_tablex,node_customer toneIndigo
```

## Components

### Customer Menu

- [Public menu](https://github.com/11monther33-cell/menu-ai/blob/main/src/pages/PublicMenu.tsx): `src/pages/PublicMenu.tsx`
- [Menu cart](https://github.com/11monther33-cell/menu-ai/blob/main/src/components/menu/MenuCartSheet.tsx): `src/components/menu/MenuCartSheet.tsx`
- [AI menu chat](https://github.com/11monther33-cell/menu-ai/blob/main/src/components/qr/AIChatDrawer.tsx): `src/components/qr/AIChatDrawer.tsx`

### Restaurant Operations

- [Restaurant dashboard](https://github.com/11monther33-cell/menu-ai/blob/main/src/pages/restaurant/Dashboard.tsx): `src/pages/restaurant/Dashboard.tsx`
- [Menu management](https://github.com/11monther33-cell/menu-ai/blob/main/src/pages/restaurant/pages/MenuBuilder.tsx): `src/pages/restaurant/pages/MenuBuilder.tsx`
- [Dish editing](https://github.com/11monther33-cell/menu-ai/blob/main/src/pages/restaurant/pages/DishFormPage.tsx): `src/pages/restaurant/pages/DishFormPage.tsx`
- [Branch management](https://github.com/11monther33-cell/menu-ai/blob/main/src/pages/restaurant/pages/POSBranches.tsx): `src/pages/restaurant/pages/POSBranches.tsx`
- [POS operations](https://github.com/11monther33-cell/menu-ai/blob/main/src/services/posService.ts): `src/services/posService.ts`
- [WhatsApp sales](https://github.com/11monther33-cell/menu-ai/blob/main/src/pages/restaurant/pages/WhatsAppSalesAgent.tsx): `src/pages/restaurant/pages/WhatsAppSalesAgent.tsx`

### Platform Services

- [Web app router](https://github.com/11monther33-cell/menu-ai/blob/main/src/App.tsx): `src/App.tsx`
- [User authentication](https://github.com/11monther33-cell/menu-ai/blob/main/src/hooks/useAuth.ts): `src/hooks/useAuth.ts`
- [Staff sessions](https://github.com/11monther33-cell/menu-ai/blob/main/src/hooks/useStaffSession.ts): `src/hooks/useStaffSession.ts`
- [Admin dashboard](https://github.com/11monther33-cell/menu-ai/blob/main/src/pages/admin/Dashboard.tsx): `src/pages/admin/Dashboard.tsx`
- [Supabase service](https://github.com/11monther33-cell/menu-ai/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- [Asset storage](https://github.com/11monther33-cell/menu-ai/blob/main/src/lib/storage.ts): `src/lib/storage.ts`
- [WhatsApp service](https://github.com/11monther33-cell/menu-ai/blob/main/src/services/whatsappService.ts): `src/services/whatsappService.ts`
- [WhatsApp webhook](https://github.com/11monther33-cell/menu-ai/blob/main/supabase/functions/whatsapp-webhook/index.ts): `supabase/functions/whatsapp-webhook/index.ts`

### 3D And Capture

- [3D dish viewer](https://github.com/11monther33-cell/menu-ai/blob/main/src/components/3d/ThreeDViewerFull.tsx): `src/components/3d/ThreeDViewerFull.tsx`
- [iOS capture](https://github.com/11monther33-cell/menu-ai/blob/main/ios-app/ARCodeCaptureApp/Features/Capture/ReconstructionManager.swift): `ios-app/ARCodeCaptureApp/Features/Capture/ReconstructionManager.swift`
- [Capture files](https://github.com/11monther33-cell/menu-ai/blob/main/ios-app/ARCodeCaptureApp/Persistence/CaptureFileManager.swift): `ios-app/ARCodeCaptureApp/Persistence/CaptureFileManager.swift`
- [iOS API client](https://github.com/11monther33-cell/menu-ai/blob/main/ios-app/ARCodeCaptureApp/Networking/APIClient.swift): `ios-app/ARCodeCaptureApp/Networking/APIClient.swift`

### Other Applications

- [Funnel application](https://github.com/11monther33-cell/menu-ai/blob/main/visiono-funnel/client/src/App.tsx): `visiono-funnel/client/src/App.tsx`
- [TableX API routes](https://github.com/11monther33-cell/menu-ai/blob/main/tablexapp/src/lib/apiRoutes.ts): `tablexapp/src/lib/apiRoutes.ts`

### Other components

- **Menu visitor**
- **Restaurant user**

## Connections

- Menu visitor → Web app router: opens (evidence: `src/App.tsx`)
- Web app router → Public menu: routes to (evidence: `src/App.tsx`)
- Restaurant user → Web app router: opens (evidence: `src/App.tsx`)
- Web app router → Restaurant dashboard: routes to (evidence: `src/App.tsx`)
- Restaurant dashboard → Menu management: loads (evidence: `src/pages/restaurant/Dashboard.tsx`)
- Restaurant dashboard → Dish editing: loads (evidence: `src/pages/restaurant/Dashboard.tsx`)
- Restaurant dashboard → Branch management: loads (evidence: `src/pages/restaurant/Dashboard.tsx`)
- Restaurant dashboard → WhatsApp sales: loads (evidence: `src/pages/restaurant/Dashboard.tsx`)
- Public menu → Menu cart: renders (evidence: `src/pages/PublicMenu.tsx`)
- Public menu → AI menu chat: renders (evidence: `src/pages/PublicMenu.tsx`)
- Public menu → 3D dish viewer: renders (evidence: `src/pages/PublicMenu.tsx`)
- User authentication → Supabase service: reads profile (evidence: `src/hooks/useAuth.ts`)
- POS operations → Supabase service: reads and writes (evidence: `src/services/posService.ts`)
- Restaurant dashboard → User authentication: uses (evidence: `src/pages/restaurant/Dashboard.tsx`)
- Restaurant dashboard → Staff sessions: uses (evidence: `src/pages/restaurant/Dashboard.tsx`)
- Admin dashboard → User authentication: uses (evidence: `src/pages/admin/Dashboard.tsx`)
- WhatsApp service → Supabase service: uses (evidence: `src/services/whatsappService.ts`)
- iOS capture → Capture files: stores captures (evidence: `ios-app/ARCodeCaptureApp/Features/Capture/ReconstructionManager.swift`)
- Web app router → Admin dashboard: routes to (evidence: `src/App.tsx`)
- Web app router → Staff sessions: routes to (evidence: `src/App.tsx`)
- Funnel application → Menu visitor: serves entry (evidence: `visiono-funnel/client/src/App.tsx`)
