A simple, real-time dashboard to monitor your telemetry data. Built with Flask, PostgreSQL, and WebSockets for live updates.
- 📊 Real-time data visualization
- 🔌 Live WebSocket updates - no page refresh needed
- 💾 PostgreSQL database to store your telemetry
- 🐳 Docker ready - just one command to run
- 🚀 Simple REST API to send data
Just Docker and Docker Compose installed on your machine. That's it!
- Clone this repo:
git clone https://github.com/sinakhezrian/telemetry-dashboard.git
cd telemetry-dashboard- Set up your environment:
Create a
.envfile in the project root:
DATABASE_URL=postgresql://postgres:12345@localhost:5432/telemetry
SECRET_KEY=your_secret_key_here
FLASK_APP=app.py
FLASK_ENV=development
PORT=5000- Fire it up:
docker-compose up --build-
Check it out: Open your browser and go to
http://localhost:5000 -
When you're done:
docker-compose downPOST to /telemetry:
{
"sensor": "CPU Usage",
"value": 45.5
}You'll get back:
{
"status": "success"
}/- Main dashboard (the good stuff)/db-connection-test- Check if your database is connected
You can tweak these in your .env file:
| Setting | What It Does | Default |
|---|---|---|
PORT |
Which port to run on | 5000 |
DATABASE_URL |
Where your database lives | Required |
SECRET_KEY |
Your app's secret (keep it secret!) | Required |
FLASK_ENV |
Development or production mode | development |
FLASK_APP |
App entry point | app.py |
telemetry-dashboard/
├── app.py # Where the magic happens
├── models.py # Database stuff
├── requirements.txt # Python packages we need
├── DockerFile # Docker setup
├── docker-compose.yml # Makes everything work together
├── .env # Your settings
├── templates/ # HTML pages
│ ├── dashboard.html # The main dashboard
│ └── database-status.html # Database check page
└── static/ # Client-side files
└── dashboard.js # Makes the magic happen in your browser
- Flask - Lightweight Python web framework
- PostgreSQL - Reliable database
- Socket.IO - Real-time communication
- Tailwind CSS - Modern styling
- Docker - Easy deployment