Skip to content

🟒 Real-time end-to-end sensor data pipeline using Python, Spark, PostgreSQL, Docker, and React for live visualization.

License

Notifications You must be signed in to change notification settings

mmerlyn/SensorStream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🟒 Real-Time Sensor Dashboard with Kafka, Spark, PostgreSQL, FastAPI & React

This project is a real-time dashboard that streams temperature and humidity readings every 5 seconds. It showcases an end-to-end streaming data pipeline using:

Displays sensor readings every 5 seconds on a live-updating UI.

▢️ Watch Demo

πŸ“ Read the full blog on Medium

Tech Stack

image

πŸ“ Project Structure

.
β”œβ”€β”€ api/                  # FastAPI backend
β”‚   └── main.py
β”œβ”€β”€ producer/             # Kafka Python data producer
β”‚   └── producer.py
β”œβ”€β”€ spark-app/
β”‚   └── spark_stream.py   # Spark streaming script
β”œβ”€β”€ frontend/             # React frontend
β”‚   └── src/
β”œβ”€β”€ jars/                 # PostgreSQL JDBC driver
β”‚   └── postgresql-42.7.4.jar
β”œβ”€β”€ docker-compose.yml
└── README.md

API Endpoints

Method Endpoint Description
GET /latest Returns latest sensor data

Example response:

{
  "temperature": 24.75,
  "humidity": 62.3,
  "timestamp": 1714898232.0
}

To-Do / Enhancements

  • Add authentication layer to API
  • Allow querying history by timestamp
  • Deploy to cloud

πŸ“š Learnings

This project was more than just getting things to workβ€”it gave me a chance to explore and connect several technologies in a practical, end-to-end system. I learned how different tools interact and support each other in a real-time setup. As someone working toward a career in software development, it gave me valuable hands-on experience with Docker, building REST APIs, integrating frontend and backend components, and managing data flow across services.

Author

Merlyn Mercylona

About

🟒 Real-time end-to-end sensor data pipeline using Python, Spark, PostgreSQL, Docker, and React for live visualization.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published