How notbeexoul/delicious_restaurant_management_system works
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: customer.py Customer dashboard · admin.py Admin dashboard · chef.py Chef dashboard · manager.py Manager dashboard
Components 27
Core
Bootstrap and role routing
- main.py · Starts the app, handles login attempts, and routes users to a role dashboard
main.py
Admin
Oversight and staff operations
- Admin dashboard · Admin entry point for staff, feedback, reports, and profile actions
user_admin/admin.py - Staff mgmt · Creates and updates staff-related records
user_admin/manage_staff.py - Feedback review · Reviews customer feedback for oversight
user_admin/feedback.py - Reports · Views system and performance reporting
user_admin/view_reports.py - Profile · Edits admin profile details
user_admin/adminprofile.py
Chef
Kitchen workflow
- Chef dashboard · Chef entry point for order and ingredient actions
user_chef/chef.py - View orders · Loads incoming orders for kitchen work
user_chef/vieworder.py - Update order · Changes order fulfillment status
user_chef/updateorder.py - Ingredient request · Submits ingredient or stock requests
user_chef/Request_ingredients.py - Profile · Edits chef profile details
user_chef/chefprofile.py
Manager
Operational control
- Manager dashboard · Manager entry point for customer, menu, and profile actions
user_manager/manager.py - Customer mgmt · Maintains customer-facing records
user_manager/managecustomer.py - Menu mgmt · Maintains menu structure and items
user_manager/managemenu.py - Item mgmt · Updates individual menu item details
user_manager/manageitem.py - Profile · Edits manager profile details
user_manager/managerprofile.py
Customer
Guest ordering
- Customer dashboard · Customer entry point for ordering, status, feedback, and profile actions
user_customer/customer.py - Place order · Creates new customer orders
user_customer/order.py - Order status · Checks current order progress
user_customer/orderstatus.py - Send feedback · Submits customer feedback records
user_customer/sendfeedback.py - Profile · Edits customer profile details
user_customer/customerprofile.py
Data
Shared JSON persistence
- users.json · Primary user account and identity records
User_Data/users.json - credentials · Customer credential records
User_Data/customer_credentials.json - menu.json · Available items and menu data
User_Data/menu.json - orders.json · Order lifecycle and status records
User_Data/orders.json - inventory.json · Ingredient and inventory state
User_Data/inventory.json - feedbacks.json · Customer feedback records
User_Data/feedbacks.json
Connections 35
- 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