Skip to content

System Architecture and Overview

GiZano edited this page Sep 1, 2026 · 2 revisions

System Architecture & Overview

QuakeGuard is a distributed, high-throughput backend system designed for the real-time ingestion, cryptographic validation, and processing of seismic data from IoT devices. It serves as the core infrastructure for an Earthquake Early Warning (EEW) system. The architecture is explicitly designed to handle high-concurrency event firehosing during seismic swarms while maintaining strict security boundaries.

High-Level Topology

The infrastructure is decoupled into three primary tiers:

  • Edge Layer (IoT): Composed of ESP32-C3 SuperMini microcontrollers interfaced with ADXL345 digital accelerometers. These nodes execute on-device Digital Signal Processing (DSP) using the STA/LTA algorithm.
  • Core Backend & Processing: A polyglot backend architecture utilizing FastAPI (Python) as the API gateway. Validated data is asynchronously offloaded to a Redis message queue (seismic_events) and consumed by a background worker.
  • Client Presentation Layer: A React Native (Expo) mobile application providing users with real-time seismograph telemetry and instantaneous critical event notifications.

Data Plane and Control Plane

Following the v1.1.0 cloud migration, the architecture strictly separates pipelines:

  • Data Plane (Telemetry): Flows exclusively through a HiveMQ Cloud Serverless broker on port 8883 (authenticated and TLS-encrypted). A Python MQTT bridge (mqtt_subscriber.py) forwards payloads to the internal FastAPI ingestion pipeline.
  • Control Plane (Provisioning & Management): Device onboarding, cryptographic handshakes, and REST retrieval operations are routed through a Cloudflare HTTPS tunnel, directly exposing FastAPI endpoints.

Clone this wiki locally