# rajivarthini/agri-project architecture

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

- Interactive diagram: https://gitdiagram.com/rajivarthini/agri-project
- Repository: https://github.com/rajivarthini/agri-project

## Overview

AgriLearn is a React agricultural-learning frontend. A visitor explores the crop catalog, opens the implemented Coffee course, selects a coffee category, and reaches its category page; the learning-level content is explicitly marked as coming soon. The source also advertises video learning, assessments, progress tracking, and certificates, but these are not implemented as workflows in the sampled pages. The graph reflects the observed routing and local data dependencies; no backend or external service is evidenced.

Main entry points: [`frontend/src/App.jsx`](https://github.com/rajivarthini/agri-project/blob/main/frontend/src/App.jsx) (Route dispatcher), [`frontend/src/pages/CropCatalog.jsx`](https://github.com/rajivarthini/agri-project/blob/main/frontend/src/pages/CropCatalog.jsx) (Crop catalog search), [`frontend/src/pages/CoffeeCourse.jsx`](https://github.com/rajivarthini/agri-project/blob/main/frontend/src/pages/CoffeeCourse.jsx) (Coffee course overview), [`frontend/src/pages/Home.jsx`](https://github.com/rajivarthini/agri-project/blob/main/frontend/src/pages/Home.jsx) (Home and overview)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry and routing"]
  node_bootstrap["App bootstrap<br/>[main.jsx]"]
  node_routes["Route dispatcher<br/>[App.jsx]"]
end

subgraph group_discovery["Course discovery"]
  node_home["Home and overview<br/>[Home.jsx]"]
  node_catalog["Crop catalog search<br/>[CropCatalog.jsx]"]
end

subgraph group_coffee["Coffee learning path"]
  node_coffee_course["Coffee course overview<br/>[CoffeeCourse.jsx]"]
  node_category_course["Category course page<br/>[CategoryCourse.jsx]"]
end

subgraph group_content["Local course data"]
  node_crop_data["Crop catalog data<br/>[crops.js]"]
  node_coffee_data["Coffee category data"]
end

node_visitor(("Learner"))

node_visitor -->|"opens app"| node_bootstrap
node_bootstrap -->|"renders"| node_routes
node_routes -->|"routes /"| node_home
node_routes -->|"routes /crops"| node_catalog
node_routes -->|"routes coffee"| node_coffee_course
node_routes -->|"routes category"| node_category_course
node_home -->|"links to"| node_catalog
node_home -->|"reads crops"| node_crop_data
node_catalog -->|"filters crops"| node_crop_data
node_catalog -->|"links coffee"| node_coffee_course
node_coffee_course -->|"reads categories"| node_coffee_data
node_coffee_course -->|"links category"| node_category_course
node_category_course -->|"finds category"| node_coffee_data

click node_bootstrap "https://github.com/rajivarthini/agri-project/blob/main/frontend/src/main.jsx"
click node_routes "https://github.com/rajivarthini/agri-project/blob/main/frontend/src/App.jsx"
click node_home "https://github.com/rajivarthini/agri-project/blob/main/frontend/src/pages/Home.jsx"
click node_catalog "https://github.com/rajivarthini/agri-project/blob/main/frontend/src/pages/CropCatalog.jsx"
click node_coffee_course "https://github.com/rajivarthini/agri-project/blob/main/frontend/src/pages/CoffeeCourse.jsx"
click node_category_course "https://github.com/rajivarthini/agri-project/blob/main/frontend/src/pages/CategoryCourse.jsx"
click node_crop_data "https://github.com/rajivarthini/agri-project/blob/main/frontend/src/data/crops.js"
click node_coffee_data "https://github.com/rajivarthini/agri-project/blob/main/frontend/src/data/coffeeCategories.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_bootstrap,node_routes toneBlue
class node_home,node_catalog toneAmber
class node_coffee_course,node_category_course toneMint
class node_crop_data,node_coffee_data toneRose
class node_visitor toneIndigo
```

## Components

### App entry and routing

- [App bootstrap](https://github.com/rajivarthini/agri-project/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [Route dispatcher](https://github.com/rajivarthini/agri-project/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`

### Course discovery

- [Home and overview](https://github.com/rajivarthini/agri-project/blob/main/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Crop catalog search](https://github.com/rajivarthini/agri-project/blob/main/frontend/src/pages/CropCatalog.jsx): `frontend/src/pages/CropCatalog.jsx`

### Coffee learning path

- [Coffee course overview](https://github.com/rajivarthini/agri-project/blob/main/frontend/src/pages/CoffeeCourse.jsx): `frontend/src/pages/CoffeeCourse.jsx`
- [Category course page](https://github.com/rajivarthini/agri-project/blob/main/frontend/src/pages/CategoryCourse.jsx): `frontend/src/pages/CategoryCourse.jsx`

### Local course data

- [Crop catalog data](https://github.com/rajivarthini/agri-project/blob/main/frontend/src/data/crops.js): `frontend/src/data/crops.js`
- [Coffee category data](https://github.com/rajivarthini/agri-project/blob/main/frontend/src/data/coffeeCategories.js): `frontend/src/data/coffeeCategories.js`

### Other components

- **Learner**

## Connections

- Learner → App bootstrap: opens app
- App bootstrap → Route dispatcher: renders
- Route dispatcher → Home and overview: routes /
- Route dispatcher → Crop catalog search: routes /crops
- Route dispatcher → Coffee course overview: routes coffee
- Route dispatcher → Category course page: routes category
- Home and overview → Crop catalog search: links to
- Home and overview → Crop catalog data: reads crops
- Crop catalog search → Crop catalog data: filters crops
- Crop catalog search → Coffee course overview: links coffee
- Coffee course overview → Coffee category data: reads categories
- Coffee course overview → Category course page: links category
- Category course page → Coffee category data: finds category
