ESP32 β’ MQTT β’ InfluxDB β’ React β’ Docker β’ Industry 4.0
π Perfect for technical students learning Industrial IoT concepts!
AlzetteLink is a comprehensive Industrial IoT (IIoT) educational platform designed to bridge the gap between operational technology (OT) and information technology (IT). It demonstrates the complete flow of data from a low-level microcontroller (ESP32) to a high-level web dashboard via modern industry-standard protocols.
Designed for technical students at LycΓ©e Technique, this project introduces core Industry 4.0 concepts:
- Edge Computing: ESP32 sensor logic.
- Connectivity: MQTT (Message Queuing Telemetry Transport).
- Data Persistence: InfluxDB (Time-series database).
- Visualization: React & Real-time WebSockets.
The system consists of three main modular components:
- Firmware (
/firmware): C++ code running on an ESP32. It acts as a "Smart Sensor", reading data and publishing JSON payloads to an MQTT broker. - Infrastructure & Backend:
- MQTT Broker: Eclipse Mosquitto (Docker).
- Database: InfluxDB (Docker).
- Bridge Service (
/bridge-service): A Node.js microservice that subscribes to the broker and persists data to InfluxDB.
- Frontend (
/web-dashboard): A modern React application that subscribes directly to the MQTT broker (via WebSockets) to display real-time gauges, charts, and status indicators.
graph LR
subgraph Edge["π Edge Layer"]
ESP32["ESP32<br/>Sensor"]
end
subgraph Infrastructure["βοΈ Infrastructure (Docker)"]
MQTT["Mosquitto<br/>MQTT Broker"]
DB["InfluxDB<br/>Database"]
end
subgraph Backend["βοΈ Backend"]
Bridge["Bridge Service<br/>Node.js"]
end
subgraph Frontend["π₯οΈ Frontend"]
Dashboard["React Dashboard<br/>Tailwind + Chart.js"]
end
ESP32 -->|"JSON/MQTT<br/>:1883"| MQTT
MQTT -->|"Subscribe"| Bridge
Bridge -->|"Write"| DB
MQTT -->|"WebSocket<br/>:9001"| Dashboard
Dashboard -.->|"Query History"| DB
- Docker & Docker Compose
- Node.js (v16+)
- VS Code with PlatformIO (recommended) or Arduino IDE.
Start the local server environment:
docker-compose up -dThis launches Mosquitto (MQTT Broker) on ports 1883 (TCP) and 9001 (WebSockets), and InfluxDB on 8086.
Install and run the data logger:
cd bridge-service
npm install
node index.jsNote: Ensure you update the .env or configuration lines in index.js with your InfluxDB token if you want to save data.
Launch the real-time visualization:
cd web-dashboard
npm install
npm run devOpen http://localhost:5173 in your browser.
- Open
/firmwarein PlatformIO (VS Code) or Arduino IDE. - Edit
src/main.cpp:- Update
ssidandpasswordwith your WiFi credentials. - Update
mqtt_serverwith your PC's IP address.
- Update
- Upload code to your ESP32.
- Open the Serial Monitor to verify connection.
If you don't have an ESP32, use the simulator to test the dashboard:
cd simulator
npm install
npm startThe simulator will publish fake sensor data every 2 seconds.
This project is a boilerplate. Your goal is to expand it into a real industrial monitoring solution.
- Modify the Data: Change the dummy temperature generation in
main.cppto simulate a "Sine Wave" or connect a real DHT11/DHT22 sensor. - Custom Topic: Change the MQTT topic from
datatofactory/machine01/telemetryand update the Dashboard and Bridge to match.
- Alert System: Modify the React dashboard to flash RED if the temperature exceeds 30Β°C.
- Two-Way Communication: Add a "Stop" button on the Dashboard that sends an MQTT message back to the ESP32 to turn on an LED (simulating a machine stop).
- Multi-Sensor Support: Connect a second ESP32. Modify the dashboard to handle multiple devices dynamically based on their
machine_id. - Historical Analysis: Update the Dashboard to fetch generic historical data from InfluxDB instead of just showing the live buffer.
Thanks to these amazing people who have contributed to AlzetteLink:
| Contributor | Contribution |
|---|---|
@Omar-Alshaer |
Data Export (CSV/JSON), Chart & Component fixes |
Want to contribute? Check out CONTRIBUTING.md!
- Project Link: GitHub Repository
- Author: Boubli Tech
- Inspiration: Built upon experience with ESP8266 automation projects (e.g., Wifi-Jammer-NodeMCU).


