# sakethlingerker/minor-project architecture

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

- Interactive diagram: https://gitdiagram.com/sakethlingerker/minor-project
- Repository: https://github.com/sakethlingerker/minor-project

## Overview

This is a small Flask crop-prediction app. A user submits seven soil and environmental values; the Flask handler builds a feature array, asks the loaded model for a prediction, maps its class to a crop name, and renders a result page. The README describes yield forecasting, but the shown runtime predicts a crop class. The notebook and CSV are present, but their roles and connections were not inspected; the shown source also does not establish that the HTML files are available in Flask’s expected templates directory.

Main entry points: [`app.py`](https://github.com/sakethlingerker/minor-project/blob/main/app.py) (Flask app), [`index.html`](https://github.com/sakethlingerker/minor-project/blob/main/index.html) (Input page), [`result.html`](https://github.com/sakethlingerker/minor-project/blob/main/result.html) (Result page), [`model.pkl`](https://github.com/sakethlingerker/minor-project/blob/main/model.pkl) (Crop classifier)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interaction"]
  node_app["Flask app<br/>[app.py]"]
  node_input_page["Input page<br/>[index.html]"]
  node_result_page["Result page<br/>[result.html]"]
end

subgraph group_inference["Crop inference"]
  node_classifier["Crop classifier<br/>[model.pkl]"]
end

subgraph group_assets["Model and data assets"]
  node_training_notebook["Forecasting notebook"]
  node_crop_data["Crop dataset"]
end

node_farmer(("User"))

node_farmer -->|"submits inputs"| node_app
node_app -->|"renders page"| node_input_page
node_app -->|"predicts class"| node_classifier
node_app -->|"renders result"| node_result_page

click node_app "https://github.com/sakethlingerker/minor-project/blob/main/app.py"
click node_input_page "https://github.com/sakethlingerker/minor-project/blob/main/index.html"
click node_result_page "https://github.com/sakethlingerker/minor-project/blob/main/result.html"
click node_classifier "https://github.com/sakethlingerker/minor-project/blob/main/model.pkl"
click node_training_notebook "https://github.com/sakethlingerker/minor-project/blob/main/AI-Powered%20Forecasting.ipynb"
click node_crop_data "https://github.com/sakethlingerker/minor-project/blob/main/Crop_recommendation.csv"

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_input_page,node_result_page,node_farmer toneBlue
class node_classifier toneAmber
class node_training_notebook,node_crop_data toneMint
```

## Components

### Web interaction

- [Flask app](https://github.com/sakethlingerker/minor-project/blob/main/app.py): `app.py`
- [Input page](https://github.com/sakethlingerker/minor-project/blob/main/index.html): `index.html`
- [Result page](https://github.com/sakethlingerker/minor-project/blob/main/result.html): `result.html`

### Crop inference

- [Crop classifier](https://github.com/sakethlingerker/minor-project/blob/main/model.pkl): `model.pkl`

### Model and data assets

- [Forecasting notebook](https://github.com/sakethlingerker/minor-project/blob/main/AI-Powered%20Forecasting.ipynb): `AI-Powered Forecasting.ipynb`
- [Crop dataset](https://github.com/sakethlingerker/minor-project/blob/main/Crop_recommendation.csv): `Crop_recommendation.csv`

### Other components

- **User**

## Connections

- User → Flask app: submits inputs (evidence: `app.py`)
- Flask app → Input page: renders page (evidence: `app.py`)
- Flask app → Crop classifier: predicts class (evidence: `app.py`)
- Flask app → Result page: renders result (evidence: `app.py`)
