# roshanx0/restaurant-ordering-saas architecture

> Architecture diagram of the GitHub repository roshanx0/restaurant-ordering-saas, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/roshanx0/restaurant-ordering-saas
- Repository: https://github.com/roshanx0/restaurant-ordering-saas

## Overview

FoodOrder is a multi-tenant restaurant ordering SaaS. The principal flow is restaurant registration, admin review and account creation, restaurant menu setup, then customer menu browsing and order placement; restaurant staff manage incoming orders and reporting. Admin analytics, restaurant administration, settings, and real-time updates are additional product branches. The excerpts show routing, service calls, and Supabase operations; some feature-level links are based on the README because their implementations were not sampled.

Main entry points: [`src/App.tsx`](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/App.tsx) (Application Routes), [`src/config/supabase.ts`](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/config/supabase.ts) (Supabase Client), [`src/pages/restaurant/Dashboard.tsx`](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/restaurant/Dashboard.tsx) (Restaurant Dashboard), [`src/services/adminService.ts`](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/services/adminService.ts) (Admin Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Public and Ordering"]
  node_app["Application Routes<br/>[App.tsx]"]
  node_landing["Landing Page<br/>[LandingPage.tsx]"]
  node_registration["Restaurant Registration<br/>[RegisterPage.tsx]"]
  node_ownerlogin["Owner Login<br/>[LoginPage.tsx]"]
  node_customer["Customer Menu and Orders<br/>[CustomerMenu.tsx]"]
end

subgraph group_restaurant["Restaurant Operations"]
  node_restaurantdash["Restaurant Dashboard<br/>[Dashboard.tsx]"]
  node_menu["Menu Management<br/>[Menu.tsx]"]
  node_orders["Order Management<br/>[Orders.tsx]"]
  node_resthome["Restaurant Overview<br/>[RestaurantHome.tsx]"]
  node_reports["Reports<br/>[Reports.tsx]"]
  node_settings["Restaurant Settings"]
end

subgraph group_admin["Platform Administration"]
  node_adminlogin["Admin Login<br/>[LoginPage.tsx]"]
  node_admindash["Admin Dashboard<br/>[Dashboard.tsx]"]
  node_adminhome["Platform Overview<br/>[DashboardHome.tsx]"]
  node_requests["Registration Review"]
  node_restaurants["Restaurant Directory<br/>[AllRestaurants.tsx]"]
  node_analytics["Platform Analytics<br/>[Analytics.tsx]"]
end

subgraph group_backend["Data and Services"]
  node_adminservice["Admin Service<br/>[adminService.ts]"]
  node_restaurantservice["Restaurant Service"]
  node_supabaseclient["Supabase Client<br/>[supabase.ts]"]
  node_config["App Configuration<br/>[config.ts]"]
  node_helpers["Shared Helpers<br/>[helpers.ts]"]
  node_dbschema[("Platform Data Schema<br/>[setup.sql]")]
end

node_visitor(("Restaurant / Customer"))
node_supabase[("Supabase Platform")]

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_registration
node_app -->|"routes to"| node_ownerlogin
node_app -->|"routes to"| node_restaurantdash
node_app -->|"routes to"| node_adminlogin
node_app -->|"routes to"| node_admindash
node_app -->|"routes to"| node_customer
node_restaurantdash -->|"routes to"| node_resthome
node_restaurantdash -->|"routes to"| node_menu
node_restaurantdash -->|"routes to"| node_orders
node_restaurantdash -->|"routes to"| node_reports
node_restaurantdash -->|"routes to"| node_settings
node_admindash -->|"routes to"| node_adminhome
node_admindash -->|"routes to"| node_requests
node_admindash -->|"routes to"| node_restaurants
node_admindash -->|"routes to"| node_analytics
node_registration -.->|"submits registration"| node_supabaseclient
node_ownerlogin -->|"authenticates"| node_supabaseclient
node_customer -->|"creates order"| node_restaurantservice
node_menu -->|"manages menu"| node_restaurantservice
node_orders -->|"manages orders"| node_restaurantservice
node_resthome -->|"loads stats"| node_restaurantservice
node_reports -->|"reads reports"| node_supabaseclient
node_settings -->|"updates settings"| node_supabaseclient
node_requests -->|"reviews requests"| node_adminservice
node_restaurants -->|"manages status"| node_adminservice
node_adminhome -->|"loads overview"| node_adminservice
node_adminservice -->|"queries and subscribes"| node_supabaseclient
node_restaurantservice -->|"queries and subscribes"| node_supabaseclient
node_adminservice -->|"generates credentials"| node_helpers
node_adminservice -->|"accesses platform records"| node_dbschema
node_restaurantservice -->|"accesses menus and orders"| node_dbschema
node_supabaseclient -->|"connects to"| node_supabase
node_dbschema -->|"defines schema for"| node_supabase
node_config -->|"provides credentials"| node_supabaseclient
node_landing -->|"links to sign-up"| node_registration

click node_app "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/App.tsx"
click node_landing "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/public/LandingPage.tsx"
click node_registration "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/public/RegisterPage.tsx"
click node_ownerlogin "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/public/LoginPage.tsx"
click node_customer "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/customer/CustomerMenu.tsx"
click node_restaurantdash "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/restaurant/Dashboard.tsx"
click node_menu "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/restaurant/Menu.tsx"
click node_orders "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/restaurant/Orders.tsx"
click node_resthome "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/restaurant/RestaurantHome.tsx"
click node_reports "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/restaurant/Reports.tsx"
click node_settings "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/restaurant/RestaurantSettings.tsx"
click node_adminlogin "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/admin/LoginPage.tsx"
click node_admindash "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/admin/Dashboard.tsx"
click node_adminhome "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/admin/DashboardHome.tsx"
click node_requests "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/admin/PendingRequests.tsx"
click node_restaurants "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/admin/AllRestaurants.tsx"
click node_analytics "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/admin/Analytics.tsx"
click node_adminservice "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/services/adminService.ts"
click node_restaurantservice "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/services/restaurantService.ts"
click node_supabaseclient "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/config/supabase.ts"
click node_config "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/config/config.ts"
click node_helpers "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/utils/helpers.ts"
click node_dbschema "https://github.com/roshanx0/restaurant-ordering-saas/blob/main/database/setup.sql"

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_landing,node_registration,node_ownerlogin,node_customer toneBlue
class node_restaurantdash,node_menu,node_orders,node_resthome,node_reports,node_settings,node_supabase toneAmber
class node_adminlogin,node_admindash,node_adminhome,node_requests,node_restaurants,node_analytics toneMint
class node_adminservice,node_restaurantservice,node_supabaseclient,node_config,node_helpers,node_dbschema toneRose
class node_visitor toneIndigo
```

## Components

### Public and Ordering

- [Application Routes](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/App.tsx): `src/App.tsx`
- [Landing Page](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/public/LandingPage.tsx): `src/pages/public/LandingPage.tsx`
- [Restaurant Registration](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/public/RegisterPage.tsx): `src/pages/public/RegisterPage.tsx`
- [Owner Login](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/public/LoginPage.tsx): `src/pages/public/LoginPage.tsx`
- [Customer Menu and Orders](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/customer/CustomerMenu.tsx): `src/pages/customer/CustomerMenu.tsx`

### Restaurant Operations

- [Restaurant Dashboard](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/restaurant/Dashboard.tsx): `src/pages/restaurant/Dashboard.tsx`
- [Menu Management](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/restaurant/Menu.tsx): `src/pages/restaurant/Menu.tsx`
- [Order Management](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/restaurant/Orders.tsx): `src/pages/restaurant/Orders.tsx`
- [Restaurant Overview](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/restaurant/RestaurantHome.tsx): `src/pages/restaurant/RestaurantHome.tsx`
- [Reports](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/restaurant/Reports.tsx): `src/pages/restaurant/Reports.tsx`
- [Restaurant Settings](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/restaurant/RestaurantSettings.tsx): `src/pages/restaurant/RestaurantSettings.tsx`

### Platform Administration

- [Admin Login](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/admin/LoginPage.tsx): `src/pages/admin/LoginPage.tsx`
- [Admin Dashboard](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/admin/Dashboard.tsx): `src/pages/admin/Dashboard.tsx`
- [Platform Overview](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/admin/DashboardHome.tsx): `src/pages/admin/DashboardHome.tsx`
- [Registration Review](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/admin/PendingRequests.tsx): `src/pages/admin/PendingRequests.tsx`
- [Restaurant Directory](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/admin/AllRestaurants.tsx): `src/pages/admin/AllRestaurants.tsx`
- [Platform Analytics](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/pages/admin/Analytics.tsx): `src/pages/admin/Analytics.tsx`

### Data and Services

- [Admin Service](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/services/adminService.ts): `src/services/adminService.ts`
- [Restaurant Service](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/services/restaurantService.ts): `src/services/restaurantService.ts`
- [Supabase Client](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/config/supabase.ts): `src/config/supabase.ts`
- [App Configuration](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/config/config.ts): `src/config/config.ts`
- [Shared Helpers](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/src/utils/helpers.ts): `src/utils/helpers.ts`
- [Platform Data Schema](https://github.com/roshanx0/restaurant-ordering-saas/blob/main/database/setup.sql): `database/setup.sql`

### Other components

- **Restaurant / Customer**
- **Supabase Platform**

## Connections

- Restaurant / Customer → Application Routes: opens (evidence: `src/App.tsx`)
- Application Routes → Landing Page: routes to (evidence: `src/App.tsx`)
- Application Routes → Restaurant Registration: routes to (evidence: `src/App.tsx`)
- Application Routes → Owner Login: routes to (evidence: `src/App.tsx`)
- Application Routes → Restaurant Dashboard: routes to (evidence: `src/App.tsx`)
- Application Routes → Admin Login: routes to (evidence: `src/App.tsx`)
- Application Routes → Admin Dashboard: routes to (evidence: `src/App.tsx`)
- Application Routes → Customer Menu and Orders: routes to (evidence: `src/App.tsx`)
- Restaurant Dashboard → Restaurant Overview: routes to (evidence: `src/pages/restaurant/Dashboard.tsx`)
- Restaurant Dashboard → Menu Management: routes to (evidence: `src/pages/restaurant/Dashboard.tsx`)
- Restaurant Dashboard → Order Management: routes to (evidence: `src/pages/restaurant/Dashboard.tsx`)
- Restaurant Dashboard → Reports: routes to (evidence: `src/pages/restaurant/Dashboard.tsx`)
- Restaurant Dashboard → Restaurant Settings: routes to (evidence: `src/pages/restaurant/Dashboard.tsx`)
- Admin Dashboard → Platform Overview: routes to (evidence: `src/pages/admin/Dashboard.tsx`)
- Admin Dashboard → Registration Review: routes to (evidence: `src/pages/admin/Dashboard.tsx`)
- Admin Dashboard → Restaurant Directory: routes to (evidence: `src/pages/admin/Dashboard.tsx`)
- Admin Dashboard → Platform Analytics: routes to (evidence: `src/pages/admin/Dashboard.tsx`)
- Restaurant Registration → Supabase Client: submits registration (evidence: `src/pages/public/RegisterPage.tsx`)
- Owner Login → Supabase Client: authenticates (evidence: `src/pages/public/LoginPage.tsx`)
- Customer Menu and Orders → Restaurant Service: creates order (evidence: `src/pages/customer/CustomerMenu.tsx`)
- Menu Management → Restaurant Service: manages menu (evidence: `src/pages/restaurant/Menu.tsx`)
- Order Management → Restaurant Service: manages orders (evidence: `src/pages/restaurant/Orders.tsx`)
- Restaurant Overview → Restaurant Service: loads stats (evidence: `src/pages/restaurant/RestaurantHome.tsx`)
- Reports → Supabase Client: reads reports (evidence: `src/pages/restaurant/Reports.tsx`)
- Restaurant Settings → Supabase Client: updates settings (evidence: `src/pages/restaurant/RestaurantSettings.tsx`)
- Registration Review → Admin Service: reviews requests (evidence: `src/pages/admin/PendingRequests.tsx`)
- Restaurant Directory → Admin Service: manages status (evidence: `src/pages/admin/AllRestaurants.tsx`)
- Platform Overview → Admin Service: loads overview (evidence: `src/pages/admin/DashboardHome.tsx`)
- Admin Service → Supabase Client: queries and subscribes (evidence: `src/services/adminService.ts`)
- Restaurant Service → Supabase Client: queries and subscribes (evidence: `src/services/restaurantService.ts`)
- Admin Service → Shared Helpers: generates credentials (evidence: `src/services/adminService.ts`)
- Admin Service → Platform Data Schema: accesses platform records (evidence: `src/services/adminService.ts`)
- Restaurant Service → Platform Data Schema: accesses menus and orders (evidence: `src/services/restaurantService.ts`)
- Supabase Client → Supabase Platform: connects to (evidence: `src/config/supabase.ts`)
- Platform Data Schema → Supabase Platform: defines schema for (evidence: `README.md`)
- App Configuration → Supabase Client: provides credentials (evidence: `src/config/supabase.ts`)
- Landing Page → Restaurant Registration: links to sign-up (evidence: `src/pages/public/LandingPage.tsx`)
