# atharva-029/kisan-mitra architecture

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

- Interactive diagram: https://gitdiagram.com/atharva-029/kisan-mitra
- Repository: https://github.com/atharva-029/kisan-mitra

## Overview

Kisan Mitra is a farmer-facing agricultural information dashboard. Farmers select a region and explore weather, market prices, crop guidance, schemes, soil, and irrigation information; an optional chatbot can answer queries. The sampled application logic is concentrated in one large controller, so its documented capabilities are represented as distinct responsibilities sharing that source path. The location dataset and 3D weather renderer are separate modules. Their wiring to the controller is not visible in the excerpts, so those links are marked unverified; the Gemini request is visible in app.js.

Main entry points: [`public/app.js`](https://github.com/atharva-029/kisan-mitra/blob/main/public/app.js) (Dashboard Controller), [`public/indian_locations.js`](https://github.com/atharva-029/kisan-mitra/blob/main/public/indian_locations.js) (Location Dataset), [`public/weather3d.js`](https://github.com/atharva-029/kisan-mitra/blob/main/public/weather3d.js) (3D Weather View)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_app["Dashboard Controller<br/>[app.js]"]
  node_regional["Regional Weather<br/>[app.js]"]
  node_locations[("Location Dataset")]
  node_weather_viz["3D Weather View<br/>[weather3d.js]"]
end

subgraph group_farm_guidance["Farm Guidance"]
  node_crop_guide["Crop Guidance<br/>[app.js]"]
  node_schemes["Government Schemes<br/>[app.js]"]
  node_soil["Soil Information<br/>[app.js]"]
  node_irrigation["Irrigation Guidance<br/>[app.js]"]
end

subgraph group_market_support["Market Support"]
  node_market["Mandi Prices<br/>[app.js]"]
end

subgraph group_assistant["Assistant"]
  node_chatbot["Farming Chatbot<br/>[app.js]"]
end

node_farmer(("Farmer"))
node_gemini{{"Gemini API"}}

node_farmer -->|"uses"| node_app
node_app -->|"presents"| node_regional
node_app -->|"presents"| node_market
node_app -->|"presents"| node_crop_guide
node_app -->|"presents"| node_schemes
node_app -->|"presents"| node_soil
node_app -->|"presents"| node_irrigation
node_app -->|"provides"| node_chatbot
node_chatbot -->|"requests content"| node_gemini
node_app -.->|"uses locations"| node_locations
node_app -.->|"drives visualization"| node_weather_viz

click node_app "https://github.com/atharva-029/kisan-mitra/blob/main/public/app.js"
click node_regional "https://github.com/atharva-029/kisan-mitra/blob/main/public/app.js"
click node_locations "https://github.com/atharva-029/kisan-mitra/blob/main/public/indian_locations.js"
click node_weather_viz "https://github.com/atharva-029/kisan-mitra/blob/main/public/weather3d.js"
click node_market "https://github.com/atharva-029/kisan-mitra/blob/main/public/app.js"
click node_crop_guide "https://github.com/atharva-029/kisan-mitra/blob/main/public/app.js"
click node_schemes "https://github.com/atharva-029/kisan-mitra/blob/main/public/app.js"
click node_soil "https://github.com/atharva-029/kisan-mitra/blob/main/public/app.js"
click node_irrigation "https://github.com/atharva-029/kisan-mitra/blob/main/public/app.js"
click node_chatbot "https://github.com/atharva-029/kisan-mitra/blob/main/public/app.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_regional,node_locations,node_weather_viz toneBlue
class node_crop_guide,node_schemes,node_soil,node_irrigation toneAmber
class node_market,node_gemini toneMint
class node_chatbot toneRose
class node_farmer toneIndigo
```

## Components

### Dashboard

- [Dashboard Controller](https://github.com/atharva-029/kisan-mitra/blob/main/public/app.js): `public/app.js`
- [Regional Weather](https://github.com/atharva-029/kisan-mitra/blob/main/public/app.js): `public/app.js`
- [Location Dataset](https://github.com/atharva-029/kisan-mitra/blob/main/public/indian_locations.js): `public/indian_locations.js`
- [3D Weather View](https://github.com/atharva-029/kisan-mitra/blob/main/public/weather3d.js): `public/weather3d.js`

### Farm Guidance

- [Crop Guidance](https://github.com/atharva-029/kisan-mitra/blob/main/public/app.js): `public/app.js`
- [Government Schemes](https://github.com/atharva-029/kisan-mitra/blob/main/public/app.js): `public/app.js`
- [Soil Information](https://github.com/atharva-029/kisan-mitra/blob/main/public/app.js): `public/app.js`
- [Irrigation Guidance](https://github.com/atharva-029/kisan-mitra/blob/main/public/app.js): `public/app.js`

### Market Support

- [Mandi Prices](https://github.com/atharva-029/kisan-mitra/blob/main/public/app.js): `public/app.js`

### Assistant

- [Farming Chatbot](https://github.com/atharva-029/kisan-mitra/blob/main/public/app.js): `public/app.js`

### Other components

- **Farmer**
- **Gemini API**

## Connections

- Farmer → Dashboard Controller: uses (evidence: `README.md`)
- Dashboard Controller → Regional Weather: presents (evidence: `README.md`)
- Dashboard Controller → Mandi Prices: presents (evidence: `README.md`)
- Dashboard Controller → Crop Guidance: presents (evidence: `README.md`)
- Dashboard Controller → Government Schemes: presents (evidence: `README.md`)
- Dashboard Controller → Soil Information: presents (evidence: `README.md`)
- Dashboard Controller → Irrigation Guidance: presents (evidence: `README.md`)
- Dashboard Controller → Farming Chatbot: provides (evidence: `public/app.js`)
- Farming Chatbot → Gemini API: requests content (evidence: `public/app.js`)
- Dashboard Controller → Location Dataset: uses locations
- Dashboard Controller → 3D Weather View: drives visualization
