# takrony05/ctrl-alt-eat architecture

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

- Interactive diagram: https://gitdiagram.com/takrony05/ctrl-alt-eat
- Repository: https://github.com/takrony05/ctrl-alt-eat

## Overview

Ctrl-Alt-Eat is a restaurant customer-ordering app paired with a kitchen display system. Customers authenticate, browse the menu, customize a cart, check out, and track order status; chefs manage the kitchen queue and advance orders through ready and delivered. The graph includes the React routing/state and API layers, Django order/auth handling, persistence, and the documented WebSocket notification path. Some frontend pages, backend routing, and kitchen components were not excerpted, so their links are included only where the README or SOURCE INDEX supports them.

Main entry points: [`frontend/src/services/api.js`](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/services/api.js) (API Client), [`frontend/src/App.jsx`](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/App.jsx) (React Router App), [`backend/orders/models.py`](https://github.com/takrony05/ctrl-alt-eat/blob/main/backend/orders/models.py) (Users Menu Orders), [`frontend/src/pages/CheckoutPage.jsx`](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/pages/CheckoutPage.jsx) (Checkout and Payment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer Ordering"]
  node_auth_ui["Login and Signup<br/>[Login.jsx]"]
  node_menu_cart["Menu and Cart<br/>[CreateOrder.jsx]"]
  node_checkout["Checkout and Payment<br/>[CheckoutPage.jsx]"]
  node_cart_page["Cart Page<br/>[Cart.jsx]"]
  node_payment_options["Payment Options<br/>[PaymentOptions.jsx]"]
  node_history["Order History<br/>[OrderHistory.jsx]"]
  node_tracking["Order Tracking"]
  node_kitchen_dashboard["Kitchen Dashboard<br/>[Dashboard.jsx]"]
end

subgraph group_frontend["Frontend Platform"]
  node_app["React Router App<br/>[App.jsx]"]
  node_auth_state["Auth Context<br/>[AuthContext.jsx]"]
  node_cart_state["Cart State<br/>[CartContext.jsx]"]
  node_poller["Status Poller"]
  node_api["API Client<br/>[api.js]"]
  node_kitchen_board["FIFO Kitchen Board<br/>[KitchenBoard.jsx]"]
  node_status_buttons["Status Controls<br/>[StatusButtons.jsx]"]
end

subgraph group_backend["Order Backend"]
  node_models[("Users Menu Orders<br/>[models.py]")]
  node_serializers["Request Serialization<br/>[serializers.py]"]
  node_auth_views["Auth Endpoints<br/>[auth_views.py]"]
  node_order_views["Order Endpoints<br/>[order_views.py]"]
  node_dashboard_views["Kitchen Endpoints<br/>[dashboard_views.py]"]
  node_permissions["Chef Permissions<br/>[permissions.py]"]
  node_database[("Relational Database")]
end

subgraph group_realtime["Kitchen Realtime"]
  node_channels["WebSocket Consumer<br/>[consumers.py]"]
  node_socket_hook["Order Socket Hook<br/>[useOrderSocket.js]"]
  node_ready_notice["Ready Notification"]
end

node_customer(("Customer"))
node_chef(("Chef"))

node_customer -->|"signs in"| node_auth_ui
node_auth_ui -->|"calls auth"| node_auth_state
node_auth_state -->|"auth requests"| node_api
node_app -->|"routes to"| node_auth_ui
node_app -->|"routes to"| node_menu_cart
node_app -->|"routes to"| node_cart_page
node_app -->|"routes to"| node_checkout
node_app -->|"routes to"| node_kitchen_dashboard
node_menu_cart -->|"updates cart"| node_cart_state
node_cart_page -->|"reads cart"| node_cart_state
node_checkout -->|"reads cart"| node_cart_state
node_checkout -->|"renders"| node_payment_options
node_cart_page -->|"renders"| node_payment_options
node_menu_cart -->|"loads menu"| node_api
node_checkout -->|"places order"| node_api
node_history -->|"loads orders"| node_api
node_tracking -->|"renders"| node_poller
node_kitchen_dashboard -->|"renders"| node_kitchen_board
node_kitchen_dashboard -->|"loads queue"| node_api
node_chef -->|"manages orders"| node_kitchen_dashboard
node_api -->|"sends auth requests"| node_auth_views
node_api -->|"sends order requests"| node_order_views
node_api -->|"requests kitchen queue"| node_dashboard_views
node_auth_views -->|"validates credentials"| node_serializers
node_order_views -->|"serializes orders"| node_serializers
node_dashboard_views -->|"serializes queue"| node_serializers
node_dashboard_views -->|"checks access"| node_permissions
node_serializers -->|"reads and writes"| node_models
node_auth_views -->|"creates users"| node_models
node_order_views -->|"reads and writes"| node_models
node_dashboard_views -->|"reads orders"| node_models
node_models -->|"persists records"| node_database
node_kitchen_board -.->|"shows controls"| node_status_buttons
node_status_buttons -.->|"updates status"| node_api
node_app -->|"subscribes"| node_socket_hook
node_socket_hook -->|"receives events"| node_channels
node_channels -.->|"signals readiness"| node_ready_notice
node_app -->|"shows alert"| node_ready_notice
node_api -->|"polls status"| node_order_views
node_chef -->|"advances status"| node_status_buttons

click node_app "https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/App.jsx"
click node_auth_ui "https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/pages/Login.jsx"
click node_auth_state "https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/context/AuthContext.jsx"
click node_menu_cart "https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/pages/CreateOrder.jsx"
click node_cart_state "https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/context/CartContext.jsx"
click node_checkout "https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/pages/CheckoutPage.jsx"
click node_cart_page "https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/pages/Cart.jsx"
click node_payment_options "https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/components/PaymentOptions.jsx"
click node_history "https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/pages/OrderHistory.jsx"
click node_tracking "https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/pages/OrderTrackingPage.jsx"
click node_poller "https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/components/OrderStatusPoller.jsx"
click node_api "https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/services/api.js"
click node_kitchen_dashboard "https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/pages/Dashboard.jsx"
click node_kitchen_board "https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/components/KitchenBoard.jsx"
click node_status_buttons "https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/components/StatusButtons.jsx"
click node_models "https://github.com/takrony05/ctrl-alt-eat/blob/main/backend/orders/models.py"
click node_serializers "https://github.com/takrony05/ctrl-alt-eat/blob/main/backend/orders/serializers.py"
click node_auth_views "https://github.com/takrony05/ctrl-alt-eat/blob/main/backend/orders/views/auth_views.py"
click node_order_views "https://github.com/takrony05/ctrl-alt-eat/blob/main/backend/orders/views/order_views.py"
click node_dashboard_views "https://github.com/takrony05/ctrl-alt-eat/blob/main/backend/orders/views/dashboard_views.py"
click node_permissions "https://github.com/takrony05/ctrl-alt-eat/blob/main/backend/orders/permissions.py"
click node_channels "https://github.com/takrony05/ctrl-alt-eat/blob/main/backend/orders/consumers.py"
click node_socket_hook "https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/hooks/useOrderSocket.js"
click node_ready_notice "https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/components/ReadyNotification.jsx"

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_auth_ui,node_menu_cart,node_checkout,node_cart_page,node_payment_options,node_history,node_tracking,node_kitchen_dashboard toneBlue
class node_app,node_auth_state,node_cart_state,node_poller,node_api,node_kitchen_board,node_status_buttons toneAmber
class node_models,node_serializers,node_auth_views,node_order_views,node_dashboard_views,node_permissions,node_database toneMint
class node_channels,node_socket_hook,node_ready_notice toneRose
class node_customer,node_chef toneIndigo
```

## Components

### Customer Ordering

- [Login and Signup](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Menu and Cart](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/pages/CreateOrder.jsx): `frontend/src/pages/CreateOrder.jsx`
- [Checkout and Payment](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/pages/CheckoutPage.jsx): `frontend/src/pages/CheckoutPage.jsx`
- [Cart Page](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/pages/Cart.jsx): `frontend/src/pages/Cart.jsx`
- [Payment Options](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/components/PaymentOptions.jsx): `frontend/src/components/PaymentOptions.jsx`
- [Order History](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/pages/OrderHistory.jsx): `frontend/src/pages/OrderHistory.jsx`
- [Order Tracking](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/pages/OrderTrackingPage.jsx): `frontend/src/pages/OrderTrackingPage.jsx`
- [Kitchen Dashboard](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`

### Frontend Platform

- [React Router App](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Auth Context](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Cart State](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/context/CartContext.jsx): `frontend/src/context/CartContext.jsx`
- [Status Poller](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/components/OrderStatusPoller.jsx): `frontend/src/components/OrderStatusPoller.jsx`
- [API Client](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [FIFO Kitchen Board](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/components/KitchenBoard.jsx): `frontend/src/components/KitchenBoard.jsx`
- [Status Controls](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/components/StatusButtons.jsx): `frontend/src/components/StatusButtons.jsx`

### Order Backend

- [Users Menu Orders](https://github.com/takrony05/ctrl-alt-eat/blob/main/backend/orders/models.py): `backend/orders/models.py`
- [Request Serialization](https://github.com/takrony05/ctrl-alt-eat/blob/main/backend/orders/serializers.py): `backend/orders/serializers.py`
- [Auth Endpoints](https://github.com/takrony05/ctrl-alt-eat/blob/main/backend/orders/views/auth_views.py): `backend/orders/views/auth_views.py`
- [Order Endpoints](https://github.com/takrony05/ctrl-alt-eat/blob/main/backend/orders/views/order_views.py): `backend/orders/views/order_views.py`
- [Kitchen Endpoints](https://github.com/takrony05/ctrl-alt-eat/blob/main/backend/orders/views/dashboard_views.py): `backend/orders/views/dashboard_views.py`
- [Chef Permissions](https://github.com/takrony05/ctrl-alt-eat/blob/main/backend/orders/permissions.py): `backend/orders/permissions.py`
- **Relational Database**

### Kitchen Realtime

- [WebSocket Consumer](https://github.com/takrony05/ctrl-alt-eat/blob/main/backend/orders/consumers.py): `backend/orders/consumers.py`
- [Order Socket Hook](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/hooks/useOrderSocket.js): `frontend/src/hooks/useOrderSocket.js`
- [Ready Notification](https://github.com/takrony05/ctrl-alt-eat/blob/main/frontend/src/components/ReadyNotification.jsx): `frontend/src/components/ReadyNotification.jsx`

### Other components

- **Customer**
- **Chef**

## Connections

- Customer → Login and Signup: signs in
- Login and Signup → Auth Context: calls auth (evidence: `frontend/src/pages/Login.jsx`)
- Auth Context → API Client: auth requests (evidence: `frontend/src/context/AuthContext.jsx`)
- React Router App → Login and Signup: routes to (evidence: `frontend/src/App.jsx`)
- React Router App → Menu and Cart: routes to (evidence: `frontend/src/App.jsx`)
- React Router App → Cart Page: routes to (evidence: `frontend/src/App.jsx`)
- React Router App → Checkout and Payment: routes to (evidence: `frontend/src/App.jsx`)
- React Router App → Kitchen Dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Menu and Cart → Cart State: updates cart (evidence: `frontend/src/pages/CreateOrder.jsx`)
- Cart Page → Cart State: reads cart (evidence: `frontend/src/pages/Cart.jsx`)
- Checkout and Payment → Cart State: reads cart (evidence: `frontend/src/pages/CheckoutPage.jsx`)
- Checkout and Payment → Payment Options: renders (evidence: `frontend/src/pages/CheckoutPage.jsx`)
- Cart Page → Payment Options: renders (evidence: `frontend/src/pages/Cart.jsx`)
- Menu and Cart → API Client: loads menu (evidence: `frontend/src/pages/CreateOrder.jsx`)
- Checkout and Payment → API Client: places order (evidence: `frontend/src/pages/CheckoutPage.jsx`)
- Order History → API Client: loads orders (evidence: `frontend/src/pages/OrderHistory.jsx`)
- Order Tracking → Status Poller: renders (evidence: `frontend/src/pages/OrderTrackingPage.jsx`)
- Kitchen Dashboard → FIFO Kitchen Board: renders (evidence: `frontend/src/pages/Dashboard.jsx`)
- Kitchen Dashboard → API Client: loads queue (evidence: `frontend/src/pages/Dashboard.jsx`)
- Chef → Kitchen Dashboard: manages orders (evidence: `README.md`)
- API Client → Auth Endpoints: sends auth requests (evidence: `README.md`)
- API Client → Order Endpoints: sends order requests (evidence: `README.md`)
- API Client → Kitchen Endpoints: requests kitchen queue (evidence: `README.md`)
- Auth Endpoints → Request Serialization: validates credentials (evidence: `backend/orders/views/auth_views.py`)
- Order Endpoints → Request Serialization: serializes orders (evidence: `backend/orders/serializers.py`)
- Kitchen Endpoints → Request Serialization: serializes queue (evidence: `backend/orders/views/dashboard_views.py`)
- Kitchen Endpoints → Chef Permissions: checks access (evidence: `backend/orders/views/dashboard_views.py`)
- Request Serialization → Users Menu Orders: reads and writes (evidence: `backend/orders/serializers.py`)
- Auth Endpoints → Users Menu Orders: creates users (evidence: `backend/orders/views/auth_views.py`)
- Order Endpoints → Users Menu Orders: reads and writes (evidence: `backend/orders/views/order_views.py`)
- Kitchen Endpoints → Users Menu Orders: reads orders (evidence: `backend/orders/views/dashboard_views.py`)
- Users Menu Orders → Relational Database: persists records (evidence: `README.md`)
- FIFO Kitchen Board → Status Controls: shows controls
- Status Controls → API Client: updates status
- React Router App → Order Socket Hook: subscribes (evidence: `frontend/src/App.jsx`)
- Order Socket Hook → WebSocket Consumer: receives events (evidence: `frontend/src/hooks/useOrderSocket.js`)
- WebSocket Consumer → Ready Notification: signals readiness (evidence: `README.md`)
- React Router App → Ready Notification: shows alert (evidence: `frontend/src/App.jsx`)
- API Client → Order Endpoints: polls status (evidence: `README.md`)
- Chef → Status Controls: advances status (evidence: `README.md`)
