# springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data architecture

> Architecture diagram of the GitHub repository springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data
- Repository: https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data

## Overview

PrognosAI predicts turbofan-engine remaining useful life (RUL), persists predictions for fleet monitoring, and presents results through a browser UI and Grafana dashboards. The main workflow is sensor input → API prediction → model inference → database persistence → dashboard queries. Separate capabilities include model training/evaluation, batch prediction, demo-history and fleet simulation, and Grafana provisioning. The sampled source confirms key API, UI, and model behavior; some relationships are included only where the README documents them, and unsampled implementation details are not assumed.

Main entry points: [`ui/index.html`](https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/ui/index.html) (Web UI), [`scripts/app.py`](https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/scripts/app.py) (FastAPI service), [`scripts/config.py`](https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/scripts/config.py) (Features and artifacts), [`scripts/train.py`](https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/scripts/train.py) (Model training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_web_ui["Web UI<br/>[index.html]"]
  node_ui_shell["UI navigation<br/>[app.js]"]
  node_manual_prediction["Prediction form<br/>[predict.js]"]
  node_batch_ui["Batch and demo UI<br/>[batchtest.js]"]
  node_fleet_ui["Fleet summary<br/>[fleet.js]"]
end

subgraph group_prediction["Prediction service"]
  node_api["FastAPI service<br/>[app.py]"]
  node_inference["RUL inference CLI<br/>[predict.py]"]
  node_bulk_predict["Bulk prediction<br/>[bulk_predict.py]"]
end

subgraph group_modeling["Model lifecycle"]
  node_features["Features and artifacts<br/>[config.py]"]
  node_training["Model training<br/>[train.py]"]
  node_model_files["Trained models"]
end

subgraph group_monitoring["Monitoring and data"]
  node_database[("PostgreSQL")]
  node_dashboards["Grafana dashboards"]
  node_grafana_setup["Grafana provisioning<br/>[grafana_init.py]"]
  node_model_registry["Model registry updater<br/>[register_models.py]"]
end

node_user(("Engineer"))

node_user -->|"uses"| node_web_ui
node_web_ui -.->|"loads"| node_ui_shell
node_web_ui -.->|"loads"| node_manual_prediction
node_web_ui -.->|"loads"| node_batch_ui
node_web_ui -.->|"loads"| node_fleet_ui
node_manual_prediction -->|"posts prediction"| node_api
node_batch_ui -->|"posts demo requests"| node_api
node_fleet_ui -->|"fetches fleet stats"| node_api
node_api -->|"loads artifacts"| node_features
node_inference -->|"uses features"| node_features
node_training -->|"uses features"| node_features
node_training -->|"saves models"| node_model_files
node_api -->|"persists predictions"| node_database
node_dashboards -->|"queries data"| node_database
node_grafana_setup -->|"imports dashboards"| node_dashboards
node_grafana_setup -->|"configures datasource"| node_database
node_model_registry -->|"loads artifacts"| node_features
node_model_registry -->|"updates registry"| node_database
node_bulk_predict -.->|"populates dashboard data"| node_database

click node_web_ui "https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/ui/index.html"
click node_ui_shell "https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/ui/js/app.js"
click node_manual_prediction "https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/ui/js/predict.js"
click node_batch_ui "https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/ui/js/batchtest.js"
click node_fleet_ui "https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/ui/js/fleet.js"
click node_api "https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/scripts/app.py"
click node_inference "https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/scripts/predict.py"
click node_features "https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/scripts/config.py"
click node_training "https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/scripts/train.py"
click node_bulk_predict "https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/scripts/bulk_predict.py"
click node_model_files "https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/tree/main/scripts/models"
click node_dashboards "https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/tree/main/grafana_dashboard"
click node_grafana_setup "https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/docker/grafana_init.py"
click node_model_registry "https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/docker/register_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_web_ui,node_ui_shell,node_manual_prediction,node_batch_ui,node_fleet_ui toneBlue
class node_api,node_inference,node_bulk_predict toneAmber
class node_features,node_training,node_model_files toneMint
class node_database,node_dashboards,node_grafana_setup,node_model_registry toneRose
class node_user toneIndigo
```

## Components

### User experience

- [Web UI](https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/ui/index.html): `ui/index.html`
- [UI navigation](https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/ui/js/app.js): `ui/js/app.js`
- [Prediction form](https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/ui/js/predict.js): `ui/js/predict.js`
- [Batch and demo UI](https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/ui/js/batchtest.js): `ui/js/batchtest.js`
- [Fleet summary](https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/ui/js/fleet.js): `ui/js/fleet.js`

### Prediction service

- [FastAPI service](https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/scripts/app.py): `scripts/app.py`
- [RUL inference CLI](https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/scripts/predict.py): `scripts/predict.py`
- [Bulk prediction](https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/scripts/bulk_predict.py): `scripts/bulk_predict.py`

### Model lifecycle

- [Features and artifacts](https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/scripts/config.py): `scripts/config.py`
- [Model training](https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/scripts/train.py): `scripts/train.py`
- [Trained models](https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/tree/main/scripts/models): `scripts/models`

### Monitoring and data

- **PostgreSQL**
- [Grafana dashboards](https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/tree/main/grafana_dashboard): `grafana_dashboard`
- [Grafana provisioning](https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/docker/grafana_init.py): `docker/grafana_init.py`
- [Model registry updater](https://github.com/springboardmentor0319/prognosai-ai-driven-predictive-maintenance-system-using-time-series-sensor-data/blob/main/docker/register_models.py): `docker/register_models.py`

### Other components

- **Engineer**

## Connections

- Engineer → Web UI: uses (evidence: `README.md`)
- Web UI → UI navigation: loads
- Web UI → Prediction form: loads
- Web UI → Batch and demo UI: loads
- Web UI → Fleet summary: loads
- Prediction form → FastAPI service: posts prediction (evidence: `ui/js/predict.js`)
- Batch and demo UI → FastAPI service: posts demo requests (evidence: `ui/js/batchtest.js`)
- Fleet summary → FastAPI service: fetches fleet stats (evidence: `ui/js/fleet.js`)
- FastAPI service → Features and artifacts: loads artifacts (evidence: `scripts/app.py`)
- RUL inference CLI → Features and artifacts: uses features (evidence: `scripts/predict.py`)
- Model training → Features and artifacts: uses features (evidence: `scripts/train.py`)
- Model training → Trained models: saves models (evidence: `scripts/train.py`)
- FastAPI service → PostgreSQL: persists predictions (evidence: `README.md`)
- Grafana dashboards → PostgreSQL: queries data (evidence: `README.md`)
- Grafana provisioning → Grafana dashboards: imports dashboards (evidence: `docker/grafana_init.py`)
- Grafana provisioning → PostgreSQL: configures datasource (evidence: `docker/grafana_init.py`)
- Model registry updater → Features and artifacts: loads artifacts (evidence: `docker/register_models.py`)
- Model registry updater → PostgreSQL: updates registry (evidence: `docker/register_models.py`)
- Bulk prediction → PostgreSQL: populates dashboard data (evidence: `README.md`)
