# quoctrieu010903/sep490_robot_orderingfood architecture

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

- Interactive diagram: https://gitdiagram.com/quoctrieu010903/sep490_robot_orderingfood
- Repository: https://github.com/quoctrieu010903/sep490_robot_orderingfood

## Overview

This is a restaurant food-ordering backend: customers and staff interact with tables, sessions, orders, catalog and payment operations through an HTTP API. The principal flow is an API order request delegated to order application logic, with table/session handling supporting dine-in use and persistence holding domain state. The tree also shows authentication, invoices, complaints, feedback, dashboards and real-time notifications. Source evidence is selective; unsampled capabilities are represented as subsystems without speculative call edges.

Main entry points: [`SEP490_Robot_FoodOrdering.API/Program.cs`](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.API/Program.cs) (HTTP API), [`SEP490_Robot_FoodOrdering.Application/Service/Implementation/AuthenticationService.cs`](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/AuthenticationService.cs) (Authentication), [`SEP490_Robot_FoodOrdering.Application/Service/Implementation/TableSessionService.cs`](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/TableSessionService.cs) (Table sessions), [`SEP490_Robot_FoodOrdering.Application/Service/Implementation/OrderService.cs`](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/OrderService.cs) (Order handling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and identity"]
  node_http_api["HTTP API<br/>[Program.cs]"]
  node_authentication["Authentication"]
  node_jwt["JWT service<br/>[JwtService.cs]"]
end

subgraph group_operations["Restaurant operations"]
  node_order_api["Order endpoints<br/>[OrderController.cs]"]
  node_order_service["Order handling<br/>[OrderService.cs]"]
  node_table_api["Table endpoints<br/>[TableController.cs]"]
  node_table_sessions["Table sessions"]
  node_catalog["Menu and catalog<br/>[ProductService.cs]"]
  node_complaints["Complaints<br/>[ComplainService.cs]"]
end

subgraph group_engagement["Payments and engagement"]
  node_payments["Payment processing<br/>[PaymentService.cs]"]
  node_invoices["Invoices<br/>[InvoiceService.cs]"]
  node_feedback["Feedback<br/>[FeedbackService.cs]"]
  node_dashboard["Dashboards"]
  node_notifications["Order notifications"]
  node_realtime_hubs["SignalR hubs"]
  node_cloudinary["Cloudinary images"]
end

subgraph group_storage["Persistence"]
  node_unit_of_work["Unit of work<br/>[UnitOfWork.cs]"]
  node_repository["Generic repository"]
  node_database[("Ordering database")]
end

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

node_customer -->|"sends requests"| node_http_api
node_staff -->|"sends requests"| node_http_api
node_http_api -.->|"routes orders"| node_order_api
node_http_api -.->|"routes tables"| node_table_api
node_http_api -.->|"uses identity"| node_authentication
node_order_api -->|"delegates orders"| node_order_service
node_table_api -.->|"manages sessions"| node_table_sessions
node_authentication -->|"reads and saves"| node_unit_of_work
node_authentication -->|"creates tokens"| node_jwt
node_authentication -->|"uploads avatars"| node_cloudinary
node_table_sessions -->|"queries and saves"| node_unit_of_work
node_table_sessions -.->|"persists session state"| node_database
node_table_sessions -->|"resolves pending"| node_complaints
node_unit_of_work -.->|"provides repositories"| node_repository
node_repository -->|"queries and updates"| node_database
node_http_api -->|"maps hubs"| node_realtime_hubs
node_notifications -->|"sends updates"| node_realtime_hubs
node_order_service -.->|"initiates payment"| node_payments
node_order_service -.->|"creates invoices"| node_invoices

click node_http_api "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.API/Program.cs"
click node_authentication "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/AuthenticationService.cs"
click node_order_api "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.API/Controllers/OrderController.cs"
click node_order_service "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/OrderService.cs"
click node_table_api "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.API/Controllers/TableController.cs"
click node_table_sessions "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/TableSessionService.cs"
click node_catalog "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/ProductService.cs"
click node_complaints "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/ComplainService.cs"
click node_payments "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/PaymentService.cs"
click node_invoices "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/InvoiceService.cs"
click node_feedback "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/FeedbackService.cs"
click node_dashboard "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/DashboardService.cs"
click node_notifications "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.API/Services/OrderNotificationService.cs"
click node_realtime_hubs "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.API/Hubs/OrderNotificationHub.cs"
click node_unit_of_work "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Infrastructure/UnitOfWork.cs"
click node_repository "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Infrastructure/Repository/GenericRepository.cs"
click node_database "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Infrastructure/Data/Persistence/RobotFoodOrderingDBContext.cs"
click node_jwt "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Infrastructure/Jwt/JwtService.cs"
click node_cloudinary "https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Infrastructure/Cloudinary/CloudinaryService.cs"

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_http_api,node_authentication,node_jwt toneBlue
class node_order_api,node_order_service,node_table_api,node_table_sessions,node_catalog,node_complaints toneAmber
class node_payments,node_invoices,node_feedback,node_dashboard,node_notifications,node_realtime_hubs,node_cloudinary toneMint
class node_unit_of_work,node_repository,node_database toneRose
class node_customer,node_staff toneIndigo
```

## Components

### API and identity

- [HTTP API](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.API/Program.cs): `SEP490_Robot_FoodOrdering.API/Program.cs`
- [Authentication](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/AuthenticationService.cs): `SEP490_Robot_FoodOrdering.Application/Service/Implementation/AuthenticationService.cs`
- [JWT service](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Infrastructure/Jwt/JwtService.cs): `SEP490_Robot_FoodOrdering.Infrastructure/Jwt/JwtService.cs`

### Restaurant operations

- [Order endpoints](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.API/Controllers/OrderController.cs): `SEP490_Robot_FoodOrdering.API/Controllers/OrderController.cs`
- [Order handling](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/OrderService.cs): `SEP490_Robot_FoodOrdering.Application/Service/Implementation/OrderService.cs`
- [Table endpoints](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.API/Controllers/TableController.cs): `SEP490_Robot_FoodOrdering.API/Controllers/TableController.cs`
- [Table sessions](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/TableSessionService.cs): `SEP490_Robot_FoodOrdering.Application/Service/Implementation/TableSessionService.cs`
- [Menu and catalog](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/ProductService.cs): `SEP490_Robot_FoodOrdering.Application/Service/Implementation/ProductService.cs`
- [Complaints](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/ComplainService.cs): `SEP490_Robot_FoodOrdering.Application/Service/Implementation/ComplainService.cs`

### Payments and engagement

- [Payment processing](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/PaymentService.cs): `SEP490_Robot_FoodOrdering.Application/Service/Implementation/PaymentService.cs`
- [Invoices](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/InvoiceService.cs): `SEP490_Robot_FoodOrdering.Application/Service/Implementation/InvoiceService.cs`
- [Feedback](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/FeedbackService.cs): `SEP490_Robot_FoodOrdering.Application/Service/Implementation/FeedbackService.cs`
- [Dashboards](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Application/Service/Implementation/DashboardService.cs): `SEP490_Robot_FoodOrdering.Application/Service/Implementation/DashboardService.cs`
- [Order notifications](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.API/Services/OrderNotificationService.cs): `SEP490_Robot_FoodOrdering.API/Services/OrderNotificationService.cs`
- [SignalR hubs](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.API/Hubs/OrderNotificationHub.cs): `SEP490_Robot_FoodOrdering.API/Hubs/OrderNotificationHub.cs`
- [Cloudinary images](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Infrastructure/Cloudinary/CloudinaryService.cs): `SEP490_Robot_FoodOrdering.Infrastructure/Cloudinary/CloudinaryService.cs`

### Persistence

- [Unit of work](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Infrastructure/UnitOfWork.cs): `SEP490_Robot_FoodOrdering.Infrastructure/UnitOfWork.cs`
- [Generic repository](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Infrastructure/Repository/GenericRepository.cs): `SEP490_Robot_FoodOrdering.Infrastructure/Repository/GenericRepository.cs`
- [Ordering database](https://github.com/quoctrieu010903/sep490_robot_orderingfood/blob/main/SEP490_Robot_FoodOrdering.Infrastructure/Data/Persistence/RobotFoodOrderingDBContext.cs): `SEP490_Robot_FoodOrdering.Infrastructure/Data/Persistence/RobotFoodOrderingDBContext.cs`

### Other components

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

## Connections

- Customer → HTTP API: sends requests
- Restaurant staff → HTTP API: sends requests
- HTTP API → Order endpoints: routes orders
- HTTP API → Table endpoints: routes tables
- HTTP API → Authentication: uses identity
- Order endpoints → Order handling: delegates orders (evidence: `SEP490_Robot_FoodOrdering.API/Controllers/OrderController.cs`)
- Table endpoints → Table sessions: manages sessions
- Authentication → Unit of work: reads and saves (evidence: `SEP490_Robot_FoodOrdering.Application/Service/Implementation/AuthenticationService.cs`)
- Authentication → JWT service: creates tokens (evidence: `SEP490_Robot_FoodOrdering.Application/Service/Implementation/AuthenticationService.cs`)
- Authentication → Cloudinary images: uploads avatars (evidence: `SEP490_Robot_FoodOrdering.Application/Service/Implementation/AuthenticationService.cs`)
- Table sessions → Unit of work: queries and saves (evidence: `SEP490_Robot_FoodOrdering.Application/Service/Implementation/TableSessionService.cs`)
- Table sessions → Ordering database: persists session state
- Table sessions → Complaints: resolves pending (evidence: `SEP490_Robot_FoodOrdering.Application/Service/Implementation/TableSessionService.cs`)
- Unit of work → Generic repository: provides repositories
- Generic repository → Ordering database: queries and updates (evidence: `SEP490_Robot_FoodOrdering.Infrastructure/Repository/GenericRepository.cs`)
- HTTP API → SignalR hubs: maps hubs (evidence: `SEP490_Robot_FoodOrdering.API/Program.cs`)
- Order notifications → SignalR hubs: sends updates (evidence: `SEP490_Robot_FoodOrdering.API/Services/OrderNotificationService.cs`)
- Order handling → Payment processing: initiates payment
- Order handling → Invoices: creates invoices
