# sbajrac2/csc380-team_c architecture

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

- Interactive diagram: https://gitdiagram.com/sbajrac2/csc380-team_c
- Repository: https://github.com/sbajrac2/csc380-team_c

## Overview

This is a Dash-based manufacturing productivity analytics application. A user explores machine and time-series views in the dashboard; the app obtains spreadsheet data through `Data`, computes productivity series, and can send a selected machine’s series to `Predict` for forecasting. `app.py` also contains the dashboard’s graphing and callback logic. The repository includes a separate TensorFlow model-training implementation and a saved model used for inference. Relationship evidence is limited to the supplied excerpts; unsampled callback and data-loading details are not assumed.

Main entry points: [`app.py`](https://github.com/sbajrac2/csc380-team_c/blob/main/app.py) (Dash interface), [`data2.py`](https://github.com/sbajrac2/csc380-team_c/blob/main/data2.py) (Spreadsheet data), [`predict.py`](https://github.com/sbajrac2/csc380-team_c/blob/main/predict.py) (Forecast inference), [`models/moditmodel`](https://github.com/sbajrac2/csc380-team_c/tree/main/models/moditmodel) (Saved TensorFlow model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_dashboard_app["Dash interface<br/>[app.py]"]
  node_charts["Productivity charts<br/>[app.py]"]
end

subgraph group_data["Productivity data"]
  node_data_processing["Spreadsheet data<br/>[data2.py]"]
end

subgraph group_forecast["Forecasting"]
  node_forecast_request["Forecast orchestration<br/>[app.py]"]
  node_predict["Forecast inference<br/>[predict.py]"]
  node_training["Model training<br/>[ml.py]"]
  node_saved_model[("Saved TensorFlow model")]
end

node_user(("Dashboard user"))
node_workbook["Excel workbook"]

node_user -->|"uses"| node_dashboard_app
node_dashboard_app -->|"configures views"| node_charts
node_dashboard_app -->|"prepares data"| node_data_processing
node_data_processing -->|"reads sheets"| node_workbook
node_dashboard_app -->|"selects forecast"| node_forecast_request
node_forecast_request -->|"extracts series"| node_data_processing
node_forecast_request -->|"creates predictor"| node_predict
node_predict -->|"loads model"| node_saved_model
node_training -->|"saves model"| node_saved_model

click node_dashboard_app "https://github.com/sbajrac2/csc380-team_c/blob/main/app.py"
click node_charts "https://github.com/sbajrac2/csc380-team_c/blob/main/app.py"
click node_data_processing "https://github.com/sbajrac2/csc380-team_c/blob/main/data2.py"
click node_forecast_request "https://github.com/sbajrac2/csc380-team_c/blob/main/app.py"
click node_predict "https://github.com/sbajrac2/csc380-team_c/blob/main/predict.py"
click node_training "https://github.com/sbajrac2/csc380-team_c/blob/main/ml.py"
click node_saved_model "https://github.com/sbajrac2/csc380-team_c/tree/main/models/moditmodel"

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_dashboard_app,node_charts,node_user toneBlue
class node_data_processing toneAmber
class node_forecast_request,node_predict,node_training,node_saved_model toneMint
class node_workbook toneIndigo
```

## Components

### Dashboard

- [Dash interface](https://github.com/sbajrac2/csc380-team_c/blob/main/app.py): `app.py`
- [Productivity charts](https://github.com/sbajrac2/csc380-team_c/blob/main/app.py): `app.py`

### Productivity data

- [Spreadsheet data](https://github.com/sbajrac2/csc380-team_c/blob/main/data2.py): `data2.py`

### Forecasting

- [Forecast orchestration](https://github.com/sbajrac2/csc380-team_c/blob/main/app.py): `app.py`
- [Forecast inference](https://github.com/sbajrac2/csc380-team_c/blob/main/predict.py): `predict.py`
- [Model training](https://github.com/sbajrac2/csc380-team_c/blob/main/ml.py): `ml.py`
- [Saved TensorFlow model](https://github.com/sbajrac2/csc380-team_c/tree/main/models/moditmodel): `models/moditmodel`

### Other components

- **Dashboard user**
- **Excel workbook**

## Connections

- Dashboard user → Dash interface: uses
- Dash interface → Productivity charts: configures views (evidence: `app.py`)
- Dash interface → Spreadsheet data: prepares data (evidence: `app.py`)
- Spreadsheet data → Excel workbook: reads sheets (evidence: `data2.py`)
- Dash interface → Forecast orchestration: selects forecast (evidence: `app.py`)
- Forecast orchestration → Spreadsheet data: extracts series (evidence: `app.py`)
- Forecast orchestration → Forecast inference: creates predictor (evidence: `app.py`)
- Forecast inference → Saved TensorFlow model: loads model (evidence: `predict.py`)
- Model training → Saved TensorFlow model: saves model (evidence: `ml.py`)
