# jurcandiana/food-delivery-management architecture

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

- Interactive diagram: https://gitdiagram.com/jurcandiana/food-delivery-management
- Repository: https://github.com/jurcandiana/food-delivery-management

## Overview

Food-Delivery-Management is a Java Swing application for administering a food menu, placing orders, and handling employee notifications. Users enter through login/sign-up and are routed by role; clients browse/search and submit orders, administrators manage products and generate reports, and employees observe new orders. DeliveryService coordinates business operations, while file helpers and serialization persist data and produce bills/reports. The README documents several capabilities whose detailed implementation was not sampled; those links are shown as documented rather than inferred from unsampled calls.

Main entry points: [`src/main/java/business/DeliveryService.java`](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/business/DeliveryService.java) (Delivery service), [`src/main/java/presentation/LogInGUI.java`](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/presentation/LogInGUI.java) (Login and signup), [`src/main/java/presentation/AdministratorGUI.java`](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/presentation/AdministratorGUI.java) (Administrator UI), [`src/main/java/presentation/ClientGUI.java`](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/presentation/ClientGUI.java) (Client UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["User interfaces"]
  node_login["Login and signup<br/>[LogInGUI.java]"]
  node_adminui["Administrator UI"]
  node_clientui["Client UI<br/>[ClientGUI.java]"]
  node_employeeui["Employee UI<br/>[EmployeeGUI.java]"]
  node_itemtable["Menu table"]
end

subgraph group_operations["Delivery operations"]
  node_service["Delivery service"]
  node_processing["Service contract"]
end

subgraph group_domain["Business domain"]
  node_menuitem["Menu item model<br/>[MenuItem.java]"]
  node_baseproduct["Base product<br/>[BaseProduct.java]"]
  node_composite["Composite product"]
  node_order["Order record<br/>[Order.java]"]
  node_account["User and role<br/>[User.java]"]
  node_usertype["Role types<br/>[UserType.java]"]
end

subgraph group_persistence["Persistence and output"]
  node_fileio["CSV, bills, reports"]
  node_serializer["Object serialization<br/>[Serializator.java]"]
  node_datafiles[("Saved application data<br/>[menu.txt]")]
end

node_user(("User"))

node_user -->|"authenticates"| node_login
node_login -->|"checks account"| node_service
node_login -->|"opens client"| node_clientui
node_login -->|"opens admin"| node_adminui
node_login -->|"opens employee"| node_employeeui
node_clientui -->|"searches and orders"| node_service
node_adminui -->|"manages and reports"| node_service
node_employeeui -->|"observes new orders"| node_service
node_adminui -->|"renders menu"| node_itemtable
node_clientui -->|"renders menu"| node_itemtable
node_service -->|"imports CSV; writes bills"| node_fileio
node_service -->|"serializes and restores"| node_serializer
node_serializer -->|"persists objects"| node_datafiles
node_fileio -->|"writes bills and reports"| node_datafiles
node_service -->|"implements"| node_processing
node_composite -->|"extends and contains"| node_menuitem
node_baseproduct -->|"extends"| node_menuitem
node_adminui -->|"creates composed products"| node_composite
node_service -->|"creates and records"| node_order
node_service -->|"manages users"| node_account
node_account -->|"has role"| node_usertype

click node_login "https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/presentation/LogInGUI.java"
click node_adminui "https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/presentation/AdministratorGUI.java"
click node_clientui "https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/presentation/ClientGUI.java"
click node_employeeui "https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/presentation/EmployeeGUI.java"
click node_itemtable "https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/presentation/MenuItemsTable.java"
click node_service "https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/business/DeliveryService.java"
click node_processing "https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/business/IDeliveryServiceProcessing.java"
click node_menuitem "https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/business/MenuItem.java"
click node_baseproduct "https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/business/BaseProduct.java"
click node_composite "https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/business/CompositeProduct.java"
click node_order "https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/business/Order.java"
click node_account "https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/business/User.java"
click node_usertype "https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/business/UserType.java"
click node_fileio "https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/data/FileReaderWriter.java"
click node_serializer "https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/data/Serializator.java"
click node_datafiles "https://github.com/jurcandiana/food-delivery-management/blob/main/menu.txt"

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_login,node_adminui,node_clientui,node_employeeui,node_itemtable,node_user toneBlue
class node_service,node_processing toneAmber
class node_menuitem,node_baseproduct,node_composite,node_order,node_account,node_usertype toneMint
class node_fileio,node_serializer,node_datafiles toneRose
```

## Components

### User interfaces

- [Login and signup](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/presentation/LogInGUI.java): `src/main/java/presentation/LogInGUI.java`
- [Administrator UI](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/presentation/AdministratorGUI.java): `src/main/java/presentation/AdministratorGUI.java`
- [Client UI](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/presentation/ClientGUI.java): `src/main/java/presentation/ClientGUI.java`
- [Employee UI](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/presentation/EmployeeGUI.java): `src/main/java/presentation/EmployeeGUI.java`
- [Menu table](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/presentation/MenuItemsTable.java): `src/main/java/presentation/MenuItemsTable.java`

### Delivery operations

- [Delivery service](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/business/DeliveryService.java): `src/main/java/business/DeliveryService.java`
- [Service contract](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/business/IDeliveryServiceProcessing.java): `src/main/java/business/IDeliveryServiceProcessing.java`

### Business domain

- [Menu item model](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/business/MenuItem.java): `src/main/java/business/MenuItem.java`
- [Base product](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/business/BaseProduct.java): `src/main/java/business/BaseProduct.java`
- [Composite product](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/business/CompositeProduct.java): `src/main/java/business/CompositeProduct.java`
- [Order record](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/business/Order.java): `src/main/java/business/Order.java`
- [User and role](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/business/User.java): `src/main/java/business/User.java`
- [Role types](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/business/UserType.java): `src/main/java/business/UserType.java`

### Persistence and output

- [CSV, bills, reports](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/data/FileReaderWriter.java): `src/main/java/data/FileReaderWriter.java`
- [Object serialization](https://github.com/jurcandiana/food-delivery-management/blob/main/src/main/java/data/Serializator.java): `src/main/java/data/Serializator.java`
- [Saved application data](https://github.com/jurcandiana/food-delivery-management/blob/main/menu.txt): `menu.txt`

### Other components

- **User**

## Connections

- User → Login and signup: authenticates (evidence: `README.md`)
- Login and signup → Delivery service: checks account (evidence: `src/main/java/presentation/LogInGUI.java`)
- Login and signup → Client UI: opens client (evidence: `src/main/java/presentation/LogInGUI.java`)
- Login and signup → Administrator UI: opens admin (evidence: `src/main/java/presentation/LogInGUI.java`)
- Login and signup → Employee UI: opens employee (evidence: `src/main/java/presentation/LogInGUI.java`)
- Client UI → Delivery service: searches and orders (evidence: `src/main/java/presentation/ClientGUI.java`)
- Administrator UI → Delivery service: manages and reports (evidence: `README.md`)
- Employee UI → Delivery service: observes new orders (evidence: `README.md`)
- Administrator UI → Menu table: renders menu (evidence: `src/main/java/presentation/AdministratorGUI.java`)
- Client UI → Menu table: renders menu (evidence: `src/main/java/presentation/ClientGUI.java`)
- Delivery service → CSV, bills, reports: imports CSV; writes bills (evidence: `src/main/java/business/DeliveryService.java`)
- Delivery service → Object serialization: serializes and restores (evidence: `src/main/java/business/DeliveryService.java`)
- Object serialization → Saved application data: persists objects (evidence: `README.md`)
- CSV, bills, reports → Saved application data: writes bills and reports (evidence: `src/main/java/data/FileReaderWriter.java`)
- Delivery service → Service contract: implements (evidence: `src/main/java/business/DeliveryService.java`)
- Composite product → Menu item model: extends and contains (evidence: `src/main/java/business/CompositeProduct.java`)
- Base product → Menu item model: extends (evidence: `src/main/java/business/BaseProduct.java`)
- Administrator UI → Composite product: creates composed products (evidence: `README.md`)
- Delivery service → Order record: creates and records (evidence: `src/main/java/business/DeliveryService.java`)
- Delivery service → User and role: manages users (evidence: `src/main/java/business/DeliveryService.java`)
- User and role → Role types: has role (evidence: `src/main/java/business/User.java`)
