# ahmed-hazem-1/depi-project--land-type-classification architecture

> Architecture diagram of the GitHub repository ahmed-hazem-1/depi-project--land-type-classification, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ahmed-hazem-1/depi-project--land-type-classification
- Repository: https://github.com/ahmed-hazem-1/depi-project--land-type-classification

## Overview

##### Main Components
- Data & Preprocessing:
- Components representing the initial data intake, cleaning, Exploratory Data Analysis (EDA), and preparation of the EuroSAT dataset.
- Use of Jupyter notebooks (found under the “1st milestone” and “2nd Milestone” directories) for EDA and model evaluation.
- Deep Learning Model (DNN/CNN):
- Training environment where data is fed to a DNN/CNN model. Indicate experimental aspects such as transfer learning and hyperparameter tuning.
- Connection from EDA outputs (cleaned and preprocessed data) into the model training stage.
- Model Deployment & API:
- Deployment component built with Flask/FastAPI (as indicated in the README and the existence of app.py).
- Dashboard & Visualization:
- Integration between the API outputs and the dashboard service.
- CI/CD and Project Management:
- Incorporate a “DevOps” or CI/CD element dictated by the GitHub workflows (under .github/workflows/main_depi-api.yml), which automates deployment and possibly monitoring.
- Optionally, include documentation repositories (Docs, Project Webpage) to illustrate planning, testing, and API documentation coherence.

##### Relationships and Interactions
- Data Flow:
- Start from external data sources (EuroSAT dataset) feeding into the Data Collection/Preprocessing unit.
- That the trained model is then exposed via an API (flask/FastAPI), often triggered by a CI/CD process (GitHub workflows).
- Milestone Components:
- Optionally, include milestone nodes to signify different phases (data preprocessing, analysis, training, deployment) as specified in the README timeline.
- Integration Points:
- How the standalone UI components (index.html within the project) might serve as a basic front end and how the startup.sh script initiates application/services integration.

##### Architectural Patterns & Principles
- Layered/Microservices Pattern:
- Clearly separate concerns: data handling, machine learning, API service, and presentation/dashboard.
- DevOps Integration:
- CI/CD through GitHub Actions that manage deployments and testing.
- Modular Design:
- Use discrete components to reflect different responsibilities (data processing, model training, serving, and visualization).

##### Relevant Technologies and Tools
- Frameworks & Libraries: Python (app.py, requirements.txt), TensorFlow/PyTorch (for DNN training as mentioned in README), Flask/FastAPI for API development.
- Visualization: Power BI for the dashboard.
- Project Management: The numerous planning and documentation files (Docs folder, milestone notebooks) that support the overall architecture.
- Deployment Tools: GitHub workflows, startup.sh for starting the server, and CI/CD integration.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Management Layer
    subgraph "Data Management"
        A["EuroSAT Raw Data"]:::data
        B1["EDA & Preprocessing Notebook 1"]:::data
        B2["EDA & Preprocessing Notebook 2"]:::data
        C["Preprocessed Data"]:::data
    end

    %% AI/ML Layer
    subgraph "AI/ML"
        D["DNN/CNN Model Training"]:::ml
    end

    %% API & Services Layer
    subgraph "API & Services"
        E["Flask API"]:::api
        F["Startup Script"]:::api
    end

    %% UI & Visualization Layer
    subgraph "UI & Visualization"
        G["Power BI Dashboard"]:::ui
        H["Web Frontend"]:::ui
        I["Project Webpage"]:::ui
    end

    %% DevOps Layer
    subgraph "DevOps"
        J["CI/CD Pipeline"]:::devops
        K["Documentation & Project Management"]:::devops
    end

    %% Data Flow Connections
    A --> B1
    A --> B2
    B1 --> C
    B2 --> C
    C --> D
    D --> E
    F --> E
    J --> F
    E -- "data_flow"--> G
    G -- "feedback"--> E
    E --> H

    %% Optional UI Integration
    H --> I

    %% Click Events for Component Mapping
    click B1 "https://github.com/ahmed-hazem-1/depi-project--land-type-classification/blob/main/1st milestone/1st_Milestone.ipynb"
    click B2 "https://github.com/ahmed-hazem-1/depi-project--land-type-classification/blob/main/2nd Milestone/2nd_Milestone.ipynb"
    click E "https://github.com/ahmed-hazem-1/depi-project--land-type-classification/blob/main/app.py"
    click F "https://github.com/ahmed-hazem-1/depi-project--land-type-classification/blob/main/startup.sh"
    click H "https://github.com/ahmed-hazem-1/depi-project--land-type-classification/blob/main/index.html"
    click I "https://github.com/ahmed-hazem-1/depi-project--land-type-classification/blob/main/Project Webpage/readme.html"
    click J "https://github.com/ahmed-hazem-1/depi-project--land-type-classification/blob/main/.github/workflows/main_depi-api.yml"
    click K "https://github.com/ahmed-hazem-1/depi-project--land-type-classification/tree/main/Docs/"

    %% Styles
    classDef data fill:#ccf,stroke:#333,stroke-width:1px;
    classDef ml fill:#cfc,stroke:#333,stroke-width:1px;
    classDef api fill:#fcf,stroke:#333,stroke-width:1px;
    classDef ui fill:#ffc,stroke:#333,stroke-width:1px;
    classDef devops fill:#cff,stroke:#333,stroke-width:1px;
```
