# rdodiya/restrohub architecture

> Architecture diagram of the GitHub repository rdodiya/restrohub, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rdodiya/restrohub
- Repository: https://github.com/rdodiya/restrohub

## Overview

Restroly is a multi-tenant restaurant platform: diners discover a restaurant menu, place guest orders, and can request table service; restaurant teams manage menus, orders, kitchen work, branches, and their public site; platform administrators govern users and subscriptions. The React frontend communicates with a Spring backend over REST, with PostgreSQL as the documented persistence layer. The README documents additional QR, UPI, Excel, and WhatsApp capabilities; the graph includes these without asserting unsampled implementation wiring. Sampled source confirms service-request persistence and live broadcast, but not the full order or payment call chains.

Main entry points: [`RestroHub-FrontEnd/src/services/common/api.js`](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/services/common/api.js) (API Client), [`RestroHub-FrontEnd/src/pages/customer/RestaurantMenu.jsx`](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/pages/customer/RestaurantMenu.jsx) (Restaurant Site), [`RestroHub/src/main/java/com/restroly/qrmenu/order`](https://github.com/rdodiya/restrohub/tree/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/order) (Order Services), [`RestroHub/src/main/java/com/restroly/qrmenu/notification/service/ServiceRequestService.java`](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/notification/service/ServiceRequestService.java) (Service Requests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Diner Experience"]
  node_customer_site["Restaurant Site<br/>[RestaurantMenu.jsx]"]
  node_customer_components["Menu &amp; Cart"]
  node_customer_context["Order Context"]
  node_service_request_ui["Table Requests<br/>[ServiceFAB.jsx]"]
end

subgraph group_operations["Restaurant Operations"]
  node_admin_dashboard["Admin Dashboard<br/>[Dashboard.jsx]"]
  node_menu_admin["Menu Management<br/>[Menus.jsx]"]
  node_order_admin["Order Management<br/>[Orders.jsx]"]
  node_kds["Kitchen Display"]
  node_branch_tables["Branches &amp; Tables"]
  node_site_customizer["Site Customizer<br/>[Website.jsx]"]
  node_qr_admin["QR Management<br/>[QRDisplay.jsx]"]
  node_bulk_menu["Excel Menu Tools"]
end

subgraph group_platform["Platform Governance"]
  node_governance_ui["Roles &amp; Plans"]
  node_subscriptions_ui["Subscriptions"]
end

subgraph group_backend["Backend Services"]
  node_frontend_api["API Client<br/>[api.js]"]
  node_auth["Authentication"]
  node_orders_backend["Order Services"]
  node_service_requests["Service Requests"]
  node_catalog_backend["Menu Catalog"]
  node_tenant_backend["Restaurant &amp; Branch"]
  node_subscription_backend["Subscription Services"]
  node_notifications["Live Notifications"]
  node_upi_backend["UPI Links"]
  node_image_upload["Image Upload"]
end

subgraph group_integrations["External Services"]
  node_whatsapp["Meta WhatsApp API"]
  node_cloudinary["Cloudinary"]
end

node_diner(("Diner"))
node_admin(("Restaurant Staff"))
node_superadmin(("Platform Admin"))
node_postgres[("PostgreSQL")]
node_upi_app(("UPI Apps"))

node_diner -->|"browses"| node_customer_site
node_customer_site -->|"renders"| node_customer_components
node_customer_components -->|"updates cart"| node_customer_context
node_customer_site -->|"requests data"| node_frontend_api
node_customer_context -->|"submits order"| node_frontend_api
node_customer_site -->|"offers service"| node_service_request_ui
node_service_request_ui -->|"submits request"| node_frontend_api
node_admin -->|"uses"| node_admin_dashboard
node_admin -->|"manages catalog"| node_menu_admin
node_admin -->|"handles orders"| node_order_admin
node_admin -->|"prepares orders"| node_kds
node_admin -->|"manages locations"| node_branch_tables
node_admin -->|"customizes site"| node_site_customizer
node_admin -->|"manages QR"| node_qr_admin
node_admin -->|"imports exports"| node_bulk_menu
node_superadmin -->|"governs access"| node_governance_ui
node_superadmin -->|"manages plans"| node_subscriptions_ui
node_admin_dashboard -->|"requests data"| node_frontend_api
node_menu_admin -->|"manages catalog"| node_frontend_api
node_order_admin -->|"manages orders"| node_frontend_api
node_kds -->|"updates status"| node_frontend_api
node_branch_tables -->|"manages locations"| node_frontend_api
node_site_customizer -->|"saves configuration"| node_frontend_api
node_governance_ui -->|"manages roles"| node_frontend_api
node_subscriptions_ui -->|"manages plans"| node_frontend_api
node_frontend_api -->|"REST requests"| node_auth
node_frontend_api -->|"REST requests"| node_orders_backend
node_frontend_api -->|"REST requests"| node_catalog_backend
node_frontend_api -->|"REST requests"| node_tenant_backend
node_frontend_api -->|"REST requests"| node_service_requests
node_frontend_api -->|"REST requests"| node_subscription_backend
node_frontend_api -->|"REST requests"| node_upi_backend
node_frontend_api -->|"uploads images"| node_image_upload
node_service_requests -->|"saves requests"| node_postgres
node_service_requests -->|"broadcasts request"| node_notifications
node_auth -->|"reads user data"| node_postgres
node_orders_backend -->|"stores orders"| node_postgres
node_catalog_backend -->|"stores catalog"| node_postgres
node_tenant_backend -->|"stores tenant data"| node_postgres
node_subscription_backend -->|"stores plans"| node_postgres
node_upi_backend -->|"stores payment config"| node_postgres
node_image_upload -->|"uploads images"| node_cloudinary
node_upi_backend -.->|"generates deep link"| node_upi_app
node_orders_backend -.->|"sends order alerts"| node_whatsapp

click node_customer_site "https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/pages/customer/RestaurantMenu.jsx"
click node_customer_components "https://github.com/rdodiya/restrohub/tree/gssoc_develop/RestroHub-FrontEnd/src/components/customer"
click node_customer_context "https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/context/CustomerOrderContext.jsx"
click node_service_request_ui "https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/components/customer/ServiceFAB.jsx"
click node_admin_dashboard "https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/components/admin/dashboard/Dashboard.jsx"
click node_menu_admin "https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/components/admin/menu/Menus.jsx"
click node_order_admin "https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/components/admin/orders/Orders.jsx"
click node_kds "https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/components/admin/kds/KitchenDisplaySystem.jsx"
click node_branch_tables "https://github.com/rdodiya/restrohub/tree/gssoc_develop/RestroHub-FrontEnd/src/components/admin/store"
click node_site_customizer "https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/components/admin/marketing/website/Website.jsx"
click node_qr_admin "https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/components/admin/marketing/qr/QRDisplay.jsx"
click node_bulk_menu "https://github.com/rdodiya/restrohub/tree/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/excel"
click node_governance_ui "https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/components/admin/roles/UserRoleManagement.jsx"
click node_subscriptions_ui "https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/components/admin/subscriptions/SubscriptionManagement.jsx"
click node_frontend_api "https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/services/common/api.js"
click node_auth "https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/auth/controller/AuthController.java"
click node_orders_backend "https://github.com/rdodiya/restrohub/tree/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/order"
click node_service_requests "https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/notification/service/ServiceRequestService.java"
click node_catalog_backend "https://github.com/rdodiya/restrohub/tree/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/menu"
click node_tenant_backend "https://github.com/rdodiya/restrohub/tree/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/restaurant"
click node_subscription_backend "https://github.com/rdodiya/restrohub/tree/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/subscription"
click node_notifications "https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/notification/service/LiveNotificationService.java"
click node_upi_backend "https://github.com/rdodiya/restrohub/tree/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/payment"
click node_image_upload "https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/config/CloudinaryService.java"

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_site,node_customer_components,node_customer_context,node_service_request_ui toneBlue
class node_admin_dashboard,node_menu_admin,node_order_admin,node_kds,node_branch_tables,node_site_customizer,node_qr_admin,node_bulk_menu,node_postgres toneAmber
class node_governance_ui,node_subscriptions_ui toneMint
class node_frontend_api,node_auth,node_orders_backend,node_service_requests,node_catalog_backend,node_tenant_backend,node_subscription_backend,node_notifications,node_upi_backend,node_image_upload toneRose
class node_whatsapp,node_cloudinary,node_diner,node_admin,node_superadmin,node_upi_app toneIndigo
```

## Components

### Diner Experience

- [Restaurant Site](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/pages/customer/RestaurantMenu.jsx): `RestroHub-FrontEnd/src/pages/customer/RestaurantMenu.jsx`
- [Menu & Cart](https://github.com/rdodiya/restrohub/tree/gssoc_develop/RestroHub-FrontEnd/src/components/customer): `RestroHub-FrontEnd/src/components/customer`
- [Order Context](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/context/CustomerOrderContext.jsx): `RestroHub-FrontEnd/src/context/CustomerOrderContext.jsx`
- [Table Requests](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/components/customer/ServiceFAB.jsx): `RestroHub-FrontEnd/src/components/customer/ServiceFAB.jsx`

### Restaurant Operations

- [Admin Dashboard](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/components/admin/dashboard/Dashboard.jsx): `RestroHub-FrontEnd/src/components/admin/dashboard/Dashboard.jsx`
- [Menu Management](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/components/admin/menu/Menus.jsx): `RestroHub-FrontEnd/src/components/admin/menu/Menus.jsx`
- [Order Management](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/components/admin/orders/Orders.jsx): `RestroHub-FrontEnd/src/components/admin/orders/Orders.jsx`
- [Kitchen Display](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/components/admin/kds/KitchenDisplaySystem.jsx): `RestroHub-FrontEnd/src/components/admin/kds/KitchenDisplaySystem.jsx`
- [Branches & Tables](https://github.com/rdodiya/restrohub/tree/gssoc_develop/RestroHub-FrontEnd/src/components/admin/store): `RestroHub-FrontEnd/src/components/admin/store`
- [Site Customizer](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/components/admin/marketing/website/Website.jsx): `RestroHub-FrontEnd/src/components/admin/marketing/website/Website.jsx`
- [QR Management](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/components/admin/marketing/qr/QRDisplay.jsx): `RestroHub-FrontEnd/src/components/admin/marketing/qr/QRDisplay.jsx`
- [Excel Menu Tools](https://github.com/rdodiya/restrohub/tree/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/excel): `RestroHub/src/main/java/com/restroly/qrmenu/excel`

### Platform Governance

- [Roles & Plans](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/components/admin/roles/UserRoleManagement.jsx): `RestroHub-FrontEnd/src/components/admin/roles/UserRoleManagement.jsx`
- [Subscriptions](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/components/admin/subscriptions/SubscriptionManagement.jsx): `RestroHub-FrontEnd/src/components/admin/subscriptions/SubscriptionManagement.jsx`

### Backend Services

- [API Client](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub-FrontEnd/src/services/common/api.js): `RestroHub-FrontEnd/src/services/common/api.js`
- [Authentication](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/auth/controller/AuthController.java): `RestroHub/src/main/java/com/restroly/qrmenu/auth/controller/AuthController.java`
- [Order Services](https://github.com/rdodiya/restrohub/tree/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/order): `RestroHub/src/main/java/com/restroly/qrmenu/order`
- [Service Requests](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/notification/service/ServiceRequestService.java): `RestroHub/src/main/java/com/restroly/qrmenu/notification/service/ServiceRequestService.java`
- [Menu Catalog](https://github.com/rdodiya/restrohub/tree/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/menu): `RestroHub/src/main/java/com/restroly/qrmenu/menu`
- [Restaurant & Branch](https://github.com/rdodiya/restrohub/tree/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/restaurant): `RestroHub/src/main/java/com/restroly/qrmenu/restaurant`
- [Subscription Services](https://github.com/rdodiya/restrohub/tree/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/subscription): `RestroHub/src/main/java/com/restroly/qrmenu/subscription`
- [Live Notifications](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/notification/service/LiveNotificationService.java): `RestroHub/src/main/java/com/restroly/qrmenu/notification/service/LiveNotificationService.java`
- [UPI Links](https://github.com/rdodiya/restrohub/tree/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/payment): `RestroHub/src/main/java/com/restroly/qrmenu/payment`
- [Image Upload](https://github.com/rdodiya/restrohub/blob/gssoc_develop/RestroHub/src/main/java/com/restroly/qrmenu/config/CloudinaryService.java): `RestroHub/src/main/java/com/restroly/qrmenu/config/CloudinaryService.java`

### External Services

- **Meta WhatsApp API**
- **Cloudinary**

### Other components

- **Diner**
- **Restaurant Staff**
- **Platform Admin**
- **PostgreSQL**
- **UPI Apps**

## Connections

- Diner → Restaurant Site: browses
- Restaurant Site → Menu & Cart: renders
- Menu & Cart → Order Context: updates cart
- Restaurant Site → API Client: requests data
- Order Context → API Client: submits order
- Restaurant Site → Table Requests: offers service
- Table Requests → API Client: submits request
- Restaurant Staff → Admin Dashboard: uses
- Restaurant Staff → Menu Management: manages catalog
- Restaurant Staff → Order Management: handles orders
- Restaurant Staff → Kitchen Display: prepares orders
- Restaurant Staff → Branches & Tables: manages locations
- Restaurant Staff → Site Customizer: customizes site
- Restaurant Staff → QR Management: manages QR
- Restaurant Staff → Excel Menu Tools: imports exports
- Platform Admin → Roles & Plans: governs access
- Platform Admin → Subscriptions: manages plans
- Admin Dashboard → API Client: requests data
- Menu Management → API Client: manages catalog
- Order Management → API Client: manages orders
- Kitchen Display → API Client: updates status
- Branches & Tables → API Client: manages locations
- Site Customizer → API Client: saves configuration
- Roles & Plans → API Client: manages roles
- Subscriptions → API Client: manages plans
- API Client → Authentication: REST requests
- API Client → Order Services: REST requests
- API Client → Menu Catalog: REST requests
- API Client → Restaurant & Branch: REST requests
- API Client → Service Requests: REST requests
- API Client → Subscription Services: REST requests
- API Client → UPI Links: REST requests
- API Client → Image Upload: uploads images
- Service Requests → PostgreSQL: saves requests
- Service Requests → Live Notifications: broadcasts request
- Authentication → PostgreSQL: reads user data
- Order Services → PostgreSQL: stores orders
- Menu Catalog → PostgreSQL: stores catalog
- Restaurant & Branch → PostgreSQL: stores tenant data
- Subscription Services → PostgreSQL: stores plans
- UPI Links → PostgreSQL: stores payment config
- Image Upload → Cloudinary: uploads images
- UPI Links → UPI Apps: generates deep link
- Order Services → Meta WhatsApp API: sends order alerts
