# akashkobal/arecanut-diseases-detection architecture

> Architecture diagram of the GitHub repository akashkobal/arecanut-diseases-detection, 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/akashkobal/arecanut-diseases-detection
- Repository: https://github.com/akashkobal/arecanut-diseases-detection

## Overview

The repository presents an arecanut disease-detection web app: a farmer selects an image, the frontend posts it to a prediction API, and the UI displays a label, confidence, and treatment guidance. The API and model artifact are present, but their invocation relationship is not visible in the supplied source excerpts, so that link is marked unverified. The README also describes CNN-based detection and actionable remedies; the report page is a separate frontend feature. Other publication-site pages appear unrelated to the documented product.

Main entry points: [`frontend/src/Components/Report.js`](https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/Components/Report.js) (Report page), [`frontend/src/App.js`](https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/App.js) (Route application), [`api/main.py`](https://github.com/akashkobal/arecanut-diseases-detection/blob/main/api/main.py) (Prediction API), [`frontend/src/home.js`](https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/home.js) (Image upload)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Route application<br/>[App.js]"]
  node_upload["Image upload<br/>[home.js]"]
  node_result["Prediction display<br/>[home.js]"]
  node_navbar["Navigation bar<br/>[Navbar.js]"]
  node_footer["Footer<br/>[Footer.js]"]
  node_entry["Browser entry<br/>[index.js]"]
end

subgraph group_inference["Inference"]
  node_api["Prediction API<br/>[main.py]"]
  node_cnn["CNN model<br/>[saved_model.pb]"]
end

subgraph group_report["Project report"]
  node_reportpage["Report page<br/>[Report.js]"]
  node_html["HTML renderer<br/>[HtmlRenderer.js]"]
end

node_farmer(("Farmer"))

node_farmer -->|"selects image"| node_upload
node_entry -->|"renders"| node_app
node_app -->|"routes to"| node_upload
node_app -->|"routes to"| node_reportpage
node_upload -->|"posts image"| node_api
node_api -.->|"uses model"| node_cnn
node_api -.->|"returns prediction"| node_result
node_reportpage -->|"renders content"| node_html
node_reportpage -->|"renders"| node_navbar
node_reportpage -->|"renders"| node_footer

click node_app "https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/App.js"
click node_upload "https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/home.js"
click node_result "https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/home.js"
click node_api "https://github.com/akashkobal/arecanut-diseases-detection/blob/main/api/main.py"
click node_cnn "https://github.com/akashkobal/arecanut-diseases-detection/blob/main/models/1/saved_model.pb"
click node_reportpage "https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/Components/Report.js"
click node_html "https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/Components/HtmlRenderer.js"
click node_navbar "https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/Components/Navbar.js"
click node_footer "https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/Components/Footer.js"
click node_entry "https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/index.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_upload,node_result,node_navbar,node_footer,node_entry toneBlue
class node_api,node_cnn toneAmber
class node_reportpage,node_html toneMint
class node_farmer toneIndigo
```

## Components

### Web client

- [Route application](https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/App.js): `frontend/src/App.js`
- [Image upload](https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/home.js): `frontend/src/home.js`
- [Prediction display](https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/home.js): `frontend/src/home.js`
- [Navigation bar](https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/Components/Navbar.js): `frontend/src/Components/Navbar.js`
- [Footer](https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/Components/Footer.js): `frontend/src/Components/Footer.js`
- [Browser entry](https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/index.js): `frontend/src/index.js`

### Inference

- [Prediction API](https://github.com/akashkobal/arecanut-diseases-detection/blob/main/api/main.py): `api/main.py`
- [CNN model](https://github.com/akashkobal/arecanut-diseases-detection/blob/main/models/1/saved_model.pb): `models/1/saved_model.pb`

### Project report

- [Report page](https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/Components/Report.js): `frontend/src/Components/Report.js`
- [HTML renderer](https://github.com/akashkobal/arecanut-diseases-detection/blob/main/frontend/src/Components/HtmlRenderer.js): `frontend/src/Components/HtmlRenderer.js`

### Other components

- **Farmer**

## Connections

- Farmer → Image upload: selects image (evidence: `frontend/src/home.js`)
- Browser entry → Route application: renders (evidence: `frontend/src/index.js`)
- Route application → Image upload: routes to (evidence: `frontend/src/App.js`)
- Route application → Report page: routes to (evidence: `frontend/src/App.js`)
- Image upload → Prediction API: posts image (evidence: `frontend/src/home.js`)
- Prediction API → CNN model: uses model
- Prediction API → Prediction display: returns prediction
- Report page → HTML renderer: renders content (evidence: `frontend/src/Components/Report.js`)
- Report page → Navigation bar: renders (evidence: `frontend/src/Components/Report.js`)
- Report page → Footer: renders (evidence: `frontend/src/Components/Report.js`)
