# rohanap/snowflake-h2s-chauras-final architecture

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

- Interactive diagram: https://gitdiagram.com/rohanap/snowflake-h2s-chauras-final
- Repository: https://github.com/rohanap/snowflake-h2s-chauras-final

## Overview

Insurance 360 is a Streamlit insurance-intelligence application: users explore policyholders and operational analytics, retrieve or ask questions about transcripts and data, inspect document/audio extraction, and dispatch outreach. The tree and excerpts show a newer command-center app alongside an earlier page set, with shared query and AI helpers. Snowflake is the evidenced runtime data/AI backend; the repository also contains bronze, silver, and gold data exports. Source excerpts are partial, so unsampled feature internals and uncertain wiring are represented conservatively.

Main entry points: [`Insurance_360_v2/streamlit_app.py`](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/streamlit_app.py) (Command Center), [`Insurance_360_v2/utils/data_loader.py`](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/utils/data_loader.py) (Snowflake Queries), [`Insurance_360_v2/pages/1_Customer_360.py`](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/pages/1_Customer_360.py) (Customer 360), [`Insurance_360_v2/pages/2_NBA_Dashboard.py`](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/pages/2_NBA_Dashboard.py) (NBA Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User Experience"]
  node_command["Command Center<br/>[streamlit_app.py]"]
  node_theme["Shared Theme<br/>[theme.py]"]
end

subgraph group_analytics["Customer Analytics"]
  node_profile["Customer 360<br/>[1_Customer_360.py]"]
  node_nba["NBA Dashboard<br/>[2_NBA_Dashboard.py]"]
  node_segments["Segment Analytics"]
  node_ops["Ops Monitor<br/>[7_Ops_Monitor.py]"]
  node_legacy_profile["Legacy Customer 360<br/>[1_Customer_360.py]"]
  node_legacy_segments["Legacy Segment Analytics"]
end

subgraph group_ai["AI Intelligence"]
  node_transcripts["Transcript Explorer"]
  node_ask["Ask Your Data<br/>[5_Ask_Your_Data.py]"]
  node_documents["Document AI<br/>[6_Document_AI.py]"]
  node_rag["Cortex RAG Router<br/>[rag_agent.py]"]
  node_legacy_ask["Legacy Ask Your Data<br/>[5_Ask_Your_Data.py]"]
  node_legacy_transcripts["Legacy Transcript Explorer"]
  node_legacy_documents["Legacy Document AI<br/>[6_Document_AI.py]"]
  node_legacy_rag["Legacy RAG Router<br/>[rag_agent.py]"]
end

subgraph group_platform["Data Platform"]
  node_loader["Snowflake Queries<br/>[data_loader.py]"]
  node_email["Email Dispatch<br/>[_email_helpers.py]"]
  node_legacy_loader["Legacy Data Queries<br/>[data_loader.py]"]
  node_snowflake[("Snowflake")]
end

node_user(("Insurance operator"))
node_email_service(("Email recipients"))

node_user -->|"opens"| node_command
node_command -->|"links to"| node_profile
node_command -->|"links to"| node_nba
node_command -->|"links to"| node_segments
node_command -->|"links to"| node_transcripts
node_command -->|"links to"| node_ask
node_command -->|"links to"| node_documents
node_command -->|"links to"| node_ops
node_command -->|"queries"| node_loader
node_profile -->|"loads records"| node_loader
node_nba -->|"loads scores"| node_loader
node_segments -->|"loads cohorts"| node_loader
node_transcripts -->|"loads calls"| node_loader
node_ask -->|"loads data"| node_loader
node_documents -->|"queries documents"| node_loader
node_ops -->|"loads status"| node_loader
node_transcripts -->|"searches transcripts"| node_rag
node_ask -->|"routes questions"| node_rag
node_profile -->|"dispatches email"| node_email
node_nba -->|"dispatches email"| node_email
node_email -->|"sends messages"| node_email_service
node_loader -.->|"queries"| node_snowflake
node_rag -->|"calls Cortex"| node_snowflake
node_legacy_profile -->|"loads records"| node_legacy_loader
node_legacy_segments -->|"loads cohorts"| node_legacy_loader
node_legacy_transcripts -->|"searches transcripts"| node_legacy_rag
node_legacy_ask -->|"routes questions"| node_legacy_rag
node_legacy_profile -->|"applies styling"| node_theme
node_legacy_loader -->|"queries"| node_snowflake
node_legacy_rag -->|"calls Cortex"| node_snowflake

click node_command "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/streamlit_app.py"
click node_profile "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/pages/1_Customer_360.py"
click node_nba "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/pages/2_NBA_Dashboard.py"
click node_segments "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/pages/3_Segment_Analytics.py"
click node_transcripts "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/pages/4_Transcript_Explorer.py"
click node_ask "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/pages/5_Ask_Your_Data.py"
click node_documents "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/pages/6_Document_AI.py"
click node_ops "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/pages/7_Ops_Monitor.py"
click node_loader "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/utils/data_loader.py"
click node_rag "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/utils/rag_agent.py"
click node_email "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/pages/_email_helpers.py"
click node_legacy_profile "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/CSV%20files/pages/1_Customer_360.py"
click node_legacy_segments "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/CSV%20files/pages/3_Segment_Analytics.py"
click node_legacy_ask "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/CSV%20files/pages/5_Ask_Your_Data.py"
click node_legacy_transcripts "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/CSV%20files/pages/4_Transcript_Explorer.py"
click node_legacy_documents "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/CSV%20files/pages/6_Document_AI.py"
click node_legacy_loader "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/CSV%20files/utils/data_loader.py"
click node_legacy_rag "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/CSV%20files/utils/rag_agent.py"
click node_theme "https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/CSV%20files/utils/theme.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_command,node_theme toneBlue
class node_profile,node_nba,node_segments,node_ops,node_legacy_profile,node_legacy_segments toneAmber
class node_transcripts,node_ask,node_documents,node_rag,node_legacy_ask,node_legacy_transcripts,node_legacy_documents,node_legacy_rag toneMint
class node_loader,node_email,node_legacy_loader,node_snowflake toneRose
class node_user,node_email_service toneIndigo
```

## Components

### User Experience

- [Command Center](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/streamlit_app.py): `Insurance_360_v2/streamlit_app.py`
- [Shared Theme](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/CSV%20files/utils/theme.py): `CSV files/utils/theme.py`

### Customer Analytics

- [Customer 360](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/pages/1_Customer_360.py): `Insurance_360_v2/pages/1_Customer_360.py`
- [NBA Dashboard](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/pages/2_NBA_Dashboard.py): `Insurance_360_v2/pages/2_NBA_Dashboard.py`
- [Segment Analytics](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/pages/3_Segment_Analytics.py): `Insurance_360_v2/pages/3_Segment_Analytics.py`
- [Ops Monitor](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/pages/7_Ops_Monitor.py): `Insurance_360_v2/pages/7_Ops_Monitor.py`
- [Legacy Customer 360](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/CSV%20files/pages/1_Customer_360.py): `CSV files/pages/1_Customer_360.py`
- [Legacy Segment Analytics](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/CSV%20files/pages/3_Segment_Analytics.py): `CSV files/pages/3_Segment_Analytics.py`

### AI Intelligence

- [Transcript Explorer](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/pages/4_Transcript_Explorer.py): `Insurance_360_v2/pages/4_Transcript_Explorer.py`
- [Ask Your Data](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/pages/5_Ask_Your_Data.py): `Insurance_360_v2/pages/5_Ask_Your_Data.py`
- [Document AI](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/pages/6_Document_AI.py): `Insurance_360_v2/pages/6_Document_AI.py`
- [Cortex RAG Router](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/utils/rag_agent.py): `Insurance_360_v2/utils/rag_agent.py`
- [Legacy Ask Your Data](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/CSV%20files/pages/5_Ask_Your_Data.py): `CSV files/pages/5_Ask_Your_Data.py`
- [Legacy Transcript Explorer](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/CSV%20files/pages/4_Transcript_Explorer.py): `CSV files/pages/4_Transcript_Explorer.py`
- [Legacy Document AI](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/CSV%20files/pages/6_Document_AI.py): `CSV files/pages/6_Document_AI.py`
- [Legacy RAG Router](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/CSV%20files/utils/rag_agent.py): `CSV files/utils/rag_agent.py`

### Data Platform

- [Snowflake Queries](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/utils/data_loader.py): `Insurance_360_v2/utils/data_loader.py`
- [Email Dispatch](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/Insurance_360_v2/pages/_email_helpers.py): `Insurance_360_v2/pages/_email_helpers.py`
- [Legacy Data Queries](https://github.com/rohanap/snowflake-h2s-chauras-final/blob/main/CSV%20files/utils/data_loader.py): `CSV files/utils/data_loader.py`
- **Snowflake**

### Other components

- **Insurance operator**
- **Email recipients**

## Connections

- Insurance operator → Command Center: opens (evidence: `Insurance_360_v2/streamlit_app.py`)
- Command Center → Customer 360: links to (evidence: `Insurance_360_v2/streamlit_app.py`)
- Command Center → NBA Dashboard: links to (evidence: `Insurance_360_v2/streamlit_app.py`)
- Command Center → Segment Analytics: links to (evidence: `Insurance_360_v2/streamlit_app.py`)
- Command Center → Transcript Explorer: links to (evidence: `Insurance_360_v2/streamlit_app.py`)
- Command Center → Ask Your Data: links to (evidence: `Insurance_360_v2/streamlit_app.py`)
- Command Center → Document AI: links to (evidence: `Insurance_360_v2/streamlit_app.py`)
- Command Center → Ops Monitor: links to (evidence: `Insurance_360_v2/streamlit_app.py`)
- Command Center → Snowflake Queries: queries (evidence: `Insurance_360_v2/streamlit_app.py`)
- Customer 360 → Snowflake Queries: loads records (evidence: `Insurance_360_v2/pages/1_Customer_360.py`)
- NBA Dashboard → Snowflake Queries: loads scores (evidence: `Insurance_360_v2/pages/2_NBA_Dashboard.py`)
- Segment Analytics → Snowflake Queries: loads cohorts (evidence: `Insurance_360_v2/pages/3_Segment_Analytics.py`)
- Transcript Explorer → Snowflake Queries: loads calls (evidence: `Insurance_360_v2/pages/4_Transcript_Explorer.py`)
- Ask Your Data → Snowflake Queries: loads data (evidence: `Insurance_360_v2/pages/5_Ask_Your_Data.py`)
- Document AI → Snowflake Queries: queries documents (evidence: `Insurance_360_v2/pages/6_Document_AI.py`)
- Ops Monitor → Snowflake Queries: loads status (evidence: `Insurance_360_v2/pages/7_Ops_Monitor.py`)
- Transcript Explorer → Cortex RAG Router: searches transcripts (evidence: `Insurance_360_v2/pages/4_Transcript_Explorer.py`)
- Ask Your Data → Cortex RAG Router: routes questions (evidence: `Insurance_360_v2/pages/5_Ask_Your_Data.py`)
- Customer 360 → Email Dispatch: dispatches email (evidence: `Insurance_360_v2/pages/1_Customer_360.py`)
- NBA Dashboard → Email Dispatch: dispatches email (evidence: `Insurance_360_v2/pages/2_NBA_Dashboard.py`)
- Email Dispatch → Email recipients: sends messages (evidence: `Insurance_360_v2/pages/_email_helpers.py`)
- Snowflake Queries → Snowflake: queries
- Cortex RAG Router → Snowflake: calls Cortex (evidence: `Insurance_360_v2/utils/rag_agent.py`)
- Legacy Customer 360 → Legacy Data Queries: loads records (evidence: `CSV files/pages/1_Customer_360.py`)
- Legacy Segment Analytics → Legacy Data Queries: loads cohorts (evidence: `CSV files/pages/3_Segment_Analytics.py`)
- Legacy Transcript Explorer → Legacy RAG Router: searches transcripts (evidence: `CSV files/pages/4_Transcript_Explorer.py`)
- Legacy Ask Your Data → Legacy RAG Router: routes questions (evidence: `CSV files/pages/5_Ask_Your_Data.py`)
- Legacy Customer 360 → Shared Theme: applies styling (evidence: `CSV files/pages/1_Customer_360.py`)
- Legacy Data Queries → Snowflake: queries (evidence: `CSV files/utils/data_loader.py`)
- Legacy RAG Router → Snowflake: calls Cortex (evidence: `CSV files/utils/rag_agent.py`)
