# gouthamreddy17/psm-parking-slot-manager- architecture

> Architecture diagram of the GitHub repository gouthamreddy17/psm-parking-slot-manager-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gouthamreddy17/psm-parking-slot-manager-
- Repository: https://github.com/gouthamreddy17/psm-parking-slot-manager-

## Overview

This is a Flask and MySQL parking-management web application for users, staff, and administrators. The main operational flow is user vehicle registration and slot booking, followed by staff vehicle entry and exit, fee calculation, and retained parking history; administrators manage slots and people and review records and reports. Flask routes coordinate these capabilities through database query helpers and render role-specific pages. The README documents several capabilities whose route implementations were not sampled, so those relationships are shown as unverified rather than asserted from unseen code.

Main entry points: [`app.py`](https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py) (Flask routes), [`database/query.py`](https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/database/query.py) (SQL query helpers), [`database/connection.py`](https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/database/connection.py) (MySQL connection), [`templates`](https://github.com/gouthamreddy17/psm-parking-slot-manager-/tree/main/templates) (Role-based pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_flask["Flask routes<br/>[app.py]"]
  node_auth["Accounts and login<br/>[app.py]"]
  node_pages["Role-based pages"]
end

subgraph group_parking["Parking operations"]
  node_vehicles["Vehicle registration<br/>[app.py]"]
  node_booking["Slot booking<br/>[app.py]"]
  node_entry["Vehicle entry<br/>[app.py]"]
  node_exit["Exit and fees<br/>[app.py]"]
  node_history["Parking history<br/>[app.py]"]
end

subgraph group_admin["Administration"]
  node_slot_admin["Slot management<br/>[app.py]"]
  node_people_admin["User and staff management<br/>[app.py]"]
  node_reports["Records and reports<br/>[app.py]"]
end

subgraph group_data["Data access"]
  node_queries["SQL query helpers<br/>[query.py]"]
  node_connection["MySQL connection<br/>[connection.py]"]
end

node_users(("Users"))
node_staff(("Staff"))
node_admins(("Administrators"))
node_mysql[("MySQL database")]

node_users -->|"use"| node_flask
node_staff -->|"use"| node_flask
node_admins -->|"use"| node_flask
node_flask -->|"routes"| node_auth
node_flask -->|"renders"| node_pages
node_flask -->|"calls"| node_queries
node_flask -->|"routes"| node_vehicles
node_flask -.->|"routes"| node_booking
node_flask -->|"routes"| node_entry
node_flask -->|"routes"| node_exit
node_flask -.->|"routes"| node_history
node_flask -->|"routes"| node_slot_admin
node_flask -->|"routes"| node_people_admin
node_flask -->|"routes"| node_reports
node_queries -->|"opens"| node_connection
node_connection -->|"connects"| node_mysql
node_booking -.->|"stores booking"| node_queries
node_entry -->|"records entry"| node_queries
node_exit -->|"updates record"| node_queries
node_history -.->|"reads history"| node_queries
node_slot_admin -->|"manages slots"| node_queries
node_people_admin -->|"manages accounts"| node_queries
node_reports -->|"reads reports"| node_queries

click node_flask "https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py"
click node_auth "https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py"
click node_pages "https://github.com/gouthamreddy17/psm-parking-slot-manager-/tree/main/templates"
click node_vehicles "https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py"
click node_booking "https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py"
click node_entry "https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py"
click node_exit "https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py"
click node_history "https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py"
click node_slot_admin "https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py"
click node_people_admin "https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py"
click node_reports "https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py"
click node_queries "https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/database/query.py"
click node_connection "https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/database/connection.py"

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,node_auth,node_pages,node_users toneBlue
class node_vehicles,node_booking,node_entry,node_exit,node_history,node_mysql toneAmber
class node_slot_admin,node_people_admin,node_reports toneMint
class node_queries,node_connection toneRose
class node_staff,node_admins toneIndigo
```

## Components

### Web application

- [Flask routes](https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py): `app.py`
- [Accounts and login](https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py): `app.py`
- [Role-based pages](https://github.com/gouthamreddy17/psm-parking-slot-manager-/tree/main/templates): `templates`

### Parking operations

- [Vehicle registration](https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py): `app.py`
- [Slot booking](https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py): `app.py`
- [Vehicle entry](https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py): `app.py`
- [Exit and fees](https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py): `app.py`
- [Parking history](https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py): `app.py`

### Administration

- [Slot management](https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py): `app.py`
- [User and staff management](https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py): `app.py`
- [Records and reports](https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/app.py): `app.py`

### Data access

- [SQL query helpers](https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/database/query.py): `database/query.py`
- [MySQL connection](https://github.com/gouthamreddy17/psm-parking-slot-manager-/blob/main/database/connection.py): `database/connection.py`

### Other components

- **Users**
- **Staff**
- **Administrators**
- **MySQL database**

## Connections

- Users → Flask routes: use (evidence: `README.md`)
- Staff → Flask routes: use (evidence: `README.md`)
- Administrators → Flask routes: use (evidence: `README.md`)
- Flask routes → Accounts and login: routes (evidence: `app.py`)
- Flask routes → Role-based pages: renders (evidence: `app.py`)
- Flask routes → SQL query helpers: calls (evidence: `app.py`)
- Flask routes → Vehicle registration: routes (evidence: `app.py`)
- Flask routes → Slot booking: routes (evidence: `README.md`)
- Flask routes → Vehicle entry: routes (evidence: `app.py`)
- Flask routes → Exit and fees: routes (evidence: `app.py`)
- Flask routes → Parking history: routes (evidence: `README.md`)
- Flask routes → Slot management: routes (evidence: `app.py`)
- Flask routes → User and staff management: routes (evidence: `app.py`)
- Flask routes → Records and reports: routes (evidence: `app.py`)
- SQL query helpers → MySQL connection: opens (evidence: `database/query.py`)
- MySQL connection → MySQL database: connects (evidence: `database/connection.py`)
- Slot booking → SQL query helpers: stores booking (evidence: `app.py`)
- Vehicle entry → SQL query helpers: records entry (evidence: `database/query.py`)
- Exit and fees → SQL query helpers: updates record (evidence: `database/query.py`)
- Parking history → SQL query helpers: reads history (evidence: `app.py`)
- Slot management → SQL query helpers: manages slots (evidence: `app.py`)
- User and staff management → SQL query helpers: manages accounts (evidence: `app.py`)
- Records and reports → SQL query helpers: reads reports (evidence: `app.py`)
