# dharageshcareer/main_challenge_monsoon_assist_ai architecture

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

- Interactive diagram: https://gitdiagram.com/dharageshcareer/main_challenge_monsoon_assist_ai
- Repository: https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai

## Overview

MonsoonMind is a preparedness web app: people select or create a household profile, then use a dashboard for weather-aware advice, route safety, local bulletins, community incident reporting, and a multilingual assistant. The React app coordinates these workflows and calls an Express API; the API uses SQLite and documented external weather, news, geocoding, and Gemini services. The README supplies several capability and integration details not visible in the partial server excerpts, so those documented links cite it.

Main entry points: [`client/src/App.jsx`](https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/client/src/App.jsx) (App coordinator), [`client/src/components/Dashboard.jsx`](https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/client/src/components/Dashboard.jsx) (Preparedness dashboard), [`client/src/components/IncidentReportModal.jsx`](https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/client/src/components/IncidentReportModal.jsx) (Incident map report), [`client/src/components/Chatbot.jsx`](https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/client/src/components/Chatbot.jsx) (WeatherMan chat)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Preparedness app"]
  node_app["App coordinator<br/>[App.jsx]"]
  node_login["Profile sign-in<br/>[Login.jsx]"]
  node_wizard["Onboarding wizard<br/>[Wizard.jsx]"]
  node_dashboard["Preparedness dashboard<br/>[Dashboard.jsx]"]
  node_incident_ui["Incident map report"]
  node_chat_ui["WeatherMan chat<br/>[Chatbot.jsx]"]
end

subgraph group_api["API workflows"]
  node_profiles_api["Profile API<br/>[server.js]"]
  node_advice_api["Preparedness advice<br/>[server.js]"]
  node_route_api["Route safety evaluation<br/>[server.js]"]
  node_news_api["News aggregation<br/>[server.js]"]
  node_chat_api["Chat assistant API<br/>[server.js]"]
  node_incident_api["Incident reporting API<br/>[server.js]"]
end

subgraph group_data["Profile and incident data"]
  node_db[("SQLite profiles and incidents<br/>[database.js]")]
end

subgraph group_integrations["External services"]
  node_weather["Open-Meteo"]
  node_news_feed["Google News RSS"]
  node_geocoder["Nominatim geocoder"]
  node_gemini["Gemini API"]
end

node_person(("Resident"))

node_person -->|"selects profile"| node_login
node_person -->|"enters details"| node_wizard
node_app -->|"renders"| node_login
node_app -->|"renders"| node_wizard
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_incident_ui
node_app -->|"renders"| node_chat_ui
node_app -->|"loads and creates profiles"| node_profiles_api
node_app -->|"requests advice"| node_advice_api
node_app -->|"requests route review"| node_route_api
node_app -->|"sends chat"| node_chat_api
node_app -.->|"broadcasts report"| node_incident_api
node_dashboard -->|"triggers dashboard actions"| node_app
node_incident_ui -->|"submits report"| node_app
node_chat_ui -->|"submits message"| node_app
node_profiles_api -->|"reads and writes"| node_db
node_incident_api -.->|"stores reports"| node_db
node_advice_api -.->|"generates guidance"| node_gemini
node_route_api -.->|"assesses route"| node_gemini
node_chat_api -.->|"generates reply"| node_gemini
node_news_api -.->|"fetches bulletins"| node_news_feed
node_app -.->|"requests live weather"| node_weather
node_app -.->|"resolves GPS location"| node_geocoder

click node_app "https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/client/src/App.jsx"
click node_login "https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/client/src/components/Login.jsx"
click node_wizard "https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/client/src/components/Wizard.jsx"
click node_dashboard "https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/client/src/components/Dashboard.jsx"
click node_incident_ui "https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/client/src/components/IncidentReportModal.jsx"
click node_chat_ui "https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/client/src/components/Chatbot.jsx"
click node_profiles_api "https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/server/server.js"
click node_advice_api "https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/server/server.js"
click node_route_api "https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/server/server.js"
click node_news_api "https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/server/server.js"
click node_chat_api "https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/server/server.js"
click node_incident_api "https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/server/server.js"
click node_db "https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/server/database.js"

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_login,node_wizard,node_dashboard,node_incident_ui,node_chat_ui toneBlue
class node_profiles_api,node_advice_api,node_route_api,node_news_api,node_chat_api,node_incident_api toneAmber
class node_db toneMint
class node_weather,node_news_feed,node_geocoder,node_gemini toneRose
class node_person toneIndigo
```

## Components

### Preparedness app

- [App coordinator](https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Profile sign-in](https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/client/src/components/Login.jsx): `client/src/components/Login.jsx`
- [Onboarding wizard](https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/client/src/components/Wizard.jsx): `client/src/components/Wizard.jsx`
- [Preparedness dashboard](https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/client/src/components/Dashboard.jsx): `client/src/components/Dashboard.jsx`
- [Incident map report](https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/client/src/components/IncidentReportModal.jsx): `client/src/components/IncidentReportModal.jsx`
- [WeatherMan chat](https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/client/src/components/Chatbot.jsx): `client/src/components/Chatbot.jsx`

### API workflows

- [Profile API](https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/server/server.js): `server/server.js`
- [Preparedness advice](https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/server/server.js): `server/server.js`
- [Route safety evaluation](https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/server/server.js): `server/server.js`
- [News aggregation](https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/server/server.js): `server/server.js`
- [Chat assistant API](https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/server/server.js): `server/server.js`
- [Incident reporting API](https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/server/server.js): `server/server.js`

### Profile and incident data

- [SQLite profiles and incidents](https://github.com/dharageshcareer/main_challenge_monsoon_assist_ai/blob/main/server/database.js): `server/database.js`

### External services

- **Open-Meteo**
- **Google News RSS**
- **Nominatim geocoder**
- **Gemini API**

### Other components

- **Resident**

## Connections

- Resident → Profile sign-in: selects profile (evidence: `client/src/components/Login.jsx`)
- Resident → Onboarding wizard: enters details (evidence: `client/src/components/Wizard.jsx`)
- App coordinator → Profile sign-in: renders (evidence: `client/src/App.jsx`)
- App coordinator → Onboarding wizard: renders (evidence: `client/src/App.jsx`)
- App coordinator → Preparedness dashboard: renders (evidence: `client/src/App.jsx`)
- App coordinator → Incident map report: renders (evidence: `client/src/App.jsx`)
- App coordinator → WeatherMan chat: renders (evidence: `client/src/App.jsx`)
- App coordinator → Profile API: loads and creates profiles (evidence: `client/src/App.jsx`)
- App coordinator → Preparedness advice: requests advice (evidence: `client/src/App.jsx`)
- App coordinator → Route safety evaluation: requests route review (evidence: `client/src/App.jsx`)
- App coordinator → Chat assistant API: sends chat (evidence: `client/src/App.jsx`)
- App coordinator → Incident reporting API: broadcasts report
- Preparedness dashboard → App coordinator: triggers dashboard actions (evidence: `client/src/App.jsx`)
- Incident map report → App coordinator: submits report (evidence: `client/src/App.jsx`)
- WeatherMan chat → App coordinator: submits message (evidence: `client/src/App.jsx`)
- Profile API → SQLite profiles and incidents: reads and writes (evidence: `server/server.js`)
- Incident reporting API → SQLite profiles and incidents: stores reports (evidence: `server/server.js`)
- Preparedness advice → Gemini API: generates guidance (evidence: `README.md`)
- Route safety evaluation → Gemini API: assesses route (evidence: `README.md`)
- Chat assistant API → Gemini API: generates reply (evidence: `README.md`)
- News aggregation → Google News RSS: fetches bulletins (evidence: `README.md`)
- App coordinator → Open-Meteo: requests live weather (evidence: `README.md`)
- App coordinator → Nominatim geocoder: resolves GPS location (evidence: `README.md`)
