# raghavtandonn/databases-school-lunch-application architecture

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

- Interactive diagram: https://gitdiagram.com/raghavtandonn/databases-school-lunch-application
- Repository: https://github.com/raghavtandonn/databases-school-lunch-application
- Video tour (about a minute): https://gitdiagram.com/raghavtandonn/databases-school-lunch-application/video

## Overview

This Flask campus dining application supports student accounts, dining-hall and dish browsing, ordering with meal-plan swipes, nutrition goals and progress, and administrative management. The sampled `app.py` contains route handlers that query MySQL and render templates; the excerpts are partial, so links for unsampled route behavior are limited to documented or visible capabilities.

Main entry points: [`app.py`](https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/app.py) (Flask routes), [`templates/sign-in.html`](https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/sign-in.html) (Account pages), [`templates/register.html`](https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/register.html) (Registration page), [`templates/edit-profile.html`](https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/edit-profile.html) (Profile pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts"]
  node_flask_app["Flask routes<br/>[app.py]"]
  node_account_views["Account pages<br/>[sign-in.html]"]
  node_registration_view["Registration page<br/>[register.html]"]
  node_profile_view["Profile pages<br/>[edit-profile.html]"]
end

subgraph group_dining["Dining"]
  node_hall_browse["Hall and dish browsing<br/>[dining-halls.html]"]
  node_order_flow["Order and cart<br/>[order-log.html]"]
  node_dining_home["Dining homepage<br/>[index.html]"]
end

subgraph group_nutrition["Nutrition"]
  node_nutrition_goals["Goals and progress<br/>[app.py]"]
end

subgraph group_admin["Administration"]
  node_admin_routes["Admin routes<br/>[app.py]"]
  node_admin_halls["Hall management"]
  node_admin_students["Student management"]
  node_admin_home["Admin homepage"]
end

node_student(("Student"))
node_admin_user(("Admin user"))
node_mysql[("MySQL data")]

node_student -->|"submits requests"| node_flask_app
node_admin_user -->|"submits requests"| node_flask_app
node_flask_app -->|"queries and updates"| node_mysql
node_flask_app -->|"renders"| node_account_views
node_flask_app -->|"renders"| node_registration_view
node_flask_app -->|"renders"| node_profile_view
node_flask_app -->|"renders"| node_hall_browse
node_flask_app -->|"renders"| node_order_flow
node_flask_app -->|"renders"| node_dining_home
node_flask_app -->|"handles goal updates"| node_nutrition_goals
node_admin_routes -->|"queries and updates"| node_mysql
node_admin_routes -->|"renders"| node_admin_halls
node_admin_routes -->|"renders"| node_admin_students
node_admin_routes -->|"renders"| node_admin_home

click node_flask_app "https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/app.py"
click node_account_views "https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/sign-in.html"
click node_registration_view "https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/register.html"
click node_profile_view "https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/edit-profile.html"
click node_hall_browse "https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/dining-halls.html"
click node_order_flow "https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/order-log.html"
click node_dining_home "https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/index.html"
click node_nutrition_goals "https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/app.py"
click node_admin_routes "https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/app.py"
click node_admin_halls "https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/admin-dining-halls.html"
click node_admin_students "https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/admin-students.html"
click node_admin_home "https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/admin-homepage.html"

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_flask_app,node_account_views,node_registration_view,node_profile_view,node_admin_user toneBlue
class node_hall_browse,node_order_flow,node_dining_home,node_mysql toneAmber
class node_nutrition_goals toneMint
class node_admin_routes,node_admin_halls,node_admin_students,node_admin_home toneRose
class node_student toneIndigo
```

## Components

### Accounts

- [Flask routes](https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/app.py): `app.py`
- [Account pages](https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/sign-in.html): `templates/sign-in.html`
- [Registration page](https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/register.html): `templates/register.html`
- [Profile pages](https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/edit-profile.html): `templates/edit-profile.html`

### Dining

- [Hall and dish browsing](https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/dining-halls.html): `templates/dining-halls.html`
- [Order and cart](https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/order-log.html): `templates/order-log.html`
- [Dining homepage](https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/index.html): `templates/index.html`

### Nutrition

- [Goals and progress](https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/app.py): `app.py`

### Administration

- [Admin routes](https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/app.py): `app.py`
- [Hall management](https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/admin-dining-halls.html): `templates/admin-dining-halls.html`
- [Student management](https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/admin-students.html): `templates/admin-students.html`
- [Admin homepage](https://github.com/raghavtandonn/databases-school-lunch-application/blob/main/templates/admin-homepage.html): `templates/admin-homepage.html`

### Other components

- **Student**
- **Admin user**
- **MySQL data**

## Connections

- Student → Flask routes: submits requests
- Admin user → Flask routes: submits requests
- Flask routes → MySQL data: queries and updates
- Flask routes → Account pages: renders
- Flask routes → Registration page: renders
- Flask routes → Profile pages: renders
- Flask routes → Hall and dish browsing: renders
- Flask routes → Order and cart: renders
- Flask routes → Dining homepage: renders
- Flask routes → Goals and progress: handles goal updates
- Admin routes → MySQL data: queries and updates
- Admin routes → Hall management: renders
- Admin routes → Student management: renders
- Admin routes → Admin homepage: renders
