# lesa-shanmuganathan/maintenance_scheduling_tool architecture

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

- Interactive diagram: https://gitdiagram.com/lesa-shanmuganathan/maintenance_scheduling_tool
- Repository: https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool

## Overview

The Maintenance Scheduling Tool lets staff manage equipment by environment, plan recurring maintenance, record completions and documents, and review equipment extracted from uploaded documents. The main workflow runs from the React screens through the Axios API to Flask endpoints and SQLAlchemy models; document imports add asynchronous AI classification and human verification. The README also documents calendar overrides, overdue handling, maintenance logs, and synthesis filters. Backend internals are only partly excerpted, so links for documented but unsampled capabilities are cited to the README.

Main entry points: [`frontend/src/pages/MainPage.jsx`](https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/pages/MainPage.jsx) (Equipment and logs), [`backend/app.py`](https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/backend/app.py) (Flask API and scheduling), [`frontend/src/App.jsx`](https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/App.jsx) (Application shell), [`frontend/src/api.js`](https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/api.js) (HTTP API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Maintenance UI"]
  node_app["Application shell<br/>[App.jsx]"]
  node_main["Equipment and logs<br/>[MainPage.jsx]"]
  node_synthesis["Synthesis dashboard"]
  node_calendar["Schedule calendar<br/>[CalendarModal.jsx]"]
  node_equipmodal["Equipment form<br/>[EquipmentModal.jsx]"]
  node_importmodal["Import dialog"]
  node_pending["Pending review page"]
  node_verify["Classification review"]
end

subgraph group_service["Application services"]
  node_api["HTTP API client<br/>[api.js]"]
  node_flask["Flask API and scheduling<br/>[app.py]"]
end

subgraph group_data["Maintenance data"]
  node_models["Domain models<br/>[models.py]"]
  node_database[("Application database")]
end

subgraph group_intake["Document intake"]
  node_uploads["Uploaded documents"]
end

node_staff(("Maintenance staff"))
node_ai{{"AI classification service"}}

node_staff -->|"uses"| node_app
node_app -->|"routes to"| node_main
node_app -->|"routes to"| node_synthesis
node_app -->|"routes to"| node_pending
node_app -->|"loads count"| node_pending
node_main -->|"requests data"| node_api
node_main -->|"opens form"| node_equipmodal
node_main -->|"opens schedule"| node_calendar
node_main -->|"imports documents"| node_importmodal
node_main -->|"reviews results"| node_verify
node_synthesis -->|"requests tasks"| node_api
node_calendar -->|"reads and overrides"| node_flask
node_pending -->|"renders review"| node_verify
node_verify -->|"submits decisions"| node_api
node_importmodal -->|"uploads and polls"| node_api
node_api -->|"HTTP requests"| node_flask
node_flask -->|"queries and updates"| node_models
node_models -.->|"persists records"| node_database
node_flask -.->|"stores documents"| node_uploads
node_flask -.->|"requests classification"| node_ai
node_ai -.->|"returns predictions"| node_flask

click node_app "https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/App.jsx"
click node_main "https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/pages/MainPage.jsx"
click node_synthesis "https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/pages/SynthesisDashboard.jsx"
click node_calendar "https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/components/CalendarModal.jsx"
click node_equipmodal "https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/components/EquipmentModal.jsx"
click node_importmodal "https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/components/ImportDocumentModal.jsx"
click node_pending "https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/pages/PendingReviewPage.jsx"
click node_verify "https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/components/VerificationTable.jsx"
click node_api "https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/api.js"
click node_flask "https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/backend/app.py"
click node_uploads "https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/tree/main/backend/uploads"
click node_models "https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/backend/models.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_app,node_main,node_synthesis,node_calendar,node_equipmodal,node_importmodal,node_pending,node_verify toneBlue
class node_api,node_flask toneAmber
class node_models,node_database toneMint
class node_uploads toneRose
class node_staff,node_ai toneIndigo
```

## Components

### Maintenance UI

- [Application shell](https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Equipment and logs](https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/pages/MainPage.jsx): `frontend/src/pages/MainPage.jsx`
- [Synthesis dashboard](https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/pages/SynthesisDashboard.jsx): `frontend/src/pages/SynthesisDashboard.jsx`
- [Schedule calendar](https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/components/CalendarModal.jsx): `frontend/src/components/CalendarModal.jsx`
- [Equipment form](https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/components/EquipmentModal.jsx): `frontend/src/components/EquipmentModal.jsx`
- [Import dialog](https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/components/ImportDocumentModal.jsx): `frontend/src/components/ImportDocumentModal.jsx`
- [Pending review page](https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/pages/PendingReviewPage.jsx): `frontend/src/pages/PendingReviewPage.jsx`
- [Classification review](https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/components/VerificationTable.jsx): `frontend/src/components/VerificationTable.jsx`

### Application services

- [HTTP API client](https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/frontend/src/api.js): `frontend/src/api.js`
- [Flask API and scheduling](https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/backend/app.py): `backend/app.py`

### Maintenance data

- [Domain models](https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/blob/main/backend/models.py): `backend/models.py`
- **Application database**

### Document intake

- [Uploaded documents](https://github.com/lesa-shanmuganathan/maintenance_scheduling_tool/tree/main/backend/uploads): `backend/uploads`

### Other components

- **Maintenance staff**
- **AI classification service**

## Connections

- Maintenance staff → Application shell: uses (evidence: `README.md`)
- Application shell → Equipment and logs: routes to (evidence: `frontend/src/App.jsx`)
- Application shell → Synthesis dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Application shell → Pending review page: routes to (evidence: `frontend/src/App.jsx`)
- Application shell → Pending review page: loads count (evidence: `frontend/src/App.jsx`)
- Equipment and logs → HTTP API client: requests data (evidence: `frontend/src/pages/MainPage.jsx`)
- Equipment and logs → Equipment form: opens form (evidence: `frontend/src/pages/MainPage.jsx`)
- Equipment and logs → Schedule calendar: opens schedule (evidence: `README.md`)
- Equipment and logs → Import dialog: imports documents (evidence: `README.md`)
- Equipment and logs → Classification review: reviews results (evidence: `frontend/src/pages/MainPage.jsx`)
- Synthesis dashboard → HTTP API client: requests tasks (evidence: `frontend/src/pages/SynthesisDashboard.jsx`)
- Schedule calendar → Flask API and scheduling: reads and overrides (evidence: `frontend/src/components/CalendarModal.jsx`)
- Pending review page → Classification review: renders review (evidence: `frontend/src/pages/PendingReviewPage.jsx`)
- Classification review → HTTP API client: submits decisions (evidence: `frontend/src/components/VerificationTable.jsx`)
- Import dialog → HTTP API client: uploads and polls (evidence: `frontend/src/components/ImportDocumentModal.jsx`)
- HTTP API client → Flask API and scheduling: HTTP requests (evidence: `frontend/src/api.js`)
- Flask API and scheduling → Domain models: queries and updates (evidence: `backend/app.py`)
- Domain models → Application database: persists records
- Flask API and scheduling → Uploaded documents: stores documents
- Flask API and scheduling → AI classification service: requests classification
- AI classification service → Flask API and scheduling: returns predictions
