# nitish-shaw-creator/saathi_ai-victim-support architecture

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

- Interactive diagram: https://gitdiagram.com/nitish-shaw-creator/saathi_ai-victim-support
- Repository: https://github.com/nitish-shaw-creator/saathi_ai-victim-support

## Overview

SAATHI is a single-file Streamlit prototype for stress and vulnerability assessment. The user-facing flow includes a legal notice, optional location sharing, and a narrative entered as text or supplied by voice; language-aware UI and demo stories support that experience. The app also detects language-based risk and immediate-danger signals and presents prototype results. The excerpt confirms location capture, transcript handling, and alert-trigger detection, but omits much of the 140 KB file, so some workflow links are marked unverified rather than treated as observed calls.

Main entry points: [`app.py`](https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/app.py) (Streamlit app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_streamlit_app["Streamlit app<br/>[app.py]"]
  node_consent["Legal notice<br/>[app.py]"]
  node_location["Location sharing<br/>[app.py]"]
  node_language["Language and translation<br/>[app.py]"]
end

subgraph group_assessment["Assessment"]
  node_narrative["Narrative input<br/>[app.py]"]
  node_voice["Voice transcription<br/>[app.py]"]
  node_screening["Risk screening<br/>[app.py]"]
  node_results["Assessment results<br/>[app.py]"]
end

subgraph group_support["Safety support"]
  node_alert_detection["Alert trigger detection<br/>[app.py]"]
  node_location_services["Geolocation service"]
end

node_user(("User"))

node_user -->|"uses"| node_streamlit_app
node_streamlit_app -.->|"presents"| node_consent
node_streamlit_app -->|"offers"| node_location
node_location -->|"requests coordinates"| node_location_services
node_streamlit_app -.->|"localizes"| node_language
node_user -.->|"provides story"| node_narrative
node_user -.->|"records speech"| node_voice
node_voice -->|"supplies transcript"| node_narrative
node_narrative -.->|"screens text"| node_screening
node_screening -.->|"produces indicators"| node_results
node_narrative -->|"checks triggers"| node_alert_detection

click node_streamlit_app "https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/app.py"
click node_consent "https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/app.py"
click node_location "https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/app.py"
click node_language "https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/app.py"
click node_narrative "https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/app.py"
click node_voice "https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/app.py"
click node_screening "https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/app.py"
click node_results "https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/app.py"
click node_alert_detection "https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/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_streamlit_app,node_consent,node_location,node_language,node_user toneBlue
class node_narrative,node_voice,node_screening,node_results toneAmber
class node_alert_detection,node_location_services toneMint
```

## Components

### User experience

- [Streamlit app](https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/app.py): `app.py`
- [Legal notice](https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/app.py): `app.py`
- [Location sharing](https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/app.py): `app.py`
- [Language and translation](https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/app.py): `app.py`

### Assessment

- [Narrative input](https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/app.py): `app.py`
- [Voice transcription](https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/app.py): `app.py`
- [Risk screening](https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/app.py): `app.py`
- [Assessment results](https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/app.py): `app.py`

### Safety support

- [Alert trigger detection](https://github.com/nitish-shaw-creator/saathi_ai-victim-support/blob/main/app.py): `app.py`
- **Geolocation service**

### Other components

- **User**

## Connections

- User → Streamlit app: uses (evidence: `app.py`)
- Streamlit app → Legal notice: presents (evidence: `app.py`)
- Streamlit app → Location sharing: offers (evidence: `app.py`)
- Location sharing → Geolocation service: requests coordinates (evidence: `app.py`)
- Streamlit app → Language and translation: localizes (evidence: `app.py`)
- User → Narrative input: provides story
- User → Voice transcription: records speech
- Voice transcription → Narrative input: supplies transcript (evidence: `app.py`)
- Narrative input → Risk screening: screens text (evidence: `app.py`)
- Risk screening → Assessment results: produces indicators (evidence: `app.py`)
- Narrative input → Alert trigger detection: checks triggers (evidence: `app.py`)
