# sudipjangam/tasty-bite-harbor architecture

> Architecture diagram of the GitHub repository sudipjangam/tasty-bite-harbor, 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/sudipjangam/tasty-bite-harbor
- Repository: https://github.com/sudipjangam/tasty-bite-harbor

## Overview

This is a React/Supabase restaurant-management platform, with hotel-oriented room and guest features as well. The main user journey enters through the app and its routed, permission-aware interface, then uses operational modules for orders, menus, POS, and kitchen fulfillment; inventory, reservations, CRM, staffing, and analytics support that work. Supabase provides the documented backend, with edge functions for selected AI, inventory, and messaging tasks. Links among unsampled feature modules are limited to capabilities and integrations stated in the README; the excerpts do not establish their detailed call flow.

Main entry points: [`src/components/Orders`](https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Orders) (Order lifecycle), [`src/App.tsx`](https://github.com/sudipjangam/tasty-bite-harbor/blob/main/src/App.tsx) (App providers), [`src/hooks/useAuth.tsx`](https://github.com/sudipjangam/tasty-bite-harbor/blob/main/src/hooks/useAuth.tsx) (Authentication), [`src/main.tsx`](https://github.com/sudipjangam/tasty-bite-harbor/blob/main/src/main.tsx) (Application entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application Shell"]
  node_entry["Application entry<br/>[main.tsx]"]
  node_app["App providers<br/>[App.tsx]"]
  node_routing["Routes and guards<br/>[AppRoutes.tsx]"]
  node_ui["Shared UI components"]
end

subgraph group_operations["Restaurant Operations"]
  node_orders["Order lifecycle"]
  node_pos["Point of sale"]
  node_menu["Menu management"]
  node_kitchen["Kitchen display"]
  node_channels["Delivery channel sync"]
end

subgraph group_business["Business Management"]
  node_inventory["Inventory management"]
  node_reservations["Reservations"]
  node_rooms["Rooms and guests"]
  node_crm["Customer management"]
  node_staff["Staff management"]
end

subgraph group_insights["Insights and AI"]
  node_analytics["Analytics and reports"]
  node_ai["AI assistant<br/>[index.ts]"]
end

subgraph group_platform["Platform Services"]
  node_auth["Authentication<br/>[useAuth.tsx]"]
  node_admin["Administration and access"]
  node_supabase[("Supabase backend<br/>[client.ts]")]
  node_edge["Serverless functions"]
  node_communications["Email and WhatsApp<br/>[index.ts]"]
end

node_user(("Restaurant users"))

node_user -->|"uses"| node_entry
node_entry -->|"loads"| node_app
node_app -->|"renders"| node_routing
node_app -->|"provides"| node_auth
node_routing -.->|"guards routes"| node_auth
node_user -->|"manages orders"| node_orders
node_user -->|"manages menu"| node_menu
node_user -->|"takes payments"| node_pos
node_orders -->|"kitchen integration"| node_kitchen
node_user -->|"tracks stock"| node_inventory
node_user -->|"manages bookings"| node_reservations
node_user -->|"manages rooms"| node_rooms
node_user -->|"manages customers"| node_crm
node_user -->|"manages staff"| node_staff
node_user -->|"views insights"| node_analytics
node_analytics -.->|"AI insights"| node_ai
node_user -->|"administers access"| node_admin
node_auth -->|"loads profile"| node_supabase
node_orders -.->|"persists operations"| node_supabase
node_inventory -->|"stock deduction"| node_edge
node_edge -->|"hosts AI chat"| node_ai
node_reservations -->|"sends confirmations"| node_communications
node_orders -->|"sends bills"| node_communications
node_user -->|"syncs delivery orders"| node_channels

click node_entry "https://github.com/sudipjangam/tasty-bite-harbor/blob/main/src/main.tsx"
click node_app "https://github.com/sudipjangam/tasty-bite-harbor/blob/main/src/App.tsx"
click node_routing "https://github.com/sudipjangam/tasty-bite-harbor/blob/main/src/components/Auth/AppRoutes.tsx"
click node_auth "https://github.com/sudipjangam/tasty-bite-harbor/blob/main/src/hooks/useAuth.tsx"
click node_ui "https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/ui"
click node_orders "https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Orders"
click node_pos "https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Orders/POS"
click node_menu "https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Menu"
click node_kitchen "https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Kitchen"
click node_inventory "https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Inventory"
click node_reservations "https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Reservations"
click node_rooms "https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Rooms"
click node_crm "https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/CRM"
click node_staff "https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Staff"
click node_analytics "https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Analytics"
click node_ai "https://github.com/sudipjangam/tasty-bite-harbor/blob/main/supabase/functions/chat-with-gemini/index.ts"
click node_admin "https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Admin"
click node_supabase "https://github.com/sudipjangam/tasty-bite-harbor/blob/main/src/integrations/supabase/client.ts"
click node_edge "https://github.com/sudipjangam/tasty-bite-harbor/tree/main/supabase/functions"
click node_communications "https://github.com/sudipjangam/tasty-bite-harbor/blob/main/supabase/functions/send-whatsapp-unified/index.ts"
click node_channels "https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Aggregators"

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,node_routing,node_ui,node_user toneBlue
class node_orders,node_pos,node_menu,node_kitchen,node_channels toneAmber
class node_inventory,node_reservations,node_rooms,node_crm,node_staff toneMint
class node_analytics,node_ai toneRose
class node_auth,node_admin,node_supabase,node_edge,node_communications toneIndigo
```

## Components

### Application Shell

- [Application entry](https://github.com/sudipjangam/tasty-bite-harbor/blob/main/src/main.tsx): `src/main.tsx`
- [App providers](https://github.com/sudipjangam/tasty-bite-harbor/blob/main/src/App.tsx): `src/App.tsx`
- [Routes and guards](https://github.com/sudipjangam/tasty-bite-harbor/blob/main/src/components/Auth/AppRoutes.tsx): `src/components/Auth/AppRoutes.tsx`
- [Shared UI components](https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/ui): `src/components/ui`

### Restaurant Operations

- [Order lifecycle](https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Orders): `src/components/Orders`
- [Point of sale](https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Orders/POS): `src/components/Orders/POS`
- [Menu management](https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Menu): `src/components/Menu`
- [Kitchen display](https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Kitchen): `src/components/Kitchen`
- [Delivery channel sync](https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Aggregators): `src/components/Aggregators`

### Business Management

- [Inventory management](https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Inventory): `src/components/Inventory`
- [Reservations](https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Reservations): `src/components/Reservations`
- [Rooms and guests](https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Rooms): `src/components/Rooms`
- [Customer management](https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/CRM): `src/components/CRM`
- [Staff management](https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Staff): `src/components/Staff`

### Insights and AI

- [Analytics and reports](https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Analytics): `src/components/Analytics`
- [AI assistant](https://github.com/sudipjangam/tasty-bite-harbor/blob/main/supabase/functions/chat-with-gemini/index.ts): `supabase/functions/chat-with-gemini/index.ts`

### Platform Services

- [Authentication](https://github.com/sudipjangam/tasty-bite-harbor/blob/main/src/hooks/useAuth.tsx): `src/hooks/useAuth.tsx`
- [Administration and access](https://github.com/sudipjangam/tasty-bite-harbor/tree/main/src/components/Admin): `src/components/Admin`
- [Supabase backend](https://github.com/sudipjangam/tasty-bite-harbor/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- [Serverless functions](https://github.com/sudipjangam/tasty-bite-harbor/tree/main/supabase/functions): `supabase/functions`
- [Email and WhatsApp](https://github.com/sudipjangam/tasty-bite-harbor/blob/main/supabase/functions/send-whatsapp-unified/index.ts): `supabase/functions/send-whatsapp-unified/index.ts`

### Other components

- **Restaurant users**

## Connections

- Restaurant users → Application entry: uses
- Application entry → App providers: loads (evidence: `src/main.tsx`)
- App providers → Routes and guards: renders (evidence: `src/App.tsx`)
- App providers → Authentication: provides (evidence: `src/App.tsx`)
- Routes and guards → Authentication: guards routes (evidence: `src/components/Auth/AppRoutes.tsx`)
- Restaurant users → Order lifecycle: manages orders
- Restaurant users → Menu management: manages menu
- Restaurant users → Point of sale: takes payments
- Order lifecycle → Kitchen display: kitchen integration
- Restaurant users → Inventory management: tracks stock
- Restaurant users → Reservations: manages bookings
- Restaurant users → Rooms and guests: manages rooms
- Restaurant users → Customer management: manages customers
- Restaurant users → Staff management: manages staff
- Restaurant users → Analytics and reports: views insights
- Analytics and reports → AI assistant: AI insights
- Restaurant users → Administration and access: administers access
- Authentication → Supabase backend: loads profile (evidence: `src/hooks/useAuth.tsx`)
- Order lifecycle → Supabase backend: persists operations
- Inventory management → Serverless functions: stock deduction
- Serverless functions → AI assistant: hosts AI chat
- Reservations → Email and WhatsApp: sends confirmations
- Order lifecycle → Email and WhatsApp: sends bills
- Restaurant users → Delivery channel sync: syncs delivery orders
