How mohamedwaleed77/iot_based_earthquakestation works
This is an IoT earthquake-monitoring system: STM32 stations sample motion, send readings to a server for earthquake classification, and expose station and event information through a web dashboard. The README documents the UDP and Random Forest workflow; the sampled files show sensor/display/network calls, backend persistence and APIs, and dashboard fetching. The classifier implementation and full server-side UDP ingress path are not shown, so those connections are documented but unverified here.
Main entry points: station_info.js Live station view · controller.js Station API · App.js Page router · home.js Station listing
Components 22
Station firmware
- Station control
stationSide/Core/Src/main.c - MPU-6050 sensor
stationSide/Core/Src/MPU6050.c - ESP UDP link
stationSide/Core/Src/ESP01.c - Station display
stationSide/Core/Src/st7735.c
Server and data
- Data ingestion
backend - Station API
backend/stationsModule/controller.js - HTTP routes
backend/stationsModule/routes.js - Station validation
backend/middlewares/checkStationExist.js - MySQL database
backend/database/database.js - Server entry
backend/index.js
Web dashboard
- Page router
frontend/src/App.js - Station listing
frontend/src/components/home.js - Live station view
frontend/src/components/station_info.js - History view
frontend/src/components/history.js - Introduction
frontend/src/components/Introduction.js - About page
frontend/src/components/about.js - Navigation
frontend/src/components/navbar.js
Classification
- Random Forest classifier
random_forest_200.pkl
Other components
- Ground motion
- UDP readings
- Dashboard user
- Google Maps
Connections 24
- Ground motion → MPU-6050 sensor: causes motion
README.md - Station control → MPU-6050 sensor: reads samples
stationSide/Core/Src/main.c - Station control → ESP UDP link: sends readings
stationSide/Core/Src/main.c - Station control → Station display: updates status
stationSide/Core/Src/main.c - ESP UDP link → UDP readings: transmits UDP
README.md - UDP readings → Data ingestion: delivers readings
README.md - Data ingestion → Random Forest classifier: classifies data
README.md - Random Forest classifier → Station API: accepted events
README.md - Server entry → HTTP routes: registers routes
backend/index.js - HTTP routes → Station validation: validates history
backend/stationsModule/routes.js - HTTP routes → Station API: dispatches requests
backend/stationsModule/routes.js - Station validation → MySQL database: checks station
backend/middlewares/checkStationExist.js - Station API → MySQL database: reads and writes
backend/stationsModule/controller.js - Dashboard user → Page router: opens dashboard
- Page router → Navigation: renders navigation
frontend/src/App.js - Page router → Station listing: routes home
frontend/src/App.js - Page router → About page: routes about
frontend/src/App.js - Station listing → Station API: fetches stations
- Station listing → Live station view: renders stations
frontend/src/components/home.js - Station listing → Introduction: renders introduction
frontend/src/components/home.js - Live station view → Station API: requests history
- Live station view → History view: renders history
frontend/src/components/station_info.js - Live station view → Google Maps: embeds location
frontend/src/components/station_info.js - Live station view → Server entry: receives live feed