# shreyaasdeworld/seip architecture

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

- Interactive diagram: https://gitdiagram.com/shreyaasdeworld/seip
- Repository: https://github.com/shreyaasdeworld/seip

## Overview

This repository combines a synthetic ITSM data generator with a database-backed SEIP Phase 1 analysis and review workflow. Operators generate relational ITSM records, then run evidence extraction, correlation, activity reconstruction, capacity-leakage analysis, and reviewer-queue construction; the Streamlit dashboard presents the results. The README also describes broader causal, investment, and outcome-verification domains as proposed architecture, but the sampled source and tree do not establish implementations for them. Pipeline connections reflect explicit table reads/writes and documented ordering; unsampled implementations are not inferred.

Main entry points: [`generator.py`](https://github.com/shreyaasdeworld/seip/blob/main/generator.py) (ITSM Generator), [`seip_phase1_dashboard.py`](https://github.com/shreyaasdeworld/seip/blob/main/seip_phase1_dashboard.py) (Phase 1 Dashboard), [`Database/02_build_evidence.py`](https://github.com/shreyaasdeworld/seip/blob/main/Database/02_build_evidence.py) (Evidence Builder), [`Database/03_build_correlation.py`](https://github.com/shreyaasdeworld/seip/blob/main/Database/03_build_correlation.py) (Correlation Builder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_generation["Data Generation"]
  node_generator["ITSM Generator<br/>[generator.py]"]
end

subgraph group_evidence["Evidence Processing"]
  node_evidence_builder["Evidence Builder"]
  node_correlation_builder["Correlation Builder"]
end

subgraph group_analysis["Intelligence Pipeline"]
  node_activity_reconstruction["Activity Reconstruction"]
  node_capacity_analysis["Capacity Leakage"]
end

subgraph group_review["Review Interface"]
  node_review_queue_builder["Reviewer Queue Builder"]
  node_dashboard["Phase 1 Dashboard"]
end

node_operator(("Operator"))
node_postgres[("PostgreSQL")]
node_reviewer(("Reviewer"))

node_operator -->|"runs"| node_generator
node_generator -->|"writes ITSM records"| node_postgres
node_evidence_builder -->|"reads source records; writes evidence"| node_postgres
node_correlation_builder -->|"reads evidence; writes correlations"| node_postgres
node_activity_reconstruction -->|"reads histories and correlations; writes activities"| node_postgres
node_capacity_analysis -->|"reads activities and correlations; writes leakage"| node_postgres
node_review_queue_builder -->|"reads leakage; writes queue"| node_postgres
node_dashboard -->|"queries review data"| node_postgres
node_reviewer -->|"reviews results"| node_dashboard

click node_generator "https://github.com/shreyaasdeworld/seip/blob/main/generator.py"
click node_evidence_builder "https://github.com/shreyaasdeworld/seip/blob/main/Database/02_build_evidence.py"
click node_correlation_builder "https://github.com/shreyaasdeworld/seip/blob/main/Database/03_build_correlation.py"
click node_activity_reconstruction "https://github.com/shreyaasdeworld/seip/blob/main/Database/04_reconstruct_activity.py"
click node_capacity_analysis "https://github.com/shreyaasdeworld/seip/blob/main/Database/05_build_capacity_leakage.py"
click node_review_queue_builder "https://github.com/shreyaasdeworld/seip/blob/main/Database/06_build_reviewer_queue.py"
click node_dashboard "https://github.com/shreyaasdeworld/seip/blob/main/seip_phase1_dashboard.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_generator,node_reviewer toneBlue
class node_evidence_builder,node_correlation_builder,node_postgres toneAmber
class node_activity_reconstruction,node_capacity_analysis toneMint
class node_review_queue_builder,node_dashboard toneRose
class node_operator toneIndigo
```

## Components

### Data Generation

- [ITSM Generator](https://github.com/shreyaasdeworld/seip/blob/main/generator.py): `generator.py`

### Evidence Processing

- [Evidence Builder](https://github.com/shreyaasdeworld/seip/blob/main/Database/02_build_evidence.py): `Database/02_build_evidence.py`
- [Correlation Builder](https://github.com/shreyaasdeworld/seip/blob/main/Database/03_build_correlation.py): `Database/03_build_correlation.py`

### Intelligence Pipeline

- [Activity Reconstruction](https://github.com/shreyaasdeworld/seip/blob/main/Database/04_reconstruct_activity.py): `Database/04_reconstruct_activity.py`
- [Capacity Leakage](https://github.com/shreyaasdeworld/seip/blob/main/Database/05_build_capacity_leakage.py): `Database/05_build_capacity_leakage.py`

### Review Interface

- [Reviewer Queue Builder](https://github.com/shreyaasdeworld/seip/blob/main/Database/06_build_reviewer_queue.py): `Database/06_build_reviewer_queue.py`
- [Phase 1 Dashboard](https://github.com/shreyaasdeworld/seip/blob/main/seip_phase1_dashboard.py): `seip_phase1_dashboard.py`

### Other components

- **Operator**
- **PostgreSQL**
- **Reviewer**

## Connections

- Operator → ITSM Generator: runs
- ITSM Generator → PostgreSQL: writes ITSM records
- Evidence Builder → PostgreSQL: reads source records; writes evidence
- Correlation Builder → PostgreSQL: reads evidence; writes correlations
- Activity Reconstruction → PostgreSQL: reads histories and correlations; writes activities
- Capacity Leakage → PostgreSQL: reads activities and correlations; writes leakage
- Reviewer Queue Builder → PostgreSQL: reads leakage; writes queue
- Phase 1 Dashboard → PostgreSQL: queries review data
- Reviewer → Phase 1 Dashboard: reviews results
