# devsabirul/servio-menu-assistant architecture

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

- Interactive diagram: https://gitdiagram.com/devsabirul/servio-menu-assistant
- Repository: https://github.com/devsabirul/servio-menu-assistant

## Overview

Servio is a static restaurant AI-waiter frontend. A restaurant operator signs in, configures a restaurant and assistant, and can manage menu uploads and QR links; diners open a restaurant chat link, send questions, and receive answers from the FastAPI service. The dashboard also presents plan, usage, language, and sample business-data views. Dashboard and chat behavior is supported by excerpts; other capabilities are retained where documented in the README, with unverified implementation links omitted or marked optional.

Main entry points: [`dashboard/index.js`](https://github.com/devsabirul/servio-menu-assistant/blob/main/dashboard/index.js) (Dashboard workflows), [`assets/auth.js`](https://github.com/devsabirul/servio-menu-assistant/blob/main/assets/auth.js) (Firebase auth client), [`chat/chat.html`](https://github.com/devsabirul/servio-menu-assistant/blob/main/chat/chat.html) (Restaurant chat page), [`auth/login.html`](https://github.com/devsabirul/servio-menu-assistant/blob/main/auth/login.html) (Sign in and register)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Setup"]
  node_auth_pages["Sign in and register<br/>[login.html]"]
  node_auth_client["Firebase auth client<br/>[auth.js]"]
  node_home_page["Landing page<br/>[index.html]"]
end

subgraph group_operator["Restaurant Dashboard"]
  node_dashboard_ui["Dashboard views<br/>[dashboard.html]"]
  node_dashboard_logic["Dashboard workflows<br/>[index.js]"]
  node_profile_settings["Profile and AI settings<br/>[index.js]"]
  node_menu_management["Menu upload integration<br/>[index.js]"]
  node_plan_usage["Plan and usage views<br/>[index.js]"]
  node_restaurant_qr["Restaurant QR links<br/>[index.js]"]
end

subgraph group_diner["Customer Chat"]
  node_chat_page["Restaurant chat page<br/>[chat.html]"]
  node_chat_runtime["Chat session and requests<br/>[chat.js]"]
end

node_operator_actor(("Restaurant operator"))
node_diner_actor(("Diner"))
node_firebase_auth["Firebase Authentication"]
node_firestore[("Cloud Firestore")]
node_chat_api["FastAPI chat service"]

node_operator_actor -->|"signs in"| node_auth_pages
node_auth_pages -.->|"uses auth"| node_auth_client
node_auth_client -.->|"authenticates"| node_firebase_auth
node_operator_actor -.->|"manages restaurant"| node_dashboard_ui
node_dashboard_ui -->|"runs workflows"| node_dashboard_logic
node_dashboard_logic -->|"checks auth state"| node_auth_client
node_dashboard_logic -->|"loads and saves"| node_profile_settings
node_dashboard_logic -->|"handles uploads"| node_menu_management
node_dashboard_logic -->|"renders usage"| node_plan_usage
node_dashboard_logic -->|"renders QR links"| node_restaurant_qr
node_dashboard_logic -->|"reads and writes"| node_firestore
node_menu_management -.->|"links menu QR"| node_chat_page
node_diner_actor -.->|"opens chat link"| node_chat_page
node_chat_page -->|"loads chat"| node_chat_runtime
node_chat_runtime -->|"posts questions"| node_chat_api

click node_auth_pages "https://github.com/devsabirul/servio-menu-assistant/blob/main/auth/login.html"
click node_auth_client "https://github.com/devsabirul/servio-menu-assistant/blob/main/assets/auth.js"
click node_dashboard_ui "https://github.com/devsabirul/servio-menu-assistant/blob/main/dashboard/dashboard.html"
click node_dashboard_logic "https://github.com/devsabirul/servio-menu-assistant/blob/main/dashboard/index.js"
click node_profile_settings "https://github.com/devsabirul/servio-menu-assistant/blob/main/dashboard/index.js"
click node_menu_management "https://github.com/devsabirul/servio-menu-assistant/blob/main/dashboard/index.js"
click node_plan_usage "https://github.com/devsabirul/servio-menu-assistant/blob/main/dashboard/index.js"
click node_restaurant_qr "https://github.com/devsabirul/servio-menu-assistant/blob/main/dashboard/index.js"
click node_chat_page "https://github.com/devsabirul/servio-menu-assistant/blob/main/chat/chat.html"
click node_chat_runtime "https://github.com/devsabirul/servio-menu-assistant/blob/main/chat/chat.js"
click node_home_page "https://github.com/devsabirul/servio-menu-assistant/blob/main/index.html"

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_auth_pages,node_auth_client,node_home_page toneBlue
class node_dashboard_ui,node_dashboard_logic,node_profile_settings,node_menu_management,node_plan_usage,node_restaurant_qr,node_firestore toneAmber
class node_chat_page,node_chat_runtime,node_chat_api toneMint
class node_operator_actor,node_diner_actor,node_firebase_auth toneIndigo
```

## Components

### Access and Setup

- [Sign in and register](https://github.com/devsabirul/servio-menu-assistant/blob/main/auth/login.html): `auth/login.html`
- [Firebase auth client](https://github.com/devsabirul/servio-menu-assistant/blob/main/assets/auth.js): `assets/auth.js`
- [Landing page](https://github.com/devsabirul/servio-menu-assistant/blob/main/index.html): `index.html`

### Restaurant Dashboard

- [Dashboard views](https://github.com/devsabirul/servio-menu-assistant/blob/main/dashboard/dashboard.html): `dashboard/dashboard.html`
- [Dashboard workflows](https://github.com/devsabirul/servio-menu-assistant/blob/main/dashboard/index.js): `dashboard/index.js`
- [Profile and AI settings](https://github.com/devsabirul/servio-menu-assistant/blob/main/dashboard/index.js): `dashboard/index.js`
- [Menu upload integration](https://github.com/devsabirul/servio-menu-assistant/blob/main/dashboard/index.js): `dashboard/index.js`
- [Plan and usage views](https://github.com/devsabirul/servio-menu-assistant/blob/main/dashboard/index.js): `dashboard/index.js`
- [Restaurant QR links](https://github.com/devsabirul/servio-menu-assistant/blob/main/dashboard/index.js): `dashboard/index.js`

### Customer Chat

- [Restaurant chat page](https://github.com/devsabirul/servio-menu-assistant/blob/main/chat/chat.html): `chat/chat.html`
- [Chat session and requests](https://github.com/devsabirul/servio-menu-assistant/blob/main/chat/chat.js): `chat/chat.js`

### Other components

- **Restaurant operator**
- **Diner**
- **Firebase Authentication**
- **Cloud Firestore**
- **FastAPI chat service**

## Connections

- Restaurant operator → Sign in and register: signs in
- Sign in and register → Firebase auth client: uses auth
- Firebase auth client → Firebase Authentication: authenticates (evidence: `README.md`)
- Restaurant operator → Dashboard views: manages restaurant
- Dashboard views → Dashboard workflows: runs workflows (evidence: `dashboard/index.js`)
- Dashboard workflows → Firebase auth client: checks auth state (evidence: `dashboard/index.js`)
- Dashboard workflows → Profile and AI settings: loads and saves (evidence: `dashboard/index.js`)
- Dashboard workflows → Menu upload integration: handles uploads (evidence: `dashboard/index.js`)
- Dashboard workflows → Plan and usage views: renders usage (evidence: `dashboard/index.js`)
- Dashboard workflows → Restaurant QR links: renders QR links (evidence: `dashboard/index.js`)
- Dashboard workflows → Cloud Firestore: reads and writes (evidence: `dashboard/index.js`)
- Menu upload integration → Restaurant chat page: links menu QR (evidence: `README.md`)
- Diner → Restaurant chat page: opens chat link (evidence: `README.md`)
- Restaurant chat page → Chat session and requests: loads chat (evidence: `chat/chat.js`)
- Chat session and requests → FastAPI chat service: posts questions (evidence: `README.md`)
