# soumyakoley1975/sih26 architecture

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

- Interactive diagram: https://gitdiagram.com/soumyakoley1975/sih26
- Repository: https://github.com/soumyakoley1975/sih26

## Overview

The Landslide Intelligence Engine exposes a FastAPI backend for location-based susceptibility, environmental triggers, combined hazard scoring, and data-source status; the README also describes a React/MapLibre GIS dashboard. The main scoring path is hazard assessment calling susceptibility and trigger calculations. Trigger data comes from Open-Meteo when available, with demo fallback; ground movement and detection inputs are mocked. The tree does not show frontend source, so the dashboard is represented by its listed `surakshasetu` entry; its implementation and detailed API wiring are not inspectable here.

Main entry points: [`backend/app/main.py`](https://github.com/soumyakoley1975/sih26/blob/landslide/backend/app/main.py) (FastAPI app), [`backend/app/api/routes/hazard.py`](https://github.com/soumyakoley1975/sih26/blob/landslide/backend/app/api/routes/hazard.py) (Hazard scoring), [`backend/app/api/routes/trigger.py`](https://github.com/soumyakoley1975/sih26/blob/landslide/backend/app/api/routes/trigger.py) (Trigger scoring), [`surakshasetu`](https://github.com/soumyakoley1975/sih26/tree/landslide/surakshasetu) (GIS dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API runtime"]
  node_app["FastAPI app<br/>[main.py]"]
  node_status["Data status<br/>[data_status.py]"]
end

subgraph group_assessment["Risk assessment"]
  node_susceptibility["Susceptibility<br/>[susceptibility.py]"]
  node_trigger["Trigger scoring<br/>[trigger.py]"]
  node_hazard["Hazard scoring<br/>[hazard.py]"]
end

subgraph group_presentation["GIS presentation"]
  node_dashboard["GIS dashboard"]
end

subgraph group_integrations["External data"]
  node_meteo["Open-Meteo"]
end

node_user(("Map user"))

node_user -->|"uses"| node_dashboard
node_dashboard -->|"requests API"| node_app
node_app -->|"dispatches"| node_susceptibility
node_app -->|"dispatches"| node_trigger
node_app -->|"dispatches"| node_hazard
node_app -->|"dispatches"| node_status
node_hazard -->|"calls"| node_susceptibility
node_hazard -->|"calls"| node_trigger
node_trigger -->|"fetches weather"| node_meteo

click node_dashboard "https://github.com/soumyakoley1975/sih26/tree/landslide/surakshasetu"
click node_app "https://github.com/soumyakoley1975/sih26/blob/landslide/backend/app/main.py"
click node_susceptibility "https://github.com/soumyakoley1975/sih26/blob/landslide/backend/app/api/routes/susceptibility.py"
click node_trigger "https://github.com/soumyakoley1975/sih26/blob/landslide/backend/app/api/routes/trigger.py"
click node_hazard "https://github.com/soumyakoley1975/sih26/blob/landslide/backend/app/api/routes/hazard.py"
click node_status "https://github.com/soumyakoley1975/sih26/blob/landslide/backend/app/api/routes/data_status.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_app,node_status,node_user toneBlue
class node_susceptibility,node_trigger,node_hazard toneAmber
class node_dashboard toneMint
class node_meteo toneRose
```

## Components

### API runtime

- [FastAPI app](https://github.com/soumyakoley1975/sih26/blob/landslide/backend/app/main.py): `backend/app/main.py`
- [Data status](https://github.com/soumyakoley1975/sih26/blob/landslide/backend/app/api/routes/data_status.py): `backend/app/api/routes/data_status.py`

### Risk assessment

- [Susceptibility](https://github.com/soumyakoley1975/sih26/blob/landslide/backend/app/api/routes/susceptibility.py): `backend/app/api/routes/susceptibility.py`
- [Trigger scoring](https://github.com/soumyakoley1975/sih26/blob/landslide/backend/app/api/routes/trigger.py): `backend/app/api/routes/trigger.py`
- [Hazard scoring](https://github.com/soumyakoley1975/sih26/blob/landslide/backend/app/api/routes/hazard.py): `backend/app/api/routes/hazard.py`

### GIS presentation

- [GIS dashboard](https://github.com/soumyakoley1975/sih26/tree/landslide/surakshasetu): `surakshasetu`

### External data

- **Open-Meteo**

### Other components

- **Map user**

## Connections

- Map user → GIS dashboard: uses
- GIS dashboard → FastAPI app: requests API
- FastAPI app → Susceptibility: dispatches
- FastAPI app → Trigger scoring: dispatches
- FastAPI app → Hazard scoring: dispatches
- FastAPI app → Data status: dispatches
- Hazard scoring → Susceptibility: calls
- Hazard scoring → Trigger scoring: calls
- Trigger scoring → Open-Meteo: fetches weather
