# amansahu-collab/swt-orchestrator architecture

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

- Interactive diagram: https://gitdiagram.com/amansahu-collab/swt-orchestrator
- Repository: https://github.com/amansahu-collab/swt-orchestrator

## Overview

This repository is a collection of Streamlit writing and language-assessment tools, rather than a single orchestrated backend. Users submit text, essays, or lecture-retell audio/transcripts to external APIs, then review scores, corrections, highlights, and feedback; essay remarks can also be analyzed in a MongoDB-backed dashboard. The README provides no capability details, so the map reflects the sampled apps. The Retell evaluator’s request/response path is visible, but omitted portions prevent tracing every UI action or database write.

Main entry points: [`ui_essay.py`](https://github.com/amansahu-collab/swt-orchestrator/blob/main/ui_essay.py) (Essay scoring UI), [`streamlit_essay_scorer.py`](https://github.com/amansahu-collab/swt-orchestrator/blob/main/streamlit_essay_scorer.py) (Essay scorer), [`retell_evaluator.py`](https://github.com/amansahu-collab/swt-orchestrator/blob/main/retell_evaluator.py) (Retell evaluator), [`streamlit_app.py`](https://github.com/amansahu-collab/swt-orchestrator/blob/main/streamlit_app.py) (Proofreading app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_writing["Writing assessment"]
  node_essay_ui["Essay scoring UI<br/>[ui_essay.py]"]
  node_essay_api{{"Essay scoring API"}}
  node_essay_results["Scores and highlights<br/>[ui_essay.py]"]
  node_essay_remark["Essay remarks<br/>[ui_essay.py]"]
  node_scorer_ui["Essay scorer"]
  node_scorer_api{{"Scoring API"}}
  node_scorer_results["Scoring feedback"]
  node_scorer_remark["Scorer remarks"]
  node_proofread_ui["Proofreading app<br/>[streamlit_app.py]"]
  node_proofread_api{{"Proofreading API"}}
end

subgraph group_retell["Retell evaluation"]
  node_retell_ui["Retell evaluator"]
  node_audio_api{{"Transcription API"}}
  node_retell_api{{"Retell API"}}
  node_retell_results["Coverage and feedback"]
  node_call_db[("Call records")]
end

subgraph group_analytics["Remark analytics"]
  node_remark_db[("Remark database")]
  node_remark_dashboard["Remark dashboard"]
end

subgraph group_correction["Text correction"]
  node_grammar_ui["Grammar corrector"]
  node_correct_api{{"Text correction API"}}
end

node_writer(("Writer"))

node_writer -->|"submits essay"| node_essay_ui
node_essay_ui -->|"scores essay"| node_essay_api
node_essay_api -->|"returns results"| node_essay_ui
node_essay_ui -->|"renders results"| node_essay_results
node_essay_ui -->|"submits feedback"| node_essay_remark
node_essay_ui -->|"posts remark"| node_remark_db
node_writer -->|"submits essay"| node_scorer_ui
node_scorer_ui -->|"scores essay"| node_scorer_api
node_scorer_ui -->|"renders scores"| node_scorer_results
node_scorer_ui -->|"submits feedback"| node_scorer_remark
node_scorer_ui -->|"posts remark"| node_remark_db
node_remark_dashboard -->|"reads remarks"| node_remark_db
node_writer -->|"submits retell"| node_retell_ui
node_retell_ui -->|"transcribes audio"| node_audio_api
node_retell_ui -->|"evaluates transcripts"| node_retell_api
node_retell_ui -->|"renders evaluation"| node_retell_results
node_retell_ui -->|"logs call"| node_call_db
node_writer -->|"submits text"| node_proofread_ui
node_proofread_ui -->|"scores response"| node_proofread_api
node_proofread_ui -->|"shows evaluation"| node_writer
node_writer -->|"submits text"| node_grammar_ui
node_grammar_ui -->|"requests correction"| node_correct_api
node_grammar_ui -->|"shows correction"| node_writer

click node_essay_ui "https://github.com/amansahu-collab/swt-orchestrator/blob/main/ui_essay.py"
click node_essay_results "https://github.com/amansahu-collab/swt-orchestrator/blob/main/ui_essay.py"
click node_essay_remark "https://github.com/amansahu-collab/swt-orchestrator/blob/main/ui_essay.py"
click node_scorer_ui "https://github.com/amansahu-collab/swt-orchestrator/blob/main/streamlit_essay_scorer.py"
click node_scorer_results "https://github.com/amansahu-collab/swt-orchestrator/blob/main/streamlit_essay_scorer.py"
click node_scorer_remark "https://github.com/amansahu-collab/swt-orchestrator/blob/main/streamlit_essay_scorer.py"
click node_remark_dashboard "https://github.com/amansahu-collab/swt-orchestrator/blob/main/essay_remarks_dashboard.py"
click node_retell_ui "https://github.com/amansahu-collab/swt-orchestrator/blob/main/retell_evaluator.py"
click node_retell_results "https://github.com/amansahu-collab/swt-orchestrator/blob/main/retell_evaluator.py"
click node_proofread_ui "https://github.com/amansahu-collab/swt-orchestrator/blob/main/streamlit_app.py"
click node_grammar_ui "https://github.com/amansahu-collab/swt-orchestrator/blob/main/grammar_correction_app.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_essay_ui,node_essay_api,node_essay_results,node_essay_remark,node_scorer_ui,node_scorer_api,node_scorer_results,node_scorer_remark,node_proofread_ui,node_proofread_api toneBlue
class node_retell_ui,node_audio_api,node_retell_api,node_retell_results,node_call_db toneAmber
class node_remark_db,node_remark_dashboard toneMint
class node_grammar_ui,node_correct_api toneRose
class node_writer toneIndigo
```

## Components

### Writing assessment

- [Essay scoring UI](https://github.com/amansahu-collab/swt-orchestrator/blob/main/ui_essay.py): `ui_essay.py`
- **Essay scoring API**
- [Scores and highlights](https://github.com/amansahu-collab/swt-orchestrator/blob/main/ui_essay.py): `ui_essay.py`
- [Essay remarks](https://github.com/amansahu-collab/swt-orchestrator/blob/main/ui_essay.py): `ui_essay.py`
- [Essay scorer](https://github.com/amansahu-collab/swt-orchestrator/blob/main/streamlit_essay_scorer.py): `streamlit_essay_scorer.py`
- **Scoring API**
- [Scoring feedback](https://github.com/amansahu-collab/swt-orchestrator/blob/main/streamlit_essay_scorer.py): `streamlit_essay_scorer.py`
- [Scorer remarks](https://github.com/amansahu-collab/swt-orchestrator/blob/main/streamlit_essay_scorer.py): `streamlit_essay_scorer.py`
- [Proofreading app](https://github.com/amansahu-collab/swt-orchestrator/blob/main/streamlit_app.py): `streamlit_app.py`
- **Proofreading API**

### Retell evaluation

- [Retell evaluator](https://github.com/amansahu-collab/swt-orchestrator/blob/main/retell_evaluator.py): `retell_evaluator.py`
- **Transcription API**
- **Retell API**
- [Coverage and feedback](https://github.com/amansahu-collab/swt-orchestrator/blob/main/retell_evaluator.py): `retell_evaluator.py`
- **Call records**

### Remark analytics

- **Remark database**
- [Remark dashboard](https://github.com/amansahu-collab/swt-orchestrator/blob/main/essay_remarks_dashboard.py): `essay_remarks_dashboard.py`

### Text correction

- [Grammar corrector](https://github.com/amansahu-collab/swt-orchestrator/blob/main/grammar_correction_app.py): `grammar_correction_app.py`
- **Text correction API**

### Other components

- **Writer**

## Connections

- Writer → Essay scoring UI: submits essay (evidence: `ui_essay.py`)
- Essay scoring UI → Essay scoring API: scores essay (evidence: `ui_essay.py`)
- Essay scoring API → Essay scoring UI: returns results (evidence: `ui_essay.py`)
- Essay scoring UI → Scores and highlights: renders results (evidence: `ui_essay.py`)
- Essay scoring UI → Essay remarks: submits feedback (evidence: `ui_essay.py`)
- Essay scoring UI → Remark database: posts remark (evidence: `ui_essay.py`)
- Writer → Essay scorer: submits essay (evidence: `streamlit_essay_scorer.py`)
- Essay scorer → Scoring API: scores essay (evidence: `streamlit_essay_scorer.py`)
- Essay scorer → Scoring feedback: renders scores (evidence: `streamlit_essay_scorer.py`)
- Essay scorer → Scorer remarks: submits feedback (evidence: `streamlit_essay_scorer.py`)
- Essay scorer → Remark database: posts remark (evidence: `streamlit_essay_scorer.py`)
- Remark dashboard → Remark database: reads remarks (evidence: `essay_remarks_dashboard.py`)
- Writer → Retell evaluator: submits retell (evidence: `retell_evaluator.py`)
- Retell evaluator → Transcription API: transcribes audio (evidence: `retell_evaluator.py`)
- Retell evaluator → Retell API: evaluates transcripts (evidence: `retell_evaluator.py`)
- Retell evaluator → Coverage and feedback: renders evaluation (evidence: `retell_evaluator.py`)
- Retell evaluator → Call records: logs call (evidence: `retell_evaluator.py`)
- Writer → Proofreading app: submits text (evidence: `streamlit_app.py`)
- Proofreading app → Proofreading API: scores response (evidence: `streamlit_app.py`)
- Proofreading app → Writer: shows evaluation (evidence: `streamlit_app.py`)
- Writer → Grammar corrector: submits text (evidence: `grammar_correction_app.py`)
- Grammar corrector → Text correction API: requests correction (evidence: `grammar_correction_app.py`)
- Grammar corrector → Writer: shows correction (evidence: `grammar_correction_app.py`)
