# samarth6840/openissue architecture

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

- Interactive diagram: https://gitdiagram.com/samarth6840/openissue
- Repository: https://github.com/samarth6840/openissue

## Overview

OpenIssue is a local complaint-intelligence application: users load sample data or upload a CSV, validate and normalize complaint text, discover themes, inspect their evidence and quality, review time trends, and export results. Its main implementation is a Streamlit dashboard backed by modular Python processing code. The README also describes broader candidate modeling approaches, but the available source does not establish those as implemented runtime components. Relationships below follow the dashboard excerpts, SOURCE INDEX references, and README; unsampled details are not inferred.

Main entry points: [`dashboard.py`](https://github.com/samarth6840/openissue/blob/main/dashboard.py) (Dashboard), [`src/openissue/cluster.py`](https://github.com/samarth6840/openissue/blob/main/src/openissue/cluster.py) (TF-IDF clustering), [`src/openissue/trends.py`](https://github.com/samarth6840/openissue/blob/main/src/openissue/trends.py) (Trend analysis), [`src/openissue/sample.py`](https://github.com/samarth6840/openissue/blob/main/src/openissue/sample.py) (Sample complaints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Dashboard workflow"]
  node_dashboard["Dashboard<br/>[dashboard.py]"]
  node_sample_data["Sample complaints<br/>[sample.py]"]
end

subgraph group_data["Data preparation"]
  node_csv_ingestion["CSV ingestion<br/>[ingest.py]"]
  node_validation["Validation and cleaning<br/>[validate.py]"]
  node_normalization["Text normalization<br/>[preprocess.py]"]
end

subgraph group_discovery["Theme discovery"]
  node_clustering["TF-IDF clustering<br/>[cluster.py]"]
  node_semantic_option["Embedding option<br/>[dashboard.py]"]
end

subgraph group_insight["Review and reporting"]
  node_evaluation["Cluster evaluation<br/>[evaluate.py]"]
  node_theme_summary["Theme summaries<br/>[dashboard.py]"]
  node_human_review["Complaint examples<br/>[dashboard.py]"]
  node_trend_analysis["Trend analysis<br/>[trends.py]"]
  node_emerging_flags["Emerging flags<br/>[trends.py]"]
  node_csv_export["CSV export<br/>[dashboard.py]"]
end

node_user(("Analyst"))

node_user -->|"uses"| node_dashboard
node_user -->|"uploads CSV"| node_dashboard
node_dashboard -->|"loads sample"| node_sample_data
node_dashboard -->|"loads CSV"| node_csv_ingestion
node_dashboard -->|"validates records"| node_validation
node_dashboard -->|"normalizes text"| node_normalization
node_dashboard -->|"discovers themes"| node_clustering
node_dashboard -->|"offers embeddings"| node_semantic_option
node_dashboard -->|"evaluates clusters"| node_evaluation
node_dashboard -->|"shows summaries"| node_theme_summary
node_dashboard -->|"shows examples"| node_human_review
node_dashboard -->|"computes trends"| node_trend_analysis
node_dashboard -->|"flags themes"| node_emerging_flags
node_dashboard -->|"exports results"| node_csv_export
node_dashboard -->|"uses baseline"| node_clustering
node_dashboard -->|"aggregates by time"| node_trend_analysis
node_dashboard -->|"supports investigation"| node_human_review

click node_dashboard "https://github.com/samarth6840/openissue/blob/main/dashboard.py"
click node_sample_data "https://github.com/samarth6840/openissue/blob/main/src/openissue/sample.py"
click node_csv_ingestion "https://github.com/samarth6840/openissue/blob/main/src/openissue/ingest.py"
click node_validation "https://github.com/samarth6840/openissue/blob/main/src/openissue/validate.py"
click node_normalization "https://github.com/samarth6840/openissue/blob/main/src/openissue/preprocess.py"
click node_clustering "https://github.com/samarth6840/openissue/blob/main/src/openissue/cluster.py"
click node_semantic_option "https://github.com/samarth6840/openissue/blob/main/dashboard.py"
click node_evaluation "https://github.com/samarth6840/openissue/blob/main/src/openissue/evaluate.py"
click node_theme_summary "https://github.com/samarth6840/openissue/blob/main/dashboard.py"
click node_human_review "https://github.com/samarth6840/openissue/blob/main/dashboard.py"
click node_trend_analysis "https://github.com/samarth6840/openissue/blob/main/src/openissue/trends.py"
click node_emerging_flags "https://github.com/samarth6840/openissue/blob/main/src/openissue/trends.py"
click node_csv_export "https://github.com/samarth6840/openissue/blob/main/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_dashboard,node_sample_data toneBlue
class node_csv_ingestion,node_validation,node_normalization toneAmber
class node_clustering,node_semantic_option toneMint
class node_evaluation,node_theme_summary,node_human_review,node_trend_analysis,node_emerging_flags,node_csv_export toneRose
class node_user toneIndigo
```

## Components

### Dashboard workflow

- [Dashboard](https://github.com/samarth6840/openissue/blob/main/dashboard.py): `dashboard.py`
- [Sample complaints](https://github.com/samarth6840/openissue/blob/main/src/openissue/sample.py): `src/openissue/sample.py`

### Data preparation

- [CSV ingestion](https://github.com/samarth6840/openissue/blob/main/src/openissue/ingest.py): `src/openissue/ingest.py`
- [Validation and cleaning](https://github.com/samarth6840/openissue/blob/main/src/openissue/validate.py): `src/openissue/validate.py`
- [Text normalization](https://github.com/samarth6840/openissue/blob/main/src/openissue/preprocess.py): `src/openissue/preprocess.py`

### Theme discovery

- [TF-IDF clustering](https://github.com/samarth6840/openissue/blob/main/src/openissue/cluster.py): `src/openissue/cluster.py`
- [Embedding option](https://github.com/samarth6840/openissue/blob/main/dashboard.py): `dashboard.py`

### Review and reporting

- [Cluster evaluation](https://github.com/samarth6840/openissue/blob/main/src/openissue/evaluate.py): `src/openissue/evaluate.py`
- [Theme summaries](https://github.com/samarth6840/openissue/blob/main/dashboard.py): `dashboard.py`
- [Complaint examples](https://github.com/samarth6840/openissue/blob/main/dashboard.py): `dashboard.py`
- [Trend analysis](https://github.com/samarth6840/openissue/blob/main/src/openissue/trends.py): `src/openissue/trends.py`
- [Emerging flags](https://github.com/samarth6840/openissue/blob/main/src/openissue/trends.py): `src/openissue/trends.py`
- [CSV export](https://github.com/samarth6840/openissue/blob/main/dashboard.py): `dashboard.py`

### Other components

- **Analyst**

## Connections

- Analyst → Dashboard: uses (evidence: `README.md`)
- Analyst → Dashboard: uploads CSV (evidence: `README.md`)
- Dashboard → Sample complaints: loads sample (evidence: `dashboard.py`)
- Dashboard → CSV ingestion: loads CSV (evidence: `dashboard.py`)
- Dashboard → Validation and cleaning: validates records (evidence: `dashboard.py`)
- Dashboard → Text normalization: normalizes text (evidence: `dashboard.py`)
- Dashboard → TF-IDF clustering: discovers themes (evidence: `dashboard.py`)
- Dashboard → Embedding option: offers embeddings (evidence: `dashboard.py`)
- Dashboard → Cluster evaluation: evaluates clusters (evidence: `dashboard.py`)
- Dashboard → Theme summaries: shows summaries (evidence: `dashboard.py`)
- Dashboard → Complaint examples: shows examples (evidence: `dashboard.py`)
- Dashboard → Trend analysis: computes trends (evidence: `dashboard.py`)
- Dashboard → Emerging flags: flags themes (evidence: `dashboard.py`)
- Dashboard → CSV export: exports results (evidence: `dashboard.py`)
- Dashboard → TF-IDF clustering: uses baseline (evidence: `README.md`)
- Dashboard → Trend analysis: aggregates by time (evidence: `README.md`)
- Dashboard → Complaint examples: supports investigation (evidence: `README.md`)
