# maruthisarathchandra/miniproject- architecture

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

- Interactive diagram: https://gitdiagram.com/maruthisarathchandra/miniproject-
- Repository: https://github.com/maruthisarathchandra/miniproject-

## Overview

This is an Arduino/ESP32 temperature-and-humidity monitor with serial controls, an HTTP API, and encrypted sensor-data uploads. The principal flow reads DHT measurements, builds a JSON payload, encrypts it, and posts it to a configured server when Wi-Fi is available. A separate API exposes health, sensor, configuration, and immediate-push endpoints. The tree identifies Main.ino as the firmware entry point, but its contents and the API/server setup wiring were not sampled, so no orchestration links are inferred. The README is empty.

Main entry points: [`HTRepo.cpp`](https://github.com/maruthisarathchandra/miniproject-/blob/main/HTRepo.cpp) (Upload repository), [`RestApiServer.cpp`](https://github.com/maruthisarathchandra/miniproject-/blob/main/RestApiServer.cpp) (REST API), [`WiFiConnect.cpp`](https://github.com/maruthisarathchandra/miniproject-/blob/main/WiFiConnect.cpp) (Wi-Fi manager), [`DHTReader.cpp`](https://github.com/maruthisarathchandra/miniproject-/blob/main/DHTReader.cpp) (Sensor reader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sensing["Sensing and controls"]
  node_serial["Serial controls<br/>[SerialHandler.cpp]"]
  node_reader["Sensor reader<br/>[DHTReader.cpp]"]
end

subgraph group_api["HTTP interface"]
  node_rest["REST API<br/>[RestApiServer.cpp]"]
end

subgraph group_delivery["Data delivery"]
  node_json["Payload builder<br/>[JsonHandler.cpp]"]
  node_crypto["JSON encryption"]
  node_repo["Upload repository<br/>[HTRepo.cpp]"]
end

subgraph group_connectivity["Connectivity and config"]
  node_wifi["Wi-Fi manager<br/>[WiFiConnect.cpp]"]
  node_config["App configuration<br/>[Application.h]"]
end

node_firmware["Firmware entry<br/>[Main.ino]"]
node_operator(("Serial operator"))
node_sensor(("DHT sensor"))
node_http_client(("HTTP client"))
node_backend(("Data endpoint"))
node_network(("Wi-Fi network"))

node_operator -->|"sends commands"| node_serial
node_serial -->|"calibrates and reads"| node_reader
node_sensor -->|"provides measurements"| node_reader
node_http_client -->|"sends requests"| node_rest
node_rest -->|"reads measurements"| node_reader
node_rest -->|"requests upload"| node_repo
node_rest -.->|"encrypts response"| node_crypto
node_rest -->|"sends responses"| node_http_client
node_repo -->|"builds payload"| node_json
node_repo -->|"encrypts payload"| node_crypto
node_repo -->|"checks connection"| node_wifi
node_repo -->|"reads endpoint"| node_config
node_repo -->|"posts encrypted data"| node_backend
node_wifi -->|"reads credentials"| node_config
node_wifi -->|"connects to"| node_network

click node_firmware "https://github.com/maruthisarathchandra/miniproject-/blob/main/Main.ino"
click node_serial "https://github.com/maruthisarathchandra/miniproject-/blob/main/SerialHandler.cpp"
click node_reader "https://github.com/maruthisarathchandra/miniproject-/blob/main/DHTReader.cpp"
click node_rest "https://github.com/maruthisarathchandra/miniproject-/blob/main/RestApiServer.cpp"
click node_json "https://github.com/maruthisarathchandra/miniproject-/blob/main/JsonHandler.cpp"
click node_crypto "https://github.com/maruthisarathchandra/miniproject-/blob/main/EDCryptorService.cpp"
click node_repo "https://github.com/maruthisarathchandra/miniproject-/blob/main/HTRepo.cpp"
click node_wifi "https://github.com/maruthisarathchandra/miniproject-/blob/main/WiFiConnect.cpp"
click node_config "https://github.com/maruthisarathchandra/miniproject-/blob/main/Application.h"

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_serial,node_reader,node_http_client toneBlue
class node_rest toneAmber
class node_json,node_crypto,node_repo toneMint
class node_wifi,node_config toneRose
class node_firmware toneTeal
class node_operator,node_sensor,node_backend,node_network toneIndigo
```

## Components

### Sensing and controls

- [Serial controls](https://github.com/maruthisarathchandra/miniproject-/blob/main/SerialHandler.cpp): `SerialHandler.cpp`
- [Sensor reader](https://github.com/maruthisarathchandra/miniproject-/blob/main/DHTReader.cpp): `DHTReader.cpp`

### HTTP interface

- [REST API](https://github.com/maruthisarathchandra/miniproject-/blob/main/RestApiServer.cpp): `RestApiServer.cpp`

### Data delivery

- [Payload builder](https://github.com/maruthisarathchandra/miniproject-/blob/main/JsonHandler.cpp): `JsonHandler.cpp`
- [JSON encryption](https://github.com/maruthisarathchandra/miniproject-/blob/main/EDCryptorService.cpp): `EDCryptorService.cpp`
- [Upload repository](https://github.com/maruthisarathchandra/miniproject-/blob/main/HTRepo.cpp): `HTRepo.cpp`

### Connectivity and config

- [Wi-Fi manager](https://github.com/maruthisarathchandra/miniproject-/blob/main/WiFiConnect.cpp): `WiFiConnect.cpp`
- [App configuration](https://github.com/maruthisarathchandra/miniproject-/blob/main/Application.h): `Application.h`

### Other components

- [Firmware entry](https://github.com/maruthisarathchandra/miniproject-/blob/main/Main.ino): `Main.ino`
- **Serial operator**
- **DHT sensor**
- **HTTP client**
- **Data endpoint**
- **Wi-Fi network**

## Connections

- Serial operator → Serial controls: sends commands
- Serial controls → Sensor reader: calibrates and reads
- DHT sensor → Sensor reader: provides measurements
- HTTP client → REST API: sends requests
- REST API → Sensor reader: reads measurements
- REST API → Upload repository: requests upload
- REST API → JSON encryption: encrypts response
- REST API → HTTP client: sends responses
- Upload repository → Payload builder: builds payload
- Upload repository → JSON encryption: encrypts payload
- Upload repository → Wi-Fi manager: checks connection
- Upload repository → App configuration: reads endpoint
- Upload repository → Data endpoint: posts encrypted data
- Wi-Fi manager → App configuration: reads credentials
- Wi-Fi manager → Wi-Fi network: connects to
