# avishka07/iot-weather-report-system architecture

> Architecture diagram of the GitHub repository avishka07/iot-weather-report-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/avishka07/iot-weather-report-system
- Repository: https://github.com/avishka07/iot-weather-report-system

## Overview

##### Project Type and Purpose
- This project is an IoT-based real-time weather reporting application. It leverages an Arduino Uno microcontroller connected to a humidity sensor to collect live data, which is then sent to a local server (via XAMPP) hosting a custom HTML/CSS website that displays this information.
- The overall purpose is to capture sensor data, process it, and provide an intuitive, real-time monitoring interface.

##### File Structure
- The file tree shows:
- README.md (project documentation)
- iot.project.ino (Arduino sketch file containing the microcontroller’s code)
- iot_project (likely a directory containing the website files or additional related resources)
- This structure highlights two major components:
- The Arduino project (hardware and firmware)
- The web interface (front end served via XAMPP on a local server)

a. Hardware Components:
- Arduino Uno: Represent this as the central hardware unit.
- Humidity Sensor: Show it connected to the Arduino.
- Data Flow: Indicate how the sensor readings are captured by Arduino.
b. Software Components:
- Local Server: Represent the XAMPP-powered server which receives and processes the data sent by the Arduino.
- Web Interface: Include the website built with HTML and CSS that displays real-time readings.
c. Data Flow and Communication:
- Sensor sends data to the Arduino.
- Arduino forwards data to the server.
- Server serves the webpage to the client/browser where the data is displayed.

##### Architectural Patterns and Design Principles
- Separation of concerns:
- The hardware (Arduino and sensor) is solely responsible for data capture.
- The server handles data processing and web hosting.
- The client-side (custom web interface) is designed to display the data.
- If applicable, note that the project employs a loosely coupled design where hardware and software interact through well-defined data flows.

##### Relevant Technologies and Their Roles
- Arduino Uno & Arduino IDE: Code written in iot.project.ino is uploaded to the microcontroller.
- Humidity Sensor: Directly connected to Arduino for real-time measurement.
- XAMPP: Serves as the local server environment to host HTML/CSS files.
- HTML & CSS: Constitute the front-end interface for data visualization.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Hardware Layer"
        HS["Humidity Sensor"]:::hardware
        AU["Arduino Uno\n(Arduino Sketch)"]:::hardware
    end
    HS -->|"sends_sensor_data"| AU

    subgraph "Server Layer"
        XS(("XAMPP Server")):::server
        WI["HTML/CSS Web Interface"]:::interface
    end
    AU -->|"forwards_data"| XS
    XS -->|"serves_webpage"| WI

    subgraph "Client Layer"
        CB["Client/Web Browser"]:::client
    end
    WI -->|"displays_real-time_data"| CB

    click AU "https://github.com/avishka07/iot-weather-report-system/blob/main/iot.project.ino"
    click HS "https://github.com/avishka07/iot-weather-report-system/blob/main/iot.project.ino"
    click XS "https://github.com/avishka07/iot-weather-report-system/tree/main/iot_project"
    click WI "https://github.com/avishka07/iot-weather-report-system/tree/main/iot_project"

    classDef hardware fill:#a9d18e,stroke:#333,stroke-width:2px;
    classDef server fill:#9dc3e6,stroke:#333,stroke-width:2px;
    classDef interface fill:#f7cb88,stroke:#333,stroke-width:2px;
    classDef client fill:#f4b183,stroke:#333,stroke-width:2px;
```
