# vexonor/vora architecture

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

- Interactive diagram: https://gitdiagram.com/vexonor/vora
- Repository: https://github.com/vexonor/vora

## Overview

Vora is a restaurant/café operations platform: customers browse a QR-friendly menu, place orders and pay; staff manage fulfillment, while managers administer catalog and operations and review sales analytics. The Next.js client uses the NestJS API; the API owns persistence and coordinates Midtrans, S3 and the FastAPI prediction service. The graph preserves documented capabilities, but many UI and server feature internals were not sampled, so some documented subsystem connections are dashed or omitted rather than inferred.

Main entry points: [`client/src/services`](https://github.com/vexonor/vora/tree/main/client/src/services) (API services), [`client/src/app`](https://github.com/vexonor/vora/tree/main/client/src/app) (Customer and staff UI), [`server/src/features/ai-prediction/ai-prediction.service.ts`](https://github.com/vexonor/vora/blob/main/server/src/features/ai-prediction/ai-prediction.service.ts) (Prediction integration), [`server/src/features/auth`](https://github.com/vexonor/vora/tree/main/server/src/features/auth) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_web["Customer and staff UI"]
  node_client_services["API services"]
end

subgraph group_operations["Restaurant operations"]
  node_auth["Authentication"]
  node_menu["Menu catalog<br/>[menu.service.ts]"]
  node_orders["Order lifecycle<br/>[order.service.ts]"]
  node_payments["Payments<br/>[payment.service.ts]"]
  node_kitchen["Kitchen fulfillment<br/>[page.tsx]"]
  node_stock["Inventory"]
  node_tables["Table management"]
  node_staff_admin["Staff administration"]
end

subgraph group_analytics["Sales intelligence"]
  node_reports["Sales reports"]
  node_dashboard["Operations dashboard<br/>[dashboard-chart.ts]"]
  node_prediction_api["Prediction integration"]
  node_ai["Trend prediction<br/>[predictor.py]"]
  node_trends[("Trend records")]
end

subgraph group_platform["Platform services"]
  node_db[("MySQL")]
  node_midtrans["Midtrans"]
  node_s3["AWS S3"]
end

node_customer(("Customer"))
node_staff(("Restaurant staff"))
node_manager(("Manager"))

node_customer -->|"browses and orders"| node_web
node_staff -->|"handles operations"| node_web
node_manager -->|"manages business"| node_web
node_web -.->|"requests data"| node_client_services
node_client_services -->|"calls API"| node_auth
node_client_services -.->|"calls API"| node_menu
node_client_services -->|"calls API"| node_orders
node_client_services -.->|"calls API"| node_payments
node_client_services -.->|"calls API"| node_reports
node_client_services -.->|"calls API"| node_dashboard
node_client_services -.->|"calls API"| node_stock
node_client_services -.->|"calls API"| node_tables
node_client_services -.->|"calls API"| node_staff_admin
node_menu -.->|"reads and writes"| node_db
node_orders -.->|"reads and writes"| node_db
node_orders -.->|"payment coordination"| node_payments
node_payments -.->|"processes payment"| node_midtrans
node_kitchen -.->|"updates order"| node_client_services
node_stock -.->|"reads and writes"| node_db
node_tables -.->|"reads and writes"| node_db
node_staff_admin -.->|"reads and writes"| node_db
node_auth -.->|"reads and writes"| node_db
node_auth -->|"stores avatars"| node_s3
node_reports -.->|"reads and writes"| node_db
node_dashboard -->|"reads data"| node_db
node_prediction_api -->|"reads history"| node_reports
node_prediction_api -.->|"requests predictions"| node_ai
node_prediction_api -->|"stores predictions"| node_trends
node_trends -.->|"persists trends"| node_db

click node_web "https://github.com/vexonor/vora/tree/main/client/src/app"
click node_client_services "https://github.com/vexonor/vora/tree/main/client/src/services"
click node_auth "https://github.com/vexonor/vora/tree/main/server/src/features/auth"
click node_menu "https://github.com/vexonor/vora/blob/main/server/src/features/menu/menu.service.ts"
click node_orders "https://github.com/vexonor/vora/blob/main/server/src/features/order/order.service.ts"
click node_payments "https://github.com/vexonor/vora/blob/main/server/src/features/payment/payment.service.ts"
click node_kitchen "https://github.com/vexonor/vora/blob/main/client/src/app/(private)/kitchen/order/page.tsx"
click node_stock "https://github.com/vexonor/vora/tree/main/server/src/features/stock"
click node_tables "https://github.com/vexonor/vora/tree/main/server/src/features/table"
click node_staff_admin "https://github.com/vexonor/vora/tree/main/server/src/features/user"
click node_reports "https://github.com/vexonor/vora/blob/main/server/src/features/selling-report/selling-report.service.ts"
click node_dashboard "https://github.com/vexonor/vora/blob/main/server/src/features/dashboard/dashboard-chart.ts"
click node_prediction_api "https://github.com/vexonor/vora/blob/main/server/src/features/ai-prediction/ai-prediction.service.ts"
click node_ai "https://github.com/vexonor/vora/blob/main/ai/predictor.py"
click node_trends "https://github.com/vexonor/vora/blob/main/server/src/features/selling-trend/models/selling-trend.model.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_web,node_client_services toneBlue
class node_auth,node_menu,node_orders,node_payments,node_kitchen,node_stock,node_tables,node_staff_admin toneAmber
class node_reports,node_dashboard,node_prediction_api,node_ai,node_trends toneMint
class node_db,node_midtrans,node_s3 toneRose
class node_customer,node_staff,node_manager toneIndigo
```

## Components

### Web application

- [Customer and staff UI](https://github.com/vexonor/vora/tree/main/client/src/app): `client/src/app`
- [API services](https://github.com/vexonor/vora/tree/main/client/src/services): `client/src/services`

### Restaurant operations

- [Authentication](https://github.com/vexonor/vora/tree/main/server/src/features/auth): `server/src/features/auth`
- [Menu catalog](https://github.com/vexonor/vora/blob/main/server/src/features/menu/menu.service.ts): `server/src/features/menu/menu.service.ts`
- [Order lifecycle](https://github.com/vexonor/vora/blob/main/server/src/features/order/order.service.ts): `server/src/features/order/order.service.ts`
- [Payments](https://github.com/vexonor/vora/blob/main/server/src/features/payment/payment.service.ts): `server/src/features/payment/payment.service.ts`
- [Kitchen fulfillment](https://github.com/vexonor/vora/blob/main/client/src/app/(private)/kitchen/order/page.tsx): `client/src/app/(private)/kitchen/order/page.tsx`
- [Inventory](https://github.com/vexonor/vora/tree/main/server/src/features/stock): `server/src/features/stock`
- [Table management](https://github.com/vexonor/vora/tree/main/server/src/features/table): `server/src/features/table`
- [Staff administration](https://github.com/vexonor/vora/tree/main/server/src/features/user): `server/src/features/user`

### Sales intelligence

- [Sales reports](https://github.com/vexonor/vora/blob/main/server/src/features/selling-report/selling-report.service.ts): `server/src/features/selling-report/selling-report.service.ts`
- [Operations dashboard](https://github.com/vexonor/vora/blob/main/server/src/features/dashboard/dashboard-chart.ts): `server/src/features/dashboard/dashboard-chart.ts`
- [Prediction integration](https://github.com/vexonor/vora/blob/main/server/src/features/ai-prediction/ai-prediction.service.ts): `server/src/features/ai-prediction/ai-prediction.service.ts`
- [Trend prediction](https://github.com/vexonor/vora/blob/main/ai/predictor.py): `ai/predictor.py`
- [Trend records](https://github.com/vexonor/vora/blob/main/server/src/features/selling-trend/models/selling-trend.model.ts): `server/src/features/selling-trend/models/selling-trend.model.ts`

### Platform services

- **MySQL**
- **Midtrans**
- **AWS S3**

### Other components

- **Customer**
- **Restaurant staff**
- **Manager**

## Connections

- Customer → Customer and staff UI: browses and orders (evidence: `README.md`)
- Restaurant staff → Customer and staff UI: handles operations (evidence: `README.md`)
- Manager → Customer and staff UI: manages business (evidence: `README.md`)
- Customer and staff UI → API services: requests data
- API services → Authentication: calls API (evidence: `client/src/services/auth.service.ts`)
- API services → Menu catalog: calls API
- API services → Order lifecycle: calls API (evidence: `client/src/services/order.service.ts`)
- API services → Payments: calls API
- API services → Sales reports: calls API
- API services → Operations dashboard: calls API
- API services → Inventory: calls API
- API services → Table management: calls API
- API services → Staff administration: calls API
- Menu catalog → MySQL: reads and writes
- Order lifecycle → MySQL: reads and writes
- Order lifecycle → Payments: payment coordination
- Payments → Midtrans: processes payment
- Kitchen fulfillment → API services: updates order
- Inventory → MySQL: reads and writes
- Table management → MySQL: reads and writes
- Staff administration → MySQL: reads and writes
- Authentication → MySQL: reads and writes
- Authentication → AWS S3: stores avatars (evidence: `server/src/features/auth/auth.service.ts`)
- Sales reports → MySQL: reads and writes
- Operations dashboard → MySQL: reads data
- Prediction integration → Sales reports: reads history (evidence: `server/src/features/ai-prediction/ai-prediction.service.ts`)
- Prediction integration → Trend prediction: requests predictions (evidence: `README.md`)
- Prediction integration → Trend records: stores predictions (evidence: `server/src/features/ai-prediction/ai-prediction.service.ts`)
- Trend records → MySQL: persists trends
