# kailash105/agro-aura architecture

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

- Interactive diagram: https://gitdiagram.com/kailash105/agro-aura
- Repository: https://github.com/kailash105/agro-aura

## Overview

##### Main Components
- Frontend: This is where users vibe with the app. It’s powered by the HTML in templates (index.html) and styled with CSS from static/style.css. Don’t forget the static/images that spice up the UI.
- Backend: Run by app.py, this is the heart of the operation where all the magic happens. It handles routing, user requests, and communicates with the brain of the project.
- Machine Learning Model: Our sick ML model (WheatDiseaseDetection.h5) is key – it’s the wizard that analyzes wheat diseases. Also, check out the WheatDiseasePrediction.ipynb – that’s where experimentation and model magic took place.
- Data Source: The Data Source for the Wheat Disease Prediction.rtf file tells you where the dataset came from. It’s the starting point for all our model’s insights.
- CI/CD & Deployment: With all the GitHub actions (.github/workflows/python-package.yml), you know we’re keeping our code super fresh and automated.

##### How They Interact
- Users hit the frontend, send in requests, and then app.py processes these calls.
- The backend communicates with the ML model to get predictions and then serves back results.
- There’s a flow from raw data (Data Source file) to model training (notebook) to a production-ready model (.h5 file).
- GitHub workflows are doing their thing in the back, automating our deployment and ensuring everything’s up-to-date.

##### Architectural Vibes
- This is a full-stack app with a chill separation between frontend and backend.
- The ML component is a separate powerhouse that integrates directly with app.py.
- Modular design: Each folder (static, templates, etc.) has its own role, making the structure as sleek as your playlist.

## Diagram (Mermaid)

```mermaid
flowchart TD
    User["User Browser 😎"]:::user

    subgraph "Frontend Layer"
        FE1["index.html"]:::frontend
        FE2["style.css"]:::frontend
        FE3["Images"]:::frontend
    end

    BE["app.py"]:::backend

    subgraph "Machine Learning Model"
        ML2["WheatDiseasePrediction.ipynb"]:::ml
        ML1["WheatDiseaseDetection.h5"]:::ml
    end

    DS["Wheat Disease Prediction.rtf"]:::data
    CICD["GitHub Workflow (python-package.yml)"]:::cicd

    %% Data Flow Connections with 🔥 flavor
    User -->|"🔥"| FE1
    FE1 -->|"🔥"| BE
    CICD -->|"🔥"| BE
    BE -->|"🔥"| ML1
    DS -->|"🔥"| ML2
    ML2 -->|"🔥"| ML1

    %% Click Events for Frontend
    click FE1 "https://github.com/kailash105/agro-aura/blob/main/templates/index.html"
    click FE2 "https://github.com/kailash105/agro-aura/blob/main/static/style.css"
    click FE3 "https://github.com/kailash105/agro-aura/tree/main/static/images"

    %% Click Event for Backend
    click BE "https://github.com/kailash105/agro-aura/blob/main/app.py"

    %% Click Events for Machine Learning Model
    click ML1 "https://github.com/kailash105/agro-aura/blob/main/WheatDiseaseDetection.h5"
    click ML2 "https://github.com/kailash105/agro-aura/blob/main/WheatDiseasePrediction.ipynb"

    %% Click Event for Data Source
    click DS "https://github.com/kailash105/agro-aura/blob/main/Data Source for the Wheat Disease Prediction.rtf"

    %% Click Event for CI/CD & Deployment
    click CICD "https://github.com/kailash105/agro-aura/blob/main/.github/workflows/python-package.yml"

    %% Style definitions with vibrant Gen Z colors
    classDef user fill:#ffcc00,stroke:#333,stroke-width:2px,color:#000
    classDef frontend fill:#cce5ff,stroke:#333,stroke-width:2px,color:#000
    classDef backend fill:#d4edda,stroke:#333,stroke-width:2px,color:#000
    classDef ml fill:#f8d7da,stroke:#333,stroke-width:2px,color:#000
    classDef data fill:#fff3cd,stroke:#333,stroke-width:2px,color:#000
    classDef cicd fill:#d1c4e9,stroke:#333,stroke-width:2px,color:#000
```
