Skip to content

Commit 80ee3f6

Browse files
authored
Revise README for clarity and additional details
Updated project description, system architecture details, and quick start instructions in README.
1 parent 2298788 commit 80ee3f6

1 file changed

Lines changed: 60 additions & 31 deletions

File tree

README.md

Lines changed: 60 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,65 @@
1-
# 🌋 QuakeGuard - Electro-Domestic Alarm System
1+
<div align="center">
22

3-
**Version:** 3.0.0 (Stable)
4-
**Status:** Active Development
5-
**License:** MIT
3+
# 🌋 QuakeGuard
4+
### Electro-Domestic Seismic Alarm System
5+
6+
**Full-Stack IoT Architecture for Real-Time Earthquake Detection**
7+
8+
![C++](https://img.shields.io/badge/C++-Hardware_Logic-00599C?style=for-the-badge&logo=c%2B%2B&logoColor=white)
9+
![Python](https://img.shields.io/badge/Python-FastAPI-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54)
10+
![React Native](https://img.shields.io/badge/React_Native-Mobile-20232A?style=for-the-badge&logo=react&logoColor=61DAFB)
11+
![PostgreSQL](https://img.shields.io/badge/PostgreSQL-PostGIS-316192?style=for-the-badge&logo=postgresql&logoColor=white)
12+
![Redis](https://img.shields.io/badge/Redis-Message_Broker-DC382D?style=for-the-badge&logo=redis&logoColor=white)
13+
![Docker](https://img.shields.io/badge/Docker-Containerization-2496ED?style=for-the-badge&logo=docker&logoColor=white)
14+
15+
</div>
616

717
---
818

919
## 📖 Overview
10-
QuakeGuard is a **Full-Stack IoT** architecture designed for the real-time detection, analysis, and reporting of seismic events.
11-
The system utilizes intelligent edge sensors (ESP32) that analyze vibrations locally and transmit encrypted data (ECDSA) to an asynchronous hybrid Cloud, capable of handling the massive traffic spikes (**Thundering Herd** effect) typical during earthquake events.
12-
20+
**QuakeGuard** is an advanced Full-Stack IoT architecture designed for the real-time detection, analysis, and reporting of seismic events.
1321

22+
The system utilizes intelligent edge sensors (ESP32) that analyze vibrations locally and transmit cryptographically secured data to an asynchronous hybrid Cloud. The backend is specifically engineered to handle the massive traffic spikes (**Thundering Herd** effect) typical during widespread earthquake events, ensuring reliable alarm delivery without bottlenecking.
1423

1524
---
1625

1726
## 🏗 System Architecture
1827

19-
The project is modular and follows **Microservices** and **Event-Driven Design** principles:
28+
29+
The project is highly modular, following **Microservices** and **Event-Driven Design** principles across three main layers:
2030

2131
### 1. 📡 IoT Edge (Data Harvester)
22-
* **Hardware:** ESP32-C3 SuperMini + ADXL345 Accelerometer.
23-
* **Logic:** 100Hz sampling, Digital High-Pass Filters (HPF), and STA/LTA (Short Term/Long Term Average) algorithm.
32+
* **Hardware:** ESP32-C3 SuperMini paired with an ADXL345 Accelerometer.
33+
* **Edge Computing:** 100Hz sampling rate, applying Digital High-Pass Filters (HPF) and the **STA/LTA** (Short Term/Long Term Average) seismic algorithm directly on the device.
2434
* **Security:** Hardware-level digital signing of payloads using **ECDSA (NIST256p)**.
25-
* **Resilience:** Temporal timestamp reconstruction to mitigate network latency issues.
35+
* **Resilience:** Temporal timestamp reconstruction to mitigate network latency and out-of-order packet deliveries.
2636

2737
### 2. ☁️ Backend (Data Elaborator)
28-
* **Core:** FastAPI (Python).
29-
* **Pattern:** Producer-Consumer with **Redis** as a Message Broker.
30-
* **Persistence:** PostgreSQL + PostGIS for geospatial data management.
31-
* **Worker:** Background processes for queue consumption and alarm aggregation.
32-
* **Performance:** Asynchronous management capable of handling >500 Req/s on standard hardware.
38+
* **Core API:** Built with **FastAPI** (Python) for high-performance asynchronous routing.
39+
* **Event Pattern:** Producer-Consumer architecture leveraging **Redis** as a Message Broker to decouple ingestion from processing.
40+
* **Persistence:** **PostgreSQL + PostGIS** for robust geospatial data management.
41+
* **Background Workers:** Dedicated processes for queue consumption, event validation, and alarm aggregation.
42+
* **Performance:** Fully asynchronous management capable of handling >500 Req/s on standard commercial hardware.
3343

3444
### 3. 📱 Frontend (Mobile Monitor)
35-
* **Framework:** React Native (Expo).
36-
* **Features:** Dashboard with real-time visual/haptic alarms (Adaptive Polling) and an interactive sensor map.
45+
* **Framework:** **React Native** (Expo) for cross-platform compatibility.
46+
* **Features:** Interactive dashboard with real-time visual and haptic alarms via Adaptive Polling, alongside a live sensor network map.
47+
48+
---
49+
50+
## 🔐 Security & Cryptography
51+
52+
Data integrity is paramount in emergency systems. Every telemetry packet transmitted by the edge sensors is cryptographically signed.
53+
54+
```json
55+
{
56+
"value": 250,
57+
"timestamp": 17000000,
58+
"signature": "a1b2c3d4e5f6..."
59+
}
60+
```
61+
62+
The backend rigorously verifies the signature (**SHA256 + ECDSA**) against the sensor's registered public key before accepting the payload. This architecture strictly prevents **Man-in-the-Middle** (MitM) and **Spoofing** attacks, ensuring that alarms cannot be falsely triggered by malicious actors.
3763

3864
---
3965

@@ -42,32 +68,35 @@ The project is modular and follows **Microservices** and **Event-Driven Design**
4268
### Prerequisites
4369
* Docker & Docker Compose
4470
* PlatformIO (VS Code Extension)
45-
* Node.js & Expo Go
71+
* Node.js & Expo Go (Mobile App)
4672

47-
### 1. Launch the Backend
73+
### 1. Launch the Cloud Backend
74+
Deploy the API, Database, and Message Broker via Docker:
4875
```bash
4976
cd "Backend - Data Elaborator"
5077
docker-compose up --build -d
51-
# Backend will be live at http://localhost:8000
5278
```
79+
*The backend will be live at `http://localhost:8000`. API documentation is auto-generated at `http://localhost:8000/docs`.*
5380

54-
### 2. Configure and Flash the IoT Device
55-
1. Modify ```IoT - Data Harvester/esp32_config.env``` with your local IP and WiFi credentials.
56-
2. Upload the firmware to the ESP32.
57-
3. **IMPORTANT:** On the first boot, copy the ```PUBLIC KEY``` from the serial monitor and register it via Swagger (```http://localhost:8000/docs```).
81+
### 2. Configure and Flash the IoT Edge Device
82+
1. Modify `IoT - Data Harvester/esp32_config.env` with your local IP and WiFi credentials.
83+
2. Upload the firmware to the ESP32 via PlatformIO.
84+
3. **⚠️ IMPORTANT:** On the first boot, copy the generated `PUBLIC KEY` from the serial monitor and register the device via the Swagger UI (`http://localhost:8000/docs`).
5885

59-
### 3. Launch the Mobile App
86+
### 3. Launch the Mobile Dashboard
6087
```bash
6188
cd "Frontend - Mobile App"
6289
npm install
6390
npx expo start
64-
# Scan the QR code with your smartphone (must be on the same WiFi)
6591
```
92+
*Scan the generated QR code with your smartphone (ensure your phone is on the same WiFi network as your backend).*
6693

6794
---
6895

69-
## 🔐 Security Architecture
70-
Each packet sent by the sensors contains:
71-
```{ value: 250, timestamp: 17000000, signature: "a1b2..." }```
96+
<div align="center">
97+
98+
**Developed by [GiZano](https://giovanni-zanotti.is-a.dev)**
99+
<br>
100+
*Version 3.0.0 (Stable) | MIT License*
72101

73-
The backend cryptographically verifies the signature (**SHA256 + ECDSA**) before accepting the data, preventing **Man-in-the-Middle** and **Spoofing** attacks.
102+
</div>

0 commit comments

Comments
 (0)