# piyushverma246/agrowise architecture

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

- Interactive diagram: https://gitdiagram.com/piyushverma246/agrowise
- Repository: https://github.com/piyushverma246/agrowise

## Overview

##### Project type and purpose
- AgroWise is a purely front-end, static HTML/CSS/JavaScript site built on the Agrion HTML5 template.
- It provides an AI‐driven agricultural advisory UI (crop recommendations, pest/disease management, irrigation planning, yield forecasting).
- All “smarts” (ML, data aggregation, predictions) are assumed to live in external microservices or APIs.

##### File structure
- Top‐level HTML: index.html (main entry), chatbot.html/2 (chat interfaces), crop-rec-form.html, robo.html, test.html.
- Asset bundles under “Home One __ Agrion __ Agrion HTML 5 Template_files” and “hello_files”: CSS, JS libraries (jQuery, Isotope, Magnific Popup, etc.), images.
- No server‐side code in repo ⇒ hosting is static (GitHub Pages, S3/CloudFront, etc.), with all application logic off‐loaded to remote services.

##### README insights
- Describes purpose, features, and usage: clone, open index.html.
- Notes only presentation layer (“stylesheets for UI and layout and JavaScript logic and interactivity scripts”) is in repo.
- No local database or backend code – reliance on external data/ML services.

##### Be very detailed
- Optional Analytics & Logging pipelines
- Notes on caching (CDN TTL), authentication (API keys/OAuth), and error-handling flows

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Presentation Layer
    subgraph "Presentation Layer (Client-Side UI)"
        direction TB
        Browser["🖥️ User's Browser"]:::frontend
        index["index.html"]:::frontend
        chatbot1["chatbot.html"]:::frontend
        chatbot2["chatbot2.html"]:::frontend
        cropform["crop-rec-form.html"]:::frontend
        robo["robo.html"]:::frontend
        test["test.html"]:::frontend
    end

    %% Static Asset Host
    subgraph "Static Asset Host (CDN/Web Server)"
        direction TB
        CDN["☁️ CDN / Web Server"]:::infra
        subgraph "CSS Bundles"
            direction TB
            agrion_css["agrion.css"]:::infra
            agrion_resp["agrion-responsive.css"]:::infra
            custom_anim["custom-animate.css"]:::infra
            style_css["style.css"]:::infra
            sheet_css["stylesheet.css"]:::infra
            timepicker_css["timePicker.css"]:::infra
            jarallax_css["jarallax.css"]:::infra
            jquery_ui_css["jquery-ui.css"]:::infra
            bxslider_css["jquery.bxslider.css"]:::infra
            magni_css["jquery.magnific-popup.css"]:::infra
            nouislider_css["nouislider.pips.css"]:::infra
        end
        subgraph "JS Libraries"
            direction TB
            agrion_js["agrion.js"]:::infra
            isotope_js["isotope.js"]:::infra
            jquery_ui_js["jquery-ui.js"]:::infra
            circletype_js["jquery.circleType.js"]:::infra
            timepicker_js["timePicker.js"]:::infra
            wow_js["wow.js"]:::infra
        end
    end

    %% AI/ML Microservices
    subgraph "AI/ML Microservices"
        direction TB
        CropRec["⚙️ Crop Recommendation Service"]:::service
        PestDetect["⚙️ Pest & Disease Detection Service"]:::service
        Irrigation["⚙️ Irrigation Scheduler Service"]:::service
        Forecast["⚙️ Yield Forecasting Service"]:::service
    end

    %% External Data Providers
    subgraph "External Data Providers"
        direction TB
        WeatherAPI["🌤️ Weather API"]:::data
        SoilDB["🗄️ Soil Database"]:::data
        MarketAPI["📈 Market Trends API"]:::data
    end

    %% Analytics & Logging
    Analytics["📊 Analytics & Logging Service"]:::infra

    %% Documentation
    subgraph "Documentation"
        direction TB
        README["README.md"]:::infra
        PromptDoc["🌾 Prompt for Crop Recommendation System.docx"]:::infra
    end

    %% Connections
    Browser -->|"HTTPS GET HTML/CSS/JS\n(CDN TTL cache)"| CDN
    CDN -->|serves files| index
    CDN -->|serves files| chatbot1
    CDN -->|serves files| chatbot2
    CDN -->|serves files| cropform
    CDN -->|serves files| robo
    CDN -->|serves files| test

    Browser -->|"AJAX HTTPS/JSON"| CropRec
    Browser -->|"AJAX HTTPS/JSON"| PestDetect
    Browser -->|"AJAX HTTPS/JSON"| Irrigation
    Browser -->|"AJAX HTTPS/JSON"| Forecast

    CropRec -->|"REST HTTPS/JSON"| WeatherAPI
    CropRec -->|"REST HTTPS/JSON"| SoilDB
    CropRec -->|"REST HTTPS/JSON"| MarketAPI

    PestDetect -->|"REST HTTPS/JSON"| WeatherAPI
    PestDetect -->|"REST HTTPS/JSON"| SoilDB

    Irrigation -->|"REST HTTPS/JSON"| WeatherAPI
    Irrigation -->|"REST HTTPS/JSON"| SoilDB

    Forecast -->|"REST HTTPS/JSON"| WeatherAPI
    Forecast -->|"REST HTTPS/JSON"| MarketAPI

    CropRec -->|"JSON response"| Browser
    PestDetect -->|"JSON response"| Browser
    Irrigation -->|"JSON response"| Browser
    Forecast -->|"JSON response"| Browser

    Browser -->|"usage/events"| Analytics
    CropRec -->|"logs/events"| Analytics
    PestDetect -->|"logs/events"| Analytics
    Irrigation -->|"logs/events"| Analytics
    Forecast -->|"logs/events"| Analytics

    %% Click Events for Presentation
    click index "https://github.com/piyushverma246/agrowise/blob/main/index.html"
    click chatbot1 "https://github.com/piyushverma246/agrowise/blob/main/chatbot.html"
    click chatbot2 "https://github.com/piyushverma246/agrowise/blob/main/chatbot2.html"
    click cropform "https://github.com/piyushverma246/agrowise/blob/main/crop-rec-form.html"
    click robo "https://github.com/piyushverma246/agrowise/blob/main/robo.html"
    click test "https://github.com/piyushverma246/agrowise/blob/main/test.html"

    %% Click Events for CSS Bundles
    click agrion_css "https://github.com/piyushverma246/agrowise/blob/main/Home One __ Agrion __ Agrion HTML 5 Template_files/agrion.css"
    click agrion_resp "https://github.com/piyushverma246/agrowise/blob/main/Home One __ Agrion __ Agrion HTML 5 Template_files/agrion-responsive.css"
    click custom_anim "https://github.com/piyushverma246/agrowise/blob/main/Home One __ Agrion __ Agrion HTML 5 Template_files/custom-animate.css"
    click style_css "https://github.com/piyushverma246/agrowise/blob/main/Home One __ Agrion __ Agrion HTML 5 Template_files/style.css"
    click sheet_css "https://github.com/piyushverma246/agrowise/blob/main/Home One __ Agrion __ Agrion HTML 5 Template_files/stylesheet.css"
    click timepicker_css "https://github.com/piyushverma246/agrowise/blob/main/Home One __ Agrion __ Agrion HTML 5 Template_files/timePicker.css"
    click jarallax_css "https://github.com/piyushverma246/agrowise/blob/main/Home One __ Agrion __ Agrion HTML 5 Template_files/jarallax.css"
    click jquery_ui_css "https://github.com/piyushverma246/agrowise/blob/main/Home One __ Agrion __ Agrion HTML 5 Template_files/jquery-ui.css"
    click bxslider_css "https://github.com/piyushverma246/agrowise/blob/main/Home One __ Agrion __ Agrion HTML 5 Template_files/jquery.bxslider.css"
    click magni_css "https://github.com/piyushverma246/agrowise/blob/main/Home One __ Agrion __ Agrion HTML 5 Template_files/jquery.magnific-popup.css"
    click nouislider_css "https://github.com/piyushverma246/agrowise/blob/main/Home One __ Agrion __ Agrion HTML 5 Template_files/nouislider.pips.css"

    %% Click Events for JS Libraries
    click agrion_js "https://github.com/piyushverma246/agrowise/blob/main/Home One __ Agrion __ Agrion HTML 5 Template_files/agrion.js.download"
    click isotope_js "https://github.com/piyushverma246/agrowise/blob/main/Home One __ Agrion __ Agrion HTML 5 Template_files/isotope.js.download"
    click jquery_ui_js "https://github.com/piyushverma246/agrowise/blob/main/Home One __ Agrion __ Agrion HTML 5 Template_files/jquery-ui.js.download"
    click circletype_js "https://github.com/piyushverma246/agrowise/blob/main/Home One __ Agrion __ Agrion HTML 5 Template_files/jquery.circleType.js.download"
    click timepicker_js "https://github.com/piyushverma246/agrowise/blob/main/Home One __ Agrion __ Agrion HTML 5 Template_files/timePicker.js.download"
    click wow_js "https://github.com/piyushverma246/agrowise/blob/main/Home One __ Agrion __ Agrion HTML 5 Template_files/wow.js.download"

    %% Click Events for Documentation
    click README "https://github.com/piyushverma246/agrowise/blob/main/README.md"
    click PromptDoc "https://github.com/piyushverma246/agrowise/blob/main/🌾 Prompt for Crop Recommendation System.docx"

    %% Styles
    classDef frontend fill:#DEF0FF,stroke:#1E70BF,color:#1E70BF,stroke-width:2px;
    classDef service fill:#DFFFE0,stroke:#3E7B2A,color:#3E7B2A,stroke-width:2px;
    classDef data fill:#FFF4DE,stroke:#BF7A1E,color:#BF7A1E,stroke-width:2px;
    classDef infra fill:#E8E8E8,stroke:#666666,color:#666666,stroke-width:2px;
```
