# umamuthu08/pdi_checksheet_p1 architecture

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

- Interactive diagram: https://gitdiagram.com/umamuthu08/pdi_checksheet_p1
- Repository: https://github.com/umamuthu08/pdi_checksheet_p1

## Overview

PDI Exit is a digital pre-delivery-inspection checksheet and traceability application. Operators select a vehicle model, complete its parameter checks, and submit inspection results; master users maintain model and checksheet data, while users can review records and download archives. The Flask routes coordinate these workflows, with SQLAlchemy models, master-data loading, and Excel archiving as supporting layers. The README gives only a product description, and route excerpts are partial, so the graph omits uncertain details of individual screens and submission internals.

Main entry points: [`app/routes/main.py`](https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/routes/main.py) (PDI workflows), [`app/services/master_loader.py`](https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/services/master_loader.py) (Master-data loader), [`app/excel_archiver.py`](https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/excel_archiver.py) (Excel archiver), [`app/models/master_models.py`](https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/models/master_models.py) (Domain models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflows["Inspection workflows"]
  node_pdi_routes["PDI workflows<br/>[main.py]"]
  node_checksheets["Checksheet UI"]
  node_line_selection["Line selection"]
  node_record_views["Record views<br/>[view.html]"]
  node_dashboard["Dashboard<br/>[dashboard.html]"]
end

subgraph group_masters["Master data"]
  node_master_config_ui["Master configuration UI<br/>[master_config.html]"]
  node_master_loader["Master-data loader<br/>[master_loader.py]"]
  node_master_workbooks["Master workbooks"]
  node_master_images["Model images"]
end

subgraph group_persistence["Persistence"]
  node_orm_models["Domain models<br/>[master_models.py]"]
  node_sqlalchemy["SQLAlchemy interface<br/>[db.py]"]
  node_sql_server[("SQL Server")]
  node_excel_archiver["Excel archiver<br/>[excel_archiver.py]"]
  node_excel_archives[("Inspection archives")]
end

subgraph group_shared["Application support"]
  node_app_config["App configuration<br/>[app_config.py]"]
  node_common_paths["Path helpers<br/>[common_paths.py]"]
  node_service_utils["Master-data utilities<br/>[utils.py]"]
end

node_operator(("Operator"))
node_master_user(("Master user"))

node_operator -.->|"selects model"| node_line_selection
node_line_selection -.->|"requests inspection"| node_pdi_routes
node_pdi_routes -.->|"renders"| node_checksheets
node_operator -.->|"submits checks"| node_pdi_routes
node_pdi_routes -->|"renders"| node_record_views
node_pdi_routes -.->|"renders"| node_dashboard
node_master_user -.->|"manages masters"| node_master_config_ui
node_pdi_routes -.->|"renders"| node_master_config_ui
node_pdi_routes -->|"loads master data"| node_master_loader
node_master_loader -->|"reads workbooks"| node_master_workbooks
node_master_loader -->|"resolves images"| node_master_images
node_pdi_routes -->|"queries models"| node_orm_models
node_pdi_routes -->|"uses database"| node_sqlalchemy
node_orm_models -->|"declares mappings"| node_sqlalchemy
node_sqlalchemy -.->|"persists records"| node_sql_server
node_pdi_routes -->|"requests archives"| node_excel_archiver
node_excel_archiver -->|"queries model headers"| node_orm_models
node_excel_archiver -->|"writes workbooks"| node_excel_archives
node_app_config -->|"resolves directories"| node_common_paths
node_master_loader -->|"uses database"| node_sqlalchemy
node_master_loader -->|"updates master records"| node_orm_models
node_master_loader -->|"normalizes master data"| node_service_utils
node_master_loader -->|"locates data"| node_common_paths
node_excel_archiver -->|"resolves archive paths"| node_common_paths

click node_pdi_routes "https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/routes/main.py"
click node_checksheets "https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/templates/dynamic_checksheet.html"
click node_line_selection "https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/templates/Line_selection.html"
click node_record_views "https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/templates/view.html"
click node_dashboard "https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/templates/dashboard.html"
click node_master_config_ui "https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/templates/master_config.html"
click node_master_loader "https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/services/master_loader.py"
click node_master_workbooks "https://github.com/umamuthu08/pdi_checksheet_p1/tree/main/master_data"
click node_master_images "https://github.com/umamuthu08/pdi_checksheet_p1/tree/main/master_image"
click node_orm_models "https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/models/master_models.py"
click node_sqlalchemy "https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/db.py"
click node_excel_archiver "https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/excel_archiver.py"
click node_excel_archives "https://github.com/umamuthu08/pdi_checksheet_p1/tree/main/output"
click node_app_config "https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/app_config.py"
click node_common_paths "https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/common_paths.py"
click node_service_utils "https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/services/utils.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_pdi_routes,node_checksheets,node_line_selection,node_record_views,node_dashboard,node_master_user toneBlue
class node_master_config_ui,node_master_loader,node_master_workbooks,node_master_images toneAmber
class node_orm_models,node_sqlalchemy,node_sql_server,node_excel_archiver,node_excel_archives toneMint
class node_app_config,node_common_paths,node_service_utils toneRose
class node_operator toneIndigo
```

## Components

### Inspection workflows

- [PDI workflows](https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/routes/main.py): `app/routes/main.py`
- [Checksheet UI](https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/templates/dynamic_checksheet.html): `app/templates/dynamic_checksheet.html`
- [Line selection](https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/templates/Line_selection.html): `app/templates/Line_selection.html`
- [Record views](https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/templates/view.html): `app/templates/view.html`
- [Dashboard](https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/templates/dashboard.html): `app/templates/dashboard.html`

### Master data

- [Master configuration UI](https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/templates/master_config.html): `app/templates/master_config.html`
- [Master-data loader](https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/services/master_loader.py): `app/services/master_loader.py`
- [Master workbooks](https://github.com/umamuthu08/pdi_checksheet_p1/tree/main/master_data): `master_data`
- [Model images](https://github.com/umamuthu08/pdi_checksheet_p1/tree/main/master_image): `master_image`

### Persistence

- [Domain models](https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/models/master_models.py): `app/models/master_models.py`
- [SQLAlchemy interface](https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/db.py): `db.py`
- **SQL Server**
- [Excel archiver](https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/excel_archiver.py): `app/excel_archiver.py`
- [Inspection archives](https://github.com/umamuthu08/pdi_checksheet_p1/tree/main/output): `output`

### Application support

- [App configuration](https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/app_config.py): `app/app_config.py`
- [Path helpers](https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/common_paths.py): `app/common_paths.py`
- [Master-data utilities](https://github.com/umamuthu08/pdi_checksheet_p1/blob/main/app/services/utils.py): `app/services/utils.py`

### Other components

- **Operator**
- **Master user**

## Connections

- Operator → Line selection: selects model
- Line selection → PDI workflows: requests inspection
- PDI workflows → Checksheet UI: renders
- Operator → PDI workflows: submits checks
- PDI workflows → Record views: renders (evidence: `app/routes/main.py`)
- PDI workflows → Dashboard: renders
- Master user → Master configuration UI: manages masters
- PDI workflows → Master configuration UI: renders
- PDI workflows → Master-data loader: loads master data (evidence: `app/routes/main.py`)
- Master-data loader → Master workbooks: reads workbooks (evidence: `app/services/master_loader.py`)
- Master-data loader → Model images: resolves images (evidence: `app/services/master_loader.py`)
- PDI workflows → Domain models: queries models (evidence: `app/routes/main.py`)
- PDI workflows → SQLAlchemy interface: uses database (evidence: `app/routes/main.py`)
- Domain models → SQLAlchemy interface: declares mappings (evidence: `app/models/master_models.py`)
- SQLAlchemy interface → SQL Server: persists records
- PDI workflows → Excel archiver: requests archives (evidence: `app/routes/main.py`)
- Excel archiver → Domain models: queries model headers (evidence: `app/excel_archiver.py`)
- Excel archiver → Inspection archives: writes workbooks (evidence: `app/excel_archiver.py`)
- App configuration → Path helpers: resolves directories (evidence: `app/app_config.py`)
- Master-data loader → SQLAlchemy interface: uses database (evidence: `app/services/master_loader.py`)
- Master-data loader → Domain models: updates master records (evidence: `app/services/master_loader.py`)
- Master-data loader → Master-data utilities: normalizes master data (evidence: `app/services/master_loader.py`)
- Master-data loader → Path helpers: locates data (evidence: `app/services/master_loader.py`)
- Excel archiver → Path helpers: resolves archive paths (evidence: `app/excel_archiver.py`)
