# yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon architecture

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

- Interactive diagram: https://gitdiagram.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon
- Repository: https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon

## Overview

This repository is a financial risk intelligence prototype: news and market headlines are ingested, converted into classified and geolocated signals, optionally used to stress a wholesale portfolio, and presented through Streamlit and a React globe dashboard. The README documents several live feed connectors and FinBERT; the sampled risk-engine excerpt shows feed connectors, taxonomy, sentiment and geolocation behavior, but not every implementation detail. The JSON-to-API-to-React path is visible in the API and hook excerpts; the README also describes automated signal-triggered stress testing.

Main entry points: [`risk_engine.py`](https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/risk_engine.py) (Signal generation), [`app.py`](https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/app.py) (Analytical dashboard), [`stress_tester.py`](https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/stress_tester.py) (Stress simulation), [`frontend/src/App.tsx`](https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/frontend/src/App.tsx) (React dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_signals["Signal generation"]
  node_ingestion["Feed connectors<br/>[risk_engine.py]"]
  node_nlp["Risk NLP<br/>[risk_engine.py]"]
  node_geolocation["Geo intelligence<br/>[risk_engine.py]"]
  node_signal_runner["Signal generation<br/>[risk_engine.py]"]
end

subgraph group_stress["Portfolio stress"]
  node_portfolio["Wholesale portfolio<br/>[stress_tester.py]"]
  node_simulation["Stress simulation<br/>[stress_tester.py]"]
end

subgraph group_service["Signal service"]
  node_signal_file["Signal JSON"]
  node_api["Signals API<br/>[api_server.py]"]
end

subgraph group_ui["Risk interfaces"]
  node_poller["Signal poller<br/>[useRiskSignals.ts]"]
  node_dashboard["React dashboard<br/>[App.tsx]"]
  node_globe["3D risk globe<br/>[RiskGlobe.tsx]"]
  node_streamlit["Analytical dashboard<br/>[app.py]"]
end

node_analyst(("Risk analyst"))
node_wire_sources(("News and market wires"))

node_wire_sources -->|"provides headlines"| node_ingestion
node_ingestion -->|"supplies feed"| node_signal_runner
node_signal_runner -->|"classifies signals"| node_nlp
node_signal_runner -->|"geocodes events"| node_geolocation
node_signal_runner -.->|"writes signals"| node_signal_file
node_api -->|"reads signals"| node_signal_file
node_poller -->|"polls signals"| node_api
node_dashboard -->|"uses signal hook"| node_poller
node_dashboard -->|"renders globe"| node_globe
node_analyst -->|"selects feed"| node_streamlit
node_streamlit -->|"fetches headlines"| node_ingestion
node_streamlit -.->|"processes headline"| node_nlp
node_streamlit -->|"loads exposures"| node_portfolio
node_streamlit -->|"triggers stress test"| node_simulation
node_portfolio -->|"provides assets"| node_simulation
node_signal_runner -.->|"triggers on severity"| node_simulation

click node_ingestion "https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/risk_engine.py"
click node_nlp "https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/risk_engine.py"
click node_geolocation "https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/risk_engine.py"
click node_signal_runner "https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/risk_engine.py"
click node_signal_file "https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/risk_signals_output.json"
click node_api "https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/api_server.py"
click node_poller "https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/frontend/src/useRiskSignals.ts"
click node_dashboard "https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/frontend/src/App.tsx"
click node_globe "https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/frontend/src/RiskGlobe.tsx"
click node_streamlit "https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/app.py"
click node_portfolio "https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/stress_tester.py"
click node_simulation "https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/stress_tester.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_ingestion,node_nlp,node_geolocation,node_signal_runner toneBlue
class node_portfolio,node_simulation toneAmber
class node_signal_file,node_api toneMint
class node_poller,node_dashboard,node_globe,node_streamlit toneRose
class node_analyst,node_wire_sources toneIndigo
```

## Components

### Signal generation

- [Feed connectors](https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/risk_engine.py): `risk_engine.py`
- [Risk NLP](https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/risk_engine.py): `risk_engine.py`
- [Geo intelligence](https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/risk_engine.py): `risk_engine.py`
- [Signal generation](https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/risk_engine.py): `risk_engine.py`

### Portfolio stress

- [Wholesale portfolio](https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/stress_tester.py): `stress_tester.py`
- [Stress simulation](https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/stress_tester.py): `stress_tester.py`

### Signal service

- [Signal JSON](https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/risk_signals_output.json): `risk_signals_output.json`
- [Signals API](https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/api_server.py): `api_server.py`

### Risk interfaces

- [Signal poller](https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/frontend/src/useRiskSignals.ts): `frontend/src/useRiskSignals.ts`
- [React dashboard](https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [3D risk globe](https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/frontend/src/RiskGlobe.tsx): `frontend/src/RiskGlobe.tsx`
- [Analytical dashboard](https://github.com/yashveer-dev/vellore_institute_of_technology-yashveer_shukla-hackathon/blob/main/app.py): `app.py`

### Other components

- **Risk analyst**
- **News and market wires**

## Connections

- News and market wires → Feed connectors: provides headlines (evidence: `README.md`)
- Feed connectors → Signal generation: supplies feed (evidence: `risk_engine.py`)
- Signal generation → Risk NLP: classifies signals (evidence: `risk_engine.py`)
- Signal generation → Geo intelligence: geocodes events (evidence: `risk_engine.py`)
- Signal generation → Signal JSON: writes signals (evidence: `README.md`)
- Signals API → Signal JSON: reads signals (evidence: `api_server.py`)
- Signal poller → Signals API: polls signals (evidence: `frontend/src/useRiskSignals.ts`)
- React dashboard → Signal poller: uses signal hook (evidence: `frontend/src/App.tsx`)
- React dashboard → 3D risk globe: renders globe (evidence: `frontend/src/App.tsx`)
- Risk analyst → Analytical dashboard: selects feed (evidence: `app.py`)
- Analytical dashboard → Feed connectors: fetches headlines (evidence: `app.py`)
- Analytical dashboard → Risk NLP: processes headline (evidence: `README.md`)
- Analytical dashboard → Wholesale portfolio: loads exposures (evidence: `app.py`)
- Analytical dashboard → Stress simulation: triggers stress test (evidence: `app.py`)
- Wholesale portfolio → Stress simulation: provides assets (evidence: `stress_tester.py`)
- Signal generation → Stress simulation: triggers on severity (evidence: `README.md`)
