# notbeexoul/delicious_restaurant_management_system architecture

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

- Interactive diagram: https://gitdiagram.com/notbeexoul/delicious_restaurant_management_system
- Repository: https://github.com/notbeexoul/delicious_restaurant_management_system

## Overview

1. **Overall shape**
   - This is a **single-process Python application** organized as a **role-based, menu-driven CLI system** for a restaurant workflow.
   - The architecture is split into a thin entry layer, four role packages, and a file-backed data layer.

2. **Entry point and authentication**
   - `main.py` is the application bootstrap.
   - It handles **login, limited password attempts, role detection, and navigation** into the correct dashboard for the authenticated user.
   - The login layer is the main security boundary: it decides whether the user becomes an Admin, Chef, Manager, or Customer.

3. **Role-based application boundary**
   - Each role has its own Python package:
     - `user_admin/`
     - `user_chef/`
     - `user_manager/`
     - `user_customer/`
   - This separation keeps role-specific menus and actions isolated, which is the primary modularity pattern in the repo.

4. **Admin subsystem**
   - `user_admin/` contains admin dashboard and admin operations such as **staff management, feedback review, reporting, and profile updates**.
   - The admin role is the top-level oversight layer: it consumes feedback and reporting data, and manages staff-related records.

5. **Manager subsystem**
   - `user_manager/` contains functions for **customer management, menu/item management, and manager profile updates**.
   - The manager acts as the operational controller for menu and customer data, sitting between admin oversight and day-to-day restaurant operations.

6. **Chef subsystem**
   - `user_chef/` contains chef-facing modules for **viewing orders, updating order status, and requesting ingredients**.
   - This package is the execution layer for kitchen workflow: it reads orders, changes fulfillment state, and feeds ingredient requests back into the system.

7. **Customer subsystem**
   - `user_customer/` contains customer features for **placing orders, checking order status, sending feedback, and updating the customer profile**.
   - This is the only subsystem that initiates new order data into the system and creates feedback records for admin review.

8. **Shared persistence layer**
   - `User_Data/` is the durable data store for the app, using JSON files instead of a database.
   - The main data files are:
     - `users.json` and `customer_credentials.json` for identity/account data
     - `menu.json` for available items
     - `orders.json` for order lifecycle data
     - `inventory.json` for stock/ingredient state
     - `feedbacks.json` for customer feedback
   - Because storage is file-based, most operations are read-modify-write against these shared JSON records.

9. **Key data flows**
   - **Customer → orders.json**: new orders are created and later tracked by status.
   - **Chef → orders.json / inventory.json**: chefs read incoming orders, update order state, and submit ingredient requests.
   - **Manager → menu.json / customer data**: managers maintain menu and customer records.
   - **Admin ← feedbacks.json / reports data**: admins review customer feedback and view system reports.
   - This makes `User_Data/` the central integration point shared by all role modules.

10. **Profile handling as a cross-cutting concern**
   - Each role package includes a `*profile.py` module.
   - These modules suggest profile editing/viewing is treated as a shared concern but still kept inside each role boundary, rather than centralized.

11. **Runtime and packaging**
   - The repository is pure Python and uses package directories with `__init__.py` files to separate concerns.
   - There is no evidence of a web framework, background worker, or database server; the system is intended to run locally as an interactive script.

12. **Architecture diagram takeaway**
   - The clearest diagram is: **`main.py` at the top → role dashboards → role actions → shared JSON data store**.
   - External dependencies are minimal; the major architectural constraint is the **shared file-based persistence**, which all roles read from and write to.

Main entry points: [`user_customer/customer.py`](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_customer/customer.py) (Customer dashboard), [`user_admin/admin.py`](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_admin/admin.py) (Admin dashboard), [`user_chef/chef.py`](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_chef/chef.py) (Chef dashboard), [`user_manager/manager.py`](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_manager/manager.py) (Manager dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Core"]
  node_main["main.py<br/>bootstrap/auth router<br/>[main.py]"]
end

subgraph group_admin["Admin"]
  node_admin_dash["Admin dashboard<br/>role menu<br/>[admin.py]"]
  node_admin_staff["Staff mgmt<br/>admin ops<br/>[manage_staff.py]"]
  node_admin_feedback["Feedback review<br/>admin ops<br/>[feedback.py]"]
  node_admin_reports["Reports<br/>admin ops<br/>[view_reports.py]"]
  node_admin_profile["Profile<br/>[adminprofile.py]"]
end

subgraph group_chef["Chef"]
  node_chef_dash["Chef dashboard<br/>role menu<br/>[chef.py]"]
  node_chef_view["View orders<br/>kitchen ops<br/>[vieworder.py]"]
  node_chef_update["Update order<br/>kitchen ops<br/>[updateorder.py]"]
  node_chef_request["Ingredient request<br/>kitchen ops"]
  node_chef_profile["Profile<br/>[chefprofile.py]"]
end

subgraph group_manager["Manager"]
  node_manager_dash["Manager dashboard<br/>role menu<br/>[manager.py]"]
  node_manager_customer["Customer mgmt<br/>manager ops<br/>[managecustomer.py]"]
  node_manager_menu["Menu mgmt<br/>manager ops<br/>[managemenu.py]"]
  node_manager_items["Item mgmt<br/>manager ops<br/>[manageitem.py]"]
  node_manager_profile["Profile<br/>[managerprofile.py]"]
end

subgraph group_customer["Customer"]
  node_customer_dash["Customer dashboard<br/>role menu<br/>[customer.py]"]
  node_customer_order["Place order<br/>ordering<br/>[order.py]"]
  node_customer_status["Order status<br/>ordering<br/>[orderstatus.py]"]
  node_customer_feedback["Send feedback<br/>ordering<br/>[sendfeedback.py]"]
  node_customer_profile["Profile<br/>[customerprofile.py]"]
end

subgraph group_data["Data"]
  node_users_json[("users.json<br/>account store<br/>[users.json]")]
  node_creds_json[("credentials<br/>auth store")]
  node_menu_json[("menu.json<br/>menu store<br/>[menu.json]")]
  node_orders_json[("orders.json<br/>order store<br/>[orders.json]")]
  node_inventory_json[("inventory.json<br/>stock store<br/>[inventory.json]")]
  node_feedbacks_json[("feedbacks.json<br/>feedback store<br/>[feedbacks.json]")]
end

node_main -->|"admin login"| node_admin_dash
node_main -->|"chef login"| node_chef_dash
node_main -->|"manager login"| node_manager_dash
node_main -->|"customer login"| node_customer_dash
node_admin_dash -->|"staff"| node_admin_staff
node_admin_dash -->|"feedback"| node_admin_feedback
node_admin_dash -->|"reports"| node_admin_reports
node_admin_dash -->|"profile"| node_admin_profile
node_chef_dash -->|"orders"| node_chef_view
node_chef_dash -->|"status"| node_chef_update
node_chef_dash -->|"inventory"| node_chef_request
node_chef_dash -->|"profile"| node_chef_profile
node_manager_dash -->|"customers"| node_manager_customer
node_manager_dash -->|"menu"| node_manager_menu
node_manager_dash -->|"items"| node_manager_items
node_manager_dash -->|"profile"| node_manager_profile
node_customer_dash -->|"order"| node_customer_order
node_customer_dash -->|"status"| node_customer_status
node_customer_dash -->|"feedback"| node_customer_feedback
node_customer_dash -->|"profile"| node_customer_profile
node_customer_order -->|"write"| node_orders_json
node_customer_status -->|"read"| node_orders_json
node_chef_view -->|"read"| node_orders_json
node_chef_update -->|"write"| node_orders_json
node_chef_request -->|"write"| node_inventory_json
node_manager_menu -->|"write"| node_menu_json
node_manager_items -->|"write"| node_menu_json
node_manager_customer -->|"write"| node_users_json
node_admin_staff -->|"write"| node_users_json
node_customer_feedback -->|"write"| node_feedbacks_json
node_admin_feedback -->|"read"| node_feedbacks_json
node_admin_reports -->|"read"| node_orders_json
node_admin_reports -->|"read"| node_feedbacks_json
node_chef_request -->|"read/write"| node_inventory_json
node_customer_dash -->|"auth"| node_creds_json

click node_main "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/main.py"
click node_admin_dash "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_admin/admin.py"
click node_admin_staff "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_admin/manage_staff.py"
click node_admin_feedback "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_admin/feedback.py"
click node_admin_reports "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_admin/view_reports.py"
click node_admin_profile "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_admin/adminprofile.py"
click node_chef_dash "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_chef/chef.py"
click node_chef_view "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_chef/vieworder.py"
click node_chef_update "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_chef/updateorder.py"
click node_chef_request "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_chef/Request_ingredients.py"
click node_chef_profile "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_chef/chefprofile.py"
click node_manager_dash "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_manager/manager.py"
click node_manager_customer "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_manager/managecustomer.py"
click node_manager_menu "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_manager/managemenu.py"
click node_manager_items "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_manager/manageitem.py"
click node_manager_profile "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_manager/managerprofile.py"
click node_customer_dash "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_customer/customer.py"
click node_customer_order "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_customer/order.py"
click node_customer_status "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_customer/orderstatus.py"
click node_customer_feedback "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_customer/sendfeedback.py"
click node_customer_profile "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_customer/customerprofile.py"
click node_users_json "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/User_Data/users.json"
click node_creds_json "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/User_Data/customer_credentials.json"
click node_menu_json "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/User_Data/menu.json"
click node_orders_json "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/User_Data/orders.json"
click node_inventory_json "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/User_Data/inventory.json"
click node_feedbacks_json "https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/User_Data/feedbacks.json"

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_main toneBlue
class node_admin_dash,node_admin_staff,node_admin_feedback,node_admin_reports,node_admin_profile toneAmber
class node_chef_dash,node_chef_view,node_chef_update,node_chef_request,node_chef_profile toneMint
class node_manager_dash,node_manager_customer,node_manager_menu,node_manager_items,node_manager_profile toneRose
class node_customer_dash,node_customer_order,node_customer_status,node_customer_feedback,node_customer_profile toneIndigo
class node_users_json,node_creds_json,node_menu_json,node_orders_json,node_inventory_json,node_feedbacks_json toneTeal
```

## Components

### Core

Bootstrap and role routing

- [main.py](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/main.py): bootstrap/auth router · Starts the app, handles login attempts, and routes users to a role dashboard · `main.py`

### Admin

Oversight and staff operations

- [Admin dashboard](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_admin/admin.py): role menu · Admin entry point for staff, feedback, reports, and profile actions · `user_admin/admin.py`
- [Staff mgmt](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_admin/manage_staff.py): admin ops · Creates and updates staff-related records · `user_admin/manage_staff.py`
- [Feedback review](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_admin/feedback.py): admin ops · Reviews customer feedback for oversight · `user_admin/feedback.py`
- [Reports](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_admin/view_reports.py): admin ops · Views system and performance reporting · `user_admin/view_reports.py`
- [Profile](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_admin/adminprofile.py): profile ui · Edits admin profile details · `user_admin/adminprofile.py`

### Chef

Kitchen workflow

- [Chef dashboard](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_chef/chef.py): role menu · Chef entry point for order and ingredient actions · `user_chef/chef.py`
- [View orders](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_chef/vieworder.py): kitchen ops · Loads incoming orders for kitchen work · `user_chef/vieworder.py`
- [Update order](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_chef/updateorder.py): kitchen ops · Changes order fulfillment status · `user_chef/updateorder.py`
- [Ingredient request](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_chef/Request_ingredients.py): kitchen ops · Submits ingredient or stock requests · `user_chef/Request_ingredients.py`
- [Profile](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_chef/chefprofile.py): profile ui · Edits chef profile details · `user_chef/chefprofile.py`

### Manager

Operational control

- [Manager dashboard](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_manager/manager.py): role menu · Manager entry point for customer, menu, and profile actions · `user_manager/manager.py`
- [Customer mgmt](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_manager/managecustomer.py): manager ops · Maintains customer-facing records · `user_manager/managecustomer.py`
- [Menu mgmt](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_manager/managemenu.py): manager ops · Maintains menu structure and items · `user_manager/managemenu.py`
- [Item mgmt](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_manager/manageitem.py): manager ops · Updates individual menu item details · `user_manager/manageitem.py`
- [Profile](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_manager/managerprofile.py): profile ui · Edits manager profile details · `user_manager/managerprofile.py`

### Customer

Guest ordering

- [Customer dashboard](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_customer/customer.py): role menu · Customer entry point for ordering, status, feedback, and profile actions · `user_customer/customer.py`
- [Place order](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_customer/order.py): ordering · Creates new customer orders · `user_customer/order.py`
- [Order status](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_customer/orderstatus.py): ordering · Checks current order progress · `user_customer/orderstatus.py`
- [Send feedback](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_customer/sendfeedback.py): ordering · Submits customer feedback records · `user_customer/sendfeedback.py`
- [Profile](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/user_customer/customerprofile.py): profile ui · Edits customer profile details · `user_customer/customerprofile.py`

### Data

Shared JSON persistence

- [users.json](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/User_Data/users.json): account store · Primary user account and identity records · `User_Data/users.json`
- [credentials](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/User_Data/customer_credentials.json): auth store · Customer credential records · `User_Data/customer_credentials.json`
- [menu.json](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/User_Data/menu.json): menu store · Available items and menu data · `User_Data/menu.json`
- [orders.json](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/User_Data/orders.json): order store · Order lifecycle and status records · `User_Data/orders.json`
- [inventory.json](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/User_Data/inventory.json): stock store · Ingredient and inventory state · `User_Data/inventory.json`
- [feedbacks.json](https://github.com/notbeexoul/delicious_restaurant_management_system/blob/main/User_Data/feedbacks.json): feedback store · Customer feedback records · `User_Data/feedbacks.json`

## Connections

- main.py → Admin dashboard: admin login · Routes authenticated admin users to the admin menu
- main.py → Chef dashboard: chef login · Routes authenticated chef users to the kitchen menu
- main.py → Manager dashboard: manager login · Routes authenticated manager users to the management menu
- main.py → Customer dashboard: customer login · Routes authenticated customer users to the customer menu
- Admin dashboard → Staff mgmt: staff · Opens staff management
- Admin dashboard → Feedback review: feedback · Opens feedback review
- Admin dashboard → Reports: reports · Opens reporting views
- Admin dashboard → Profile: profile · Opens admin profile editing
- Chef dashboard → View orders: orders · Loads orders to work on
- Chef dashboard → Update order: status · Updates order status
- Chef dashboard → Ingredient request: inventory · Requests ingredients or stock
- Chef dashboard → Profile: profile · Opens chef profile editing
- Manager dashboard → Customer mgmt: customers · Opens customer management
- Manager dashboard → Menu mgmt: menu · Opens menu management
- Manager dashboard → Item mgmt: items · Opens item management
- Manager dashboard → Profile: profile · Opens manager profile editing
- Customer dashboard → Place order: order · Starts a new order
- Customer dashboard → Order status: status · Checks order progress
- Customer dashboard → Send feedback: feedback · Submits feedback
- Customer dashboard → Profile: profile · Opens customer profile editing
- Place order → orders.json: write · Creates order records
- Order status → orders.json: read · Reads order lifecycle state
- View orders → orders.json: read · Reads incoming orders
- Update order → orders.json: write · Updates order status
- Ingredient request → inventory.json: write · Updates ingredient request or stock state
- Menu mgmt → menu.json: write · Maintains menu data
- Item mgmt → menu.json: write · Maintains item details
- Customer mgmt → users.json: write · Maintains customer records
- Staff mgmt → users.json: write · Maintains staff records
- Send feedback → feedbacks.json: write · Creates feedback records
- Feedback review → feedbacks.json: read · Reviews customer feedback
- Reports → orders.json: read · Uses order data for reporting
- Reports → feedbacks.json: read · Uses feedback data for reporting
- Ingredient request → inventory.json: read/write · Checks and updates stock-related requests
- Customer dashboard → credentials: auth · Relies on customer credential records during account handling
