# rishav822/farm_vista architecture

> Architecture diagram of the GitHub repository rishav822/farm_vista, 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/rishav822/farm_vista
- Repository: https://github.com/rishav822/farm_vista

## Overview

FarmVista is documented as a farmer-facing agricultural decision-support product, with crop recommendations, soil classification, demand and market analysis, and disease diagnosis. The visible repository tree, however, contains no Flutter source or the documented `mad ml` backend directory; the only indexed application source is `MLM.py`, a FastAPI/ML script. The graph therefore centers on its evidenced API and analysis logic. Other README capabilities are retained as documented, unlocated components; their implementation and runtime connections cannot be verified here.

Main entry points: [`MLM.py`](https://github.com/rishav822/farm_vista/blob/main/MLM.py) (FastAPI endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Prediction API"]
  node_api["FastAPI endpoints<br/>[MLM.py]"]
end

subgraph group_analysis["Agricultural Analysis"]
  node_district["District conditions<br/>[MLM.py]"]
  node_crop["Crop suitability<br/>[MLM.py]"]
  node_forecast["Demand forecasting<br/>[MLM.py]"]
  node_soil["Soil classification<br/>[MLM.py]"]
  node_market["Market recommendations<br/>[MLM.py]"]
end

subgraph group_documented["Documented Capabilities"]
  node_flutter["Flutter client"]
  node_disease["Disease diagnosis"]
  node_language["Language and voice"]
  node_firebase[("Firebase services")]
end

node_farmer(("Farmer"))

node_farmer -->|"submits analysis"| node_api
node_api -->|"gets conditions"| node_district
node_api -->|"predicts crops"| node_crop
node_api -->|"classifies soil"| node_soil
node_flutter -.->|"uses backend"| node_api
node_flutter -.->|"uses services"| node_firebase

click node_api "https://github.com/rishav822/farm_vista/blob/main/MLM.py"
click node_district "https://github.com/rishav822/farm_vista/blob/main/MLM.py"
click node_crop "https://github.com/rishav822/farm_vista/blob/main/MLM.py"
click node_forecast "https://github.com/rishav822/farm_vista/blob/main/MLM.py"
click node_soil "https://github.com/rishav822/farm_vista/blob/main/MLM.py"
click node_market "https://github.com/rishav822/farm_vista/blob/main/MLM.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_api toneBlue
class node_district,node_crop,node_forecast,node_soil,node_market toneAmber
class node_flutter,node_disease,node_language,node_firebase toneMint
class node_farmer toneIndigo
```

## Components

### Prediction API

- [FastAPI endpoints](https://github.com/rishav822/farm_vista/blob/main/MLM.py): `MLM.py`

### Agricultural Analysis

- [District conditions](https://github.com/rishav822/farm_vista/blob/main/MLM.py): `MLM.py`
- [Crop suitability](https://github.com/rishav822/farm_vista/blob/main/MLM.py): `MLM.py`
- [Demand forecasting](https://github.com/rishav822/farm_vista/blob/main/MLM.py): `MLM.py`
- [Soil classification](https://github.com/rishav822/farm_vista/blob/main/MLM.py): `MLM.py`
- [Market recommendations](https://github.com/rishav822/farm_vista/blob/main/MLM.py): `MLM.py`

### Documented Capabilities

- **Flutter client**
- **Disease diagnosis**
- **Language and voice**
- **Firebase services**

### Other components

- **Farmer**

## Connections

- Farmer → FastAPI endpoints: submits analysis (evidence: `MLM.py`)
- FastAPI endpoints → District conditions: gets conditions (evidence: `MLM.py`)
- FastAPI endpoints → Crop suitability: predicts crops (evidence: `MLM.py`)
- FastAPI endpoints → Soil classification: classifies soil (evidence: `MLM.py`)
- Flutter client → FastAPI endpoints: uses backend (evidence: `README.md`)
- Flutter client → Firebase services: uses services (evidence: `README.md`)
