# tanuj52/oee_dashboard_8d_intelligence architecture

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

- Interactive diagram: https://gitdiagram.com/tanuj52/oee_dashboard_8d_intelligence
- Repository: https://github.com/tanuj52/oee_dashboard_8d_intelligence

## Overview

This is a Snowflake-backed Streamlit manufacturing operations product: plant staff monitor machine health, act on predicted failures, investigate defects through an 8D workflow, and track business impact and follow-up. The graph separates UI entry points, analytics, operational services, and persistence. It includes the README’s documented capabilities even where page implementations were not sampled; those page-level connections are documented rather than inferred from unseen code. Source-index references and README statements support the shown relationships; unsampled details are not expanded into speculative call chains.

Main entry points: [`snowflake_app/core/data.py`](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/core/data.py) (Plant analytics), [`snowflake_app/streamlit_app.py`](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/streamlit_app.py) (Streamlit app), [`snowflake_app/app_pages/live_monitoring.py`](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/app_pages/live_monitoring.py) (Live monitoring), [`snowflake_app/core/pipeline.py`](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/core/pipeline.py) (8D agent pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Operator experience"]
  node_app["Streamlit app<br/>[streamlit_app.py]"]
  node_command["Command center<br/>[command_center.py]"]
  node_monitor_page["Live monitoring<br/>[live_monitoring.py]"]
  node_investigation_page["8D investigations<br/>[investigations.py]"]
  node_actions_page["Corrective actions"]
  node_reports_page["Reports library<br/>[reports.py]"]
  node_other_pages["Plant workflows"]
  node_assistant_ui["Assistant chat<br/>[chat_dock.py]"]
end

subgraph group_analytics["Plant analytics"]
  node_monitor["Online monitoring<br/>[monitoring.py]"]
  node_prediction["Failure prediction"]
  node_plant_data["Plant analytics<br/>[data.py]"]
  node_quality_tools["Quality tools<br/>[spc_analysis.py]"]
  node_trace_tools["Lot traceability"]
  node_copq["COPQ analysis<br/>[copq_calculator.py]"]
end

subgraph group_operations["Operational workflows"]
  node_pipeline["8D agent pipeline<br/>[pipeline.py]"]
  node_runs["Investigation runs<br/>[runs.py]"]
  node_maintenance["Maintenance operations<br/>[maintenance.py]"]
  node_parts["Parts and purchasing<br/>[parts_ops.py]"]
  node_capa["Action tracking<br/>[capa_ops.py]"]
  node_impact["Business impact<br/>[impact_ops.py]"]
  node_reports["Report export<br/>[report_export.py]"]
  node_digest["Daily digest<br/>[digest_ops.py]"]
  node_assistant["Plant assistant<br/>[assistant.py]"]
end

subgraph group_platform["Data and services"]
  node_data_service["Data source<br/>[datasource.py]"]
  node_ops_store[("Operations store<br/>[ops_store.py]")]
  node_llm["Cortex AI<br/>[llm.py]"]
end

node_operator(("Plant staff"))
node_snowflake[("Snowflake")]

node_operator -->|"uses"| node_app
node_app -.->|"opens"| node_command
node_app -.->|"opens"| node_monitor_page
node_app -.->|"opens"| node_investigation_page
node_app -.->|"opens"| node_actions_page
node_app -.->|"opens"| node_reports_page
node_app -.->|"offers"| node_other_pages
node_app -->|"renders"| node_assistant_ui
node_monitor_page -->|"uses"| node_monitor
node_monitor_page -->|"uses"| node_prediction
node_monitor -->|"uses"| node_prediction
node_monitor -->|"reads"| node_plant_data
node_command -->|"reads"| node_plant_data
node_pipeline -->|"queries"| node_plant_data
node_pipeline -->|"uses"| node_monitor
node_plant_data -->|"uses"| node_quality_tools
node_plant_data -->|"uses"| node_trace_tools
node_plant_data -->|"uses"| node_copq
node_investigation_page -.->|"starts"| node_runs
node_runs -->|"runs"| node_pipeline
node_investigation_page -.->|"views"| node_reports
node_reports_page -.->|"exports"| node_reports
node_actions_page -.->|"tracks"| node_capa
node_monitor_page -->|"shows"| node_impact
node_command -->|"shows"| node_impact
node_other_pages -.->|"supports"| node_maintenance
node_other_pages -.->|"supports"| node_parts
node_parts -->|"persists"| node_ops_store
node_capa -->|"persists"| node_ops_store
node_impact -->|"reads"| node_plant_data
node_digest -->|"collects"| node_capa
node_digest -->|"collects"| node_impact
node_assistant_ui -->|"calls"| node_assistant
node_data_service -->|"configures"| node_plant_data
node_plant_data -.->|"reads tables"| node_snowflake
node_ops_store -->|"persists state"| node_snowflake
node_pipeline -.->|"reasons with"| node_llm
node_reports -->|"includes actions"| node_capa

click node_app "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/streamlit_app.py"
click node_command "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/app_pages/command_center.py"
click node_monitor_page "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/app_pages/live_monitoring.py"
click node_investigation_page "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/app_pages/investigations.py"
click node_actions_page "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/app_pages/corrective_actions.py"
click node_reports_page "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/app_pages/reports.py"
click node_other_pages "https://github.com/tanuj52/oee_dashboard_8d_intelligence/tree/main/snowflake_app/app_pages"
click node_assistant_ui "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/ui/chat_dock.py"
click node_monitor "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/core/monitoring.py"
click node_prediction "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/tools/prediction_engine.py"
click node_plant_data "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/core/data.py"
click node_quality_tools "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/tools/spc_analysis.py"
click node_trace_tools "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/tools/lot_traceability.py"
click node_copq "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/tools/copq_calculator.py"
click node_pipeline "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/core/pipeline.py"
click node_runs "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/runs.py"
click node_maintenance "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/core/maintenance.py"
click node_parts "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/parts_ops.py"
click node_capa "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/capa_ops.py"
click node_impact "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/impact_ops.py"
click node_reports "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/report_export.py"
click node_digest "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/digest_ops.py"
click node_assistant "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/assistant.py"
click node_data_service "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/datasource.py"
click node_ops_store "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/ops_store.py"
click node_llm "https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/llm.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_command,node_monitor_page,node_investigation_page,node_actions_page,node_reports_page,node_other_pages,node_assistant_ui toneBlue
class node_monitor,node_prediction,node_plant_data,node_quality_tools,node_trace_tools,node_copq,node_snowflake toneAmber
class node_pipeline,node_runs,node_maintenance,node_parts,node_capa,node_impact,node_reports,node_digest,node_assistant toneMint
class node_data_service,node_ops_store,node_llm toneRose
class node_operator toneIndigo
```

## Components

### Operator experience

- [Streamlit app](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/streamlit_app.py): `snowflake_app/streamlit_app.py`
- [Command center](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/app_pages/command_center.py): `snowflake_app/app_pages/command_center.py`
- [Live monitoring](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/app_pages/live_monitoring.py): `snowflake_app/app_pages/live_monitoring.py`
- [8D investigations](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/app_pages/investigations.py): `snowflake_app/app_pages/investigations.py`
- [Corrective actions](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/app_pages/corrective_actions.py): `snowflake_app/app_pages/corrective_actions.py`
- [Reports library](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/app_pages/reports.py): `snowflake_app/app_pages/reports.py`
- [Plant workflows](https://github.com/tanuj52/oee_dashboard_8d_intelligence/tree/main/snowflake_app/app_pages): `snowflake_app/app_pages`
- [Assistant chat](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/ui/chat_dock.py): `snowflake_app/ui/chat_dock.py`

### Plant analytics

- [Online monitoring](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/core/monitoring.py): `snowflake_app/core/monitoring.py`
- [Failure prediction](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/tools/prediction_engine.py): `snowflake_app/tools/prediction_engine.py`
- [Plant analytics](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/core/data.py): `snowflake_app/core/data.py`
- [Quality tools](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/tools/spc_analysis.py): `snowflake_app/tools/spc_analysis.py`
- [Lot traceability](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/tools/lot_traceability.py): `snowflake_app/tools/lot_traceability.py`
- [COPQ analysis](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/tools/copq_calculator.py): `snowflake_app/tools/copq_calculator.py`

### Operational workflows

- [8D agent pipeline](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/core/pipeline.py): `snowflake_app/core/pipeline.py`
- [Investigation runs](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/runs.py): `snowflake_app/services/runs.py`
- [Maintenance operations](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/core/maintenance.py): `snowflake_app/core/maintenance.py`
- [Parts and purchasing](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/parts_ops.py): `snowflake_app/services/parts_ops.py`
- [Action tracking](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/capa_ops.py): `snowflake_app/services/capa_ops.py`
- [Business impact](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/impact_ops.py): `snowflake_app/services/impact_ops.py`
- [Report export](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/report_export.py): `snowflake_app/services/report_export.py`
- [Daily digest](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/digest_ops.py): `snowflake_app/services/digest_ops.py`
- [Plant assistant](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/assistant.py): `snowflake_app/services/assistant.py`

### Data and services

- [Data source](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/datasource.py): `snowflake_app/services/datasource.py`
- [Operations store](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/ops_store.py): `snowflake_app/services/ops_store.py`
- [Cortex AI](https://github.com/tanuj52/oee_dashboard_8d_intelligence/blob/main/snowflake_app/services/llm.py): `snowflake_app/services/llm.py`

### Other components

- **Plant staff**
- **Snowflake**

## Connections

- Plant staff → Streamlit app: uses
- Streamlit app → Command center: opens
- Streamlit app → Live monitoring: opens
- Streamlit app → 8D investigations: opens
- Streamlit app → Corrective actions: opens
- Streamlit app → Reports library: opens
- Streamlit app → Plant workflows: offers
- Streamlit app → Assistant chat: renders (evidence: `snowflake_app/streamlit_app.py`)
- Live monitoring → Online monitoring: uses (evidence: `snowflake_app/app_pages/live_monitoring.py`)
- Live monitoring → Failure prediction: uses (evidence: `snowflake_app/app_pages/live_monitoring.py`)
- Online monitoring → Failure prediction: uses (evidence: `snowflake_app/core/monitoring.py`)
- Online monitoring → Plant analytics: reads (evidence: `snowflake_app/core/monitoring.py`)
- Command center → Plant analytics: reads (evidence: `snowflake_app/app_pages/command_center.py`)
- 8D agent pipeline → Plant analytics: queries (evidence: `snowflake_app/core/pipeline.py`)
- 8D agent pipeline → Online monitoring: uses (evidence: `snowflake_app/core/pipeline.py`)
- Plant analytics → Quality tools: uses (evidence: `snowflake_app/core/data.py`)
- Plant analytics → Lot traceability: uses (evidence: `snowflake_app/core/data.py`)
- Plant analytics → COPQ analysis: uses (evidence: `snowflake_app/core/data.py`)
- 8D investigations → Investigation runs: starts
- Investigation runs → 8D agent pipeline: runs (evidence: `snowflake_app/services/runs.py`)
- 8D investigations → Report export: views
- Reports library → Report export: exports
- Corrective actions → Action tracking: tracks
- Live monitoring → Business impact: shows (evidence: `snowflake_app/app_pages/live_monitoring.py`)
- Command center → Business impact: shows (evidence: `snowflake_app/app_pages/command_center.py`)
- Plant workflows → Maintenance operations: supports
- Plant workflows → Parts and purchasing: supports
- Parts and purchasing → Operations store: persists (evidence: `snowflake_app/services/parts_ops.py`)
- Action tracking → Operations store: persists (evidence: `snowflake_app/services/capa_ops.py`)
- Business impact → Plant analytics: reads (evidence: `snowflake_app/services/impact_ops.py`)
- Daily digest → Action tracking: collects (evidence: `snowflake_app/services/digest_ops.py`)
- Daily digest → Business impact: collects (evidence: `snowflake_app/services/digest_ops.py`)
- Assistant chat → Plant assistant: calls (evidence: `snowflake_app/ui/chat_dock.py`)
- Data source → Plant analytics: configures (evidence: `snowflake_app/services/datasource.py`)
- Plant analytics → Snowflake: reads tables
- Operations store → Snowflake: persists state (evidence: `snowflake_app/services/ops_store.py`)
- 8D agent pipeline → Cortex AI: reasons with
- Report export → Action tracking: includes actions (evidence: `snowflake_app/services/report_export.py`)
