# rajeshkarmaker/mayer_doa_restaurant architecture

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

- Interactive diagram: https://gitdiagram.com/rajeshkarmaker/mayer_doa_restaurant
- Repository: https://github.com/rajeshkarmaker/mayer_doa_restaurant

## Overview

Mayer Doa Restaurant is a Windows terminal-based, multi-process restaurant management system. Customers choose dine-in or takeaway, reserve tables when needed, select available menu items, and place an order; admin staff manage order status, stock, sales, and session resets. Kitchen and diner screens independently poll shared order data to show placed and ready orders. The launcher starts the four screens, which coordinate through text files rather than a server. Relationships follow the README and shown C excerpts; unsampled data-file formats and runtime behavior are not inferred.

Main entry points: [`foodorder.txt`](https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/foodorder.txt) (Order History), [`admin.c`](https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/admin.c) (Admin Panel), [`Mayer_Doa_Restaurant.c`](https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/Mayer_Doa_Restaurant.c) (Screen Launcher), [`customer.c`](https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/customer.c) (Customer Screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launch["Screen Launch"]
  node_launcher["Screen Launcher"]
end

subgraph group_customer["Customer Ordering"]
  node_customer_app["Customer Screen<br/>[customer.c]"]
  node_reservation["Table Reservation<br/>[customer.c]"]
  node_ordering["Menu and Order<br/>[customer.c]"]
  node_order_record["Order Recording<br/>[customer.c]"]
end

subgraph group_admin["Administration"]
  node_admin_app["Admin Panel<br/>[admin.c]"]
  node_status["Status Control<br/>[admin.c]"]
  node_sales["Sales Reports<br/>[admin.c]"]
  node_stock["Stock Control<br/>[admin.c]"]
  node_sessions["Session Reset<br/>[admin.c]"]
end

subgraph group_fulfillment["Order Displays"]
  node_kitchen["Chef Dashboard<br/>[kitchen.c]"]
  node_pickup["Diner Pickup Board<br/>[audience.c]"]
end

subgraph group_storage["Shared Files"]
  node_orders_file[("Order History<br/>[foodorder.txt]")]
  node_stock_file[("Food Availability<br/>[foodstock.txt]")]
end

node_visitor(("Restaurant User"))
node_staff(("Restaurant Staff"))

node_visitor -.->|"starts system"| node_launcher
node_launcher -->|"launches"| node_customer_app
node_launcher -->|"launches"| node_admin_app
node_launcher -->|"launches"| node_kitchen
node_launcher -->|"launches"| node_pickup
node_visitor -.->|"places orders"| node_customer_app
node_customer_app -->|"offers dine-in"| node_reservation
node_customer_app -->|"offers takeaway"| node_ordering
node_reservation -->|"reads availability"| node_orders_file
node_ordering -->|"reads availability"| node_stock_file
node_ordering -->|"records order"| node_order_record
node_order_record -->|"appends order"| node_orders_file
node_staff -.->|"manages restaurant"| node_admin_app
node_admin_app -->|"dispatches"| node_status
node_admin_app -->|"dispatches"| node_sales
node_admin_app -->|"dispatches"| node_stock
node_admin_app -->|"dispatches"| node_sessions
node_status -->|"updates status"| node_orders_file
node_sales -->|"reads totals"| node_orders_file
node_stock -->|"toggles stock"| node_stock_file
node_sessions -->|"completes orders"| node_orders_file
node_sessions -->|"restocks items"| node_stock_file
node_kitchen -->|"polls pending"| node_orders_file
node_pickup -->|"polls ready"| node_orders_file

click node_launcher "https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/Mayer_Doa_Restaurant.c"
click node_customer_app "https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/customer.c"
click node_reservation "https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/customer.c"
click node_ordering "https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/customer.c"
click node_order_record "https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/customer.c"
click node_admin_app "https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/admin.c"
click node_status "https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/admin.c"
click node_sales "https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/admin.c"
click node_stock "https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/admin.c"
click node_sessions "https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/admin.c"
click node_kitchen "https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/kitchen.c"
click node_pickup "https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/audience.c"
click node_orders_file "https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/foodorder.txt"
click node_stock_file "https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/foodstock.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_launcher,node_visitor toneBlue
class node_customer_app,node_reservation,node_ordering,node_order_record toneAmber
class node_admin_app,node_status,node_sales,node_stock,node_sessions toneMint
class node_kitchen,node_pickup toneRose
class node_orders_file,node_stock_file,node_staff toneIndigo
```

## Components

### Screen Launch

- [Screen Launcher](https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/Mayer_Doa_Restaurant.c): `Mayer_Doa_Restaurant.c`

### Customer Ordering

- [Customer Screen](https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/customer.c): `customer.c`
- [Table Reservation](https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/customer.c): `customer.c`
- [Menu and Order](https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/customer.c): `customer.c`
- [Order Recording](https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/customer.c): `customer.c`

### Administration

- [Admin Panel](https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/admin.c): `admin.c`
- [Status Control](https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/admin.c): `admin.c`
- [Sales Reports](https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/admin.c): `admin.c`
- [Stock Control](https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/admin.c): `admin.c`
- [Session Reset](https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/admin.c): `admin.c`

### Order Displays

- [Chef Dashboard](https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/kitchen.c): `kitchen.c`
- [Diner Pickup Board](https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/audience.c): `audience.c`

### Shared Files

- [Order History](https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/foodorder.txt): `foodorder.txt`
- [Food Availability](https://github.com/rajeshkarmaker/mayer_doa_restaurant/blob/main/foodstock.txt): `foodstock.txt`

### Other components

- **Restaurant User**
- **Restaurant Staff**

## Connections

- Restaurant User → Screen Launcher: starts system (evidence: `README.md`)
- Screen Launcher → Customer Screen: launches (evidence: `Mayer_Doa_Restaurant.c`)
- Screen Launcher → Admin Panel: launches (evidence: `Mayer_Doa_Restaurant.c`)
- Screen Launcher → Chef Dashboard: launches (evidence: `Mayer_Doa_Restaurant.c`)
- Screen Launcher → Diner Pickup Board: launches (evidence: `Mayer_Doa_Restaurant.c`)
- Restaurant User → Customer Screen: places orders (evidence: `README.md`)
- Customer Screen → Table Reservation: offers dine-in (evidence: `customer.c`)
- Customer Screen → Menu and Order: offers takeaway (evidence: `customer.c`)
- Table Reservation → Order History: reads availability (evidence: `customer.c`)
- Menu and Order → Food Availability: reads availability (evidence: `customer.c`)
- Menu and Order → Order Recording: records order (evidence: `customer.c`)
- Order Recording → Order History: appends order (evidence: `customer.c`)
- Restaurant Staff → Admin Panel: manages restaurant (evidence: `README.md`)
- Admin Panel → Status Control: dispatches (evidence: `admin.c`)
- Admin Panel → Sales Reports: dispatches (evidence: `admin.c`)
- Admin Panel → Stock Control: dispatches (evidence: `admin.c`)
- Admin Panel → Session Reset: dispatches (evidence: `admin.c`)
- Status Control → Order History: updates status (evidence: `admin.c`)
- Sales Reports → Order History: reads totals (evidence: `admin.c`)
- Stock Control → Food Availability: toggles stock (evidence: `admin.c`)
- Session Reset → Order History: completes orders (evidence: `admin.c`)
- Session Reset → Food Availability: restocks items (evidence: `admin.c`)
- Chef Dashboard → Order History: polls pending (evidence: `kitchen.c`)
- Diner Pickup Board → Order History: polls ready (evidence: `audience.c`)
