# charan30301/food architecture

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

- Interactive diagram: https://gitdiagram.com/charan30301/food
- Repository: https://github.com/charan30301/food

## Overview

Grand Palace is a Flask-based food preordering and kitchen-management system. Customers authenticate, browse the menu, maintain a cart, submit orders and track kitchen status; kitchen staff manage requests, order states, menu availability and operational settings. The implementation is concentrated in app.py, with HTML views under templates/. The README documents payment, OAuth, and media-management capabilities, but the excerpts do not show all their implementation details; those links are identified as documented rather than inferred from unseen code.

Main entry points: [`app.py`](https://github.com/charan30301/food/blob/main/app.py) (Flask routes), [`templates/menu.html`](https://github.com/charan30301/food/blob/main/templates/menu.html) (Menu view), [`templates/cart.html`](https://github.com/charan30301/food/blob/main/templates/cart.html) (Cart view), [`templates/admin_dashboard.html`](https://github.com/charan30301/food/blob/main/templates/admin_dashboard.html) (Admin dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer ordering"]
  node_menu["Menu and cart<br/>[app.py]"]
  node_menu_view["Menu view<br/>[menu.html]"]
  node_cart_view["Cart view<br/>[cart.html]"]
  node_orders["Order submission<br/>[app.py]"]
  node_tracking["Order tracking<br/>[app.py]"]
end

subgraph group_kitchen["Kitchen operations"]
  node_admin_auth["Admin authentication<br/>[app.py]"]
  node_admin_ops["Order operations<br/>[app.py]"]
  node_menu_admin["Menu management<br/>[app.py]"]
  node_kitchen_settings["Kitchen settings<br/>[app.py]"]
  node_media_admin["Media management<br/>[app.py]"]
  node_admin_view["Admin dashboard"]
  node_admin_login_view["Admin login view<br/>[admin_login.html]"]
end

subgraph group_backend["Application services"]
  node_web["Flask routes<br/>[app.py]"]
  node_auth["Customer authentication<br/>[app.py]"]
  node_payments["Payment processing<br/>[app.py]"]
end

subgraph group_integrations["External services"]
  node_database[("PostgreSQL")]
  node_google["Google Identity"]
  node_razorpay["Razorpay"]
  node_uploads[("Uploaded media")]
end

node_customer(("Customer"))
node_admin(("Kitchen staff"))

node_customer -->|"uses"| node_web
node_web -->|"renders"| node_menu_view
node_web -->|"renders"| node_cart_view
node_web -->|"routes to"| node_auth
node_auth -->|"verifies token"| node_google
node_web -->|"routes to"| node_menu
node_menu -->|"reads and writes"| node_database
node_web -->|"routes to"| node_orders
node_orders -->|"reads and writes"| node_database
node_orders -.->|"initiates payment"| node_payments
node_payments -.->|"uses gateway"| node_razorpay
node_web -->|"routes to"| node_tracking
node_tracking -->|"reads and updates"| node_database
node_admin -->|"uses"| node_web
node_web -->|"renders"| node_admin_login_view
node_web -->|"renders"| node_admin_view
node_web -->|"routes to"| node_admin_auth
node_web -->|"routes to"| node_admin_ops
node_admin_ops -->|"updates orders"| node_database
node_web -->|"routes to"| node_menu_admin
node_menu_admin -->|"updates menu"| node_database
node_web -->|"routes to"| node_kitchen_settings
node_kitchen_settings -->|"updates settings"| node_database
node_web -.->|"routes to"| node_media_admin
node_media_admin -.->|"manages files"| node_uploads

click node_web "https://github.com/charan30301/food/blob/main/app.py"
click node_auth "https://github.com/charan30301/food/blob/main/app.py"
click node_menu "https://github.com/charan30301/food/blob/main/app.py"
click node_menu_view "https://github.com/charan30301/food/blob/main/templates/menu.html"
click node_cart_view "https://github.com/charan30301/food/blob/main/templates/cart.html"
click node_orders "https://github.com/charan30301/food/blob/main/app.py"
click node_tracking "https://github.com/charan30301/food/blob/main/app.py"
click node_payments "https://github.com/charan30301/food/blob/main/app.py"
click node_admin_auth "https://github.com/charan30301/food/blob/main/app.py"
click node_admin_ops "https://github.com/charan30301/food/blob/main/app.py"
click node_menu_admin "https://github.com/charan30301/food/blob/main/app.py"
click node_kitchen_settings "https://github.com/charan30301/food/blob/main/app.py"
click node_media_admin "https://github.com/charan30301/food/blob/main/app.py"
click node_admin_view "https://github.com/charan30301/food/blob/main/templates/admin_dashboard.html"
click node_admin_login_view "https://github.com/charan30301/food/blob/main/templates/admin_login.html"
click node_uploads "https://github.com/charan30301/food/tree/main/static/uploads"

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_menu,node_menu_view,node_cart_view,node_orders,node_tracking toneBlue
class node_admin_auth,node_admin_ops,node_menu_admin,node_kitchen_settings,node_media_admin,node_admin_view,node_admin_login_view toneAmber
class node_web,node_auth,node_payments toneMint
class node_database,node_google,node_razorpay,node_uploads toneRose
class node_customer,node_admin toneIndigo
```

## Components

### Customer ordering

- [Menu and cart](https://github.com/charan30301/food/blob/main/app.py): `app.py`
- [Menu view](https://github.com/charan30301/food/blob/main/templates/menu.html): `templates/menu.html`
- [Cart view](https://github.com/charan30301/food/blob/main/templates/cart.html): `templates/cart.html`
- [Order submission](https://github.com/charan30301/food/blob/main/app.py): `app.py`
- [Order tracking](https://github.com/charan30301/food/blob/main/app.py): `app.py`

### Kitchen operations

- [Admin authentication](https://github.com/charan30301/food/blob/main/app.py): `app.py`
- [Order operations](https://github.com/charan30301/food/blob/main/app.py): `app.py`
- [Menu management](https://github.com/charan30301/food/blob/main/app.py): `app.py`
- [Kitchen settings](https://github.com/charan30301/food/blob/main/app.py): `app.py`
- [Media management](https://github.com/charan30301/food/blob/main/app.py): `app.py`
- [Admin dashboard](https://github.com/charan30301/food/blob/main/templates/admin_dashboard.html): `templates/admin_dashboard.html`
- [Admin login view](https://github.com/charan30301/food/blob/main/templates/admin_login.html): `templates/admin_login.html`

### Application services

- [Flask routes](https://github.com/charan30301/food/blob/main/app.py): `app.py`
- [Customer authentication](https://github.com/charan30301/food/blob/main/app.py): `app.py`
- [Payment processing](https://github.com/charan30301/food/blob/main/app.py): `app.py`

### External services

- **PostgreSQL**
- **Google Identity**
- **Razorpay**
- [Uploaded media](https://github.com/charan30301/food/tree/main/static/uploads): `static/uploads`

### Other components

- **Customer**
- **Kitchen staff**

## Connections

- Customer → Flask routes: uses (evidence: `README.md`)
- Flask routes → Menu view: renders (evidence: `app.py`)
- Flask routes → Cart view: renders (evidence: `app.py`)
- Flask routes → Customer authentication: routes to (evidence: `app.py`)
- Customer authentication → Google Identity: verifies token (evidence: `app.py`)
- Flask routes → Menu and cart: routes to (evidence: `app.py`)
- Menu and cart → PostgreSQL: reads and writes (evidence: `app.py`)
- Flask routes → Order submission: routes to (evidence: `app.py`)
- Order submission → PostgreSQL: reads and writes (evidence: `app.py`)
- Order submission → Payment processing: initiates payment (evidence: `README.md`)
- Payment processing → Razorpay: uses gateway (evidence: `README.md`)
- Flask routes → Order tracking: routes to (evidence: `app.py`)
- Order tracking → PostgreSQL: reads and updates (evidence: `app.py`)
- Kitchen staff → Flask routes: uses (evidence: `README.md`)
- Flask routes → Admin login view: renders (evidence: `app.py`)
- Flask routes → Admin dashboard: renders (evidence: `app.py`)
- Flask routes → Admin authentication: routes to (evidence: `app.py`)
- Flask routes → Order operations: routes to (evidence: `app.py`)
- Order operations → PostgreSQL: updates orders (evidence: `app.py`)
- Flask routes → Menu management: routes to (evidence: `app.py`)
- Menu management → PostgreSQL: updates menu (evidence: `app.py`)
- Flask routes → Kitchen settings: routes to (evidence: `app.py`)
- Kitchen settings → PostgreSQL: updates settings (evidence: `app.py`)
- Flask routes → Media management: routes to (evidence: `README.md`)
- Media management → Uploaded media: manages files (evidence: `README.md`)
