To visualize and analyze data collected from sensors on my DI-FARM device, I built a dashboard using Next.js for the frontend and Node.js for the backend. This setup helped me track livestock health and movement in real-time.
I used Next.js to build dynamic, real-time charts and tables. The dashboard fetches data from the backend using APIs and displays temperature, movement status, GPS coordinates, and timestamps.
Main features of my dashboard:
Below is a screenshot of the frontend source code:
I created a Node.js backend with Express to receive data from the ESP32 C3 microcontroller. This backend stores incoming data from microcontroller using APIs via network and serves it to the frontend through API endpoints.
What my backend does:
Here’s a photo of the backend code file:
Each device sends data like this:
{
"temperature_C": 38.2,
"movement": true,
"satellites": 8,
"latitude": -1.962679,
"longitude": 30.064,
"altitude": 1540.5,
"date": "18/6/2025",
"time": "16:30:12",
"speed_kmh": 1.2
}
I will add here some screenshots and graphs showing how data is presented on the dashboard after live collection.