# sahbimlesh007/employee-support-ticket-tracker architecture

> Architecture diagram of the GitHub repository sahbimlesh007/employee-support-ticket-tracker, 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/sahbimlesh007/employee-support-ticket-tracker
- Repository: https://github.com/sahbimlesh007/employee-support-ticket-tracker

## Overview

This Streamlit helpdesk lets employees and support staff create tickets, browse and search records, update ticket status, and review ticket and priority analytics. The main entry point, `app.py`, dispatches UI actions to ticket-operation modules; those modules obtain connections through `db.py` and query MySQL. The dashboard computes metrics from fetched tickets, while the ticket view supports filtering, sorting, and CSV export. README capabilities are included where documented; source excerpts show the concrete call paths, but do not establish wiring for every documented reporting capability.

Main entry points: [`search_ticket.py`](https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/search_ticket.py) (Fetch and search tickets), [`app.py`](https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/app.py) (Application navigation), [`create_ticket.py`](https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/create_ticket.py) (Create ticket), [`update_ticket.py`](https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/update_ticket.py) (Update ticket status)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Streamlit interface"]
  node_app["Application navigation<br/>[app.py]"]
  node_create_ui["Ticket entry form<br/>[app.py]"]
  node_browse_ui["Ticket list and export<br/>[app.py]"]
  node_search_ui["Ticket search form<br/>[app.py]"]
  node_update_ui["Status update form<br/>[app.py]"]
  node_dashboard["Dashboard metrics and charts<br/>[app.py]"]
end

subgraph group_tickets["Ticket workflows"]
  node_create_op["Create ticket<br/>[create_ticket.py]"]
  node_read_ops["Fetch and search tickets<br/>[search_ticket.py]"]
  node_update_op["Update ticket status<br/>[update_ticket.py]"]
end

subgraph group_data["Persistence and analytics"]
  node_db_conn["Database connection<br/>[db.py]"]
  node_mysql[("MySQL tickets store")]
  node_schema["Tickets table schema<br/>[table.sql]"]
end

node_user(("Employee / support user"))

node_user -->|"uses"| node_app
node_app -->|"dispatches"| node_create_ui
node_app -->|"dispatches"| node_browse_ui
node_app -->|"dispatches"| node_search_ui
node_app -->|"dispatches"| node_update_ui
node_app -->|"dispatches"| node_dashboard
node_create_ui -->|"submits"| node_create_op
node_create_op -->|"opens connection"| node_db_conn
node_create_op -->|"inserts ticket"| node_mysql
node_browse_ui -->|"fetches tickets"| node_read_ops
node_dashboard -->|"fetches tickets"| node_read_ops
node_search_ui -->|"searches tickets"| node_read_ops
node_read_ops -->|"opens connection"| node_db_conn
node_read_ops -->|"reads tickets"| node_mysql
node_update_ui -->|"submits status"| node_update_op
node_update_op -->|"opens connection"| node_db_conn
node_update_op -->|"updates status"| node_mysql
node_mysql -->|"returns rows"| node_read_ops
node_read_ops -->|"returns records"| node_browse_ui
node_read_ops -->|"returns records"| node_dashboard
node_read_ops -->|"returns matches"| node_search_ui
node_dashboard -->|"shows analytics"| node_user
node_browse_ui -->|"shows / exports CSV"| node_user
node_schema -->|"defines table"| node_mysql

click node_app "https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/app.py"
click node_create_ui "https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/app.py"
click node_browse_ui "https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/app.py"
click node_search_ui "https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/app.py"
click node_update_ui "https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/app.py"
click node_dashboard "https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/app.py"
click node_create_op "https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/create_ticket.py"
click node_read_ops "https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/search_ticket.py"
click node_update_op "https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/update_ticket.py"
click node_db_conn "https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/db.py"
click node_schema "https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/MySQL/table.sql"

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_app,node_create_ui,node_browse_ui,node_search_ui,node_update_ui,node_dashboard,node_user toneBlue
class node_create_op,node_read_ops,node_update_op toneAmber
class node_db_conn,node_mysql,node_schema toneMint
```

## Components

### Streamlit interface

- [Application navigation](https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/app.py): `app.py`
- [Ticket entry form](https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/app.py): `app.py`
- [Ticket list and export](https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/app.py): `app.py`
- [Ticket search form](https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/app.py): `app.py`
- [Status update form](https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/app.py): `app.py`
- [Dashboard metrics and charts](https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/app.py): `app.py`

### Ticket workflows

- [Create ticket](https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/create_ticket.py): `create_ticket.py`
- [Fetch and search tickets](https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/search_ticket.py): `search_ticket.py`
- [Update ticket status](https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/update_ticket.py): `update_ticket.py`

### Persistence and analytics

- [Database connection](https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/db.py): `db.py`
- **MySQL tickets store**
- [Tickets table schema](https://github.com/sahbimlesh007/employee-support-ticket-tracker/blob/main/MySQL/table.sql): `MySQL/table.sql`

### Other components

- **Employee / support user**

## Connections

- Employee / support user → Application navigation: uses
- Application navigation → Ticket entry form: dispatches
- Application navigation → Ticket list and export: dispatches
- Application navigation → Ticket search form: dispatches
- Application navigation → Status update form: dispatches
- Application navigation → Dashboard metrics and charts: dispatches
- Ticket entry form → Create ticket: submits
- Create ticket → Database connection: opens connection
- Create ticket → MySQL tickets store: inserts ticket
- Ticket list and export → Fetch and search tickets: fetches tickets
- Dashboard metrics and charts → Fetch and search tickets: fetches tickets
- Ticket search form → Fetch and search tickets: searches tickets
- Fetch and search tickets → Database connection: opens connection
- Fetch and search tickets → MySQL tickets store: reads tickets
- Status update form → Update ticket status: submits status
- Update ticket status → Database connection: opens connection
- Update ticket status → MySQL tickets store: updates status
- MySQL tickets store → Fetch and search tickets: returns rows
- Fetch and search tickets → Ticket list and export: returns records
- Fetch and search tickets → Dashboard metrics and charts: returns records
- Fetch and search tickets → Ticket search form: returns matches
- Dashboard metrics and charts → Employee / support user: shows analytics
- Ticket list and export → Employee / support user: shows / exports CSV
- Tickets table schema → MySQL tickets store: defines table
