Skip to content

pashitox/skysense-iot-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ SkySense IoT Platform

Real-time Sensor Monitoring with Kubernetes, WebSockets & Machine Learning

Kubernetes FastAPI Angular PostgreSQL

Modern IoT Platform for Real-time Sensor Data Processing with Enterprise-Grade Observability

GitHub Docker

๐Ÿ“‹ Table of Contents

โœจ Features

๐ŸŽฏ Frontend ๐Ÿ”ง Backend ๐Ÿ“Š Database ๐Ÿ›ก๏ธ Infrastructure
Angular 17 + TypeScript FastAPI + Python PostgreSQL 13 Kubernetes + Istio
Real-time WebSocket Dashboard RESTful API Time-series Data Docker Containers
Responsive Material UI WebSocket Server Automated Backups Service Mesh
Live Data Visualization Sensor Data Processing High Performance GitOps (ArgoCD)
๐Ÿ“ก Real-time Features ๐Ÿ” Monitoring ๐Ÿš€ DevOps
Live Sensor Data Stream Grafana Dashboards CI/CD Pipeline
WebSocket Connections Prometheus Metrics Helm Charts
Instant Data Persistence Kiali Service Mesh Health Checks
Auto-scaling Jaeger Distributed Tracing Rolling Updates

๐Ÿ—๏ธ System Architecture

graph TB
    A[๐ŸŒ Web Browser] --> B[๐Ÿ–ฅ๏ธ Frontend<br/>Angular]
    B --> C[๐Ÿ”Œ WebSocket<br/>Real-time]
    B --> D[๐Ÿ“ก REST API<br/>HTTP]
    
    C --> E[๐Ÿ Backend<br/>FastAPI]
    D --> E
    
    E --> F[๐Ÿ—„๏ธ PostgreSQL<br/>Sensor Data]
    E --> G[๐Ÿ“Š Prometheus<br/>Metrics]
    
    H[๐Ÿ“ฑ IoT Sensors] --> I[๐Ÿ“ก Message Queue]
    I --> E
    
    E --> J[๐Ÿ” Istio<br/>Service Mesh]
    J --> K[๐Ÿ“ˆ Grafana<br/>Monitoring]
    J --> L[๐Ÿ—บ๏ธ Kiali<br/>Visualization]
    
    M[โš“ ArgoCD] --> N[โ˜ธ๏ธ Kubernetes<br/>Orchestration]
    
    style A fill:#ff6b6b
    style B fill:#4ecdc4
    style E fill:#45b7d1
    style F fill:#96ceb4
    style K fill:#feca57
    style L fill:#ff9ff3
Loading

๐Ÿš€ Quick Start

Prerequisites

  • Docker & Docker Compose
  • Minikube (for local Kubernetes)
  • kubectl (Kubernetes CLI)

Installation

# Clone the repository
git clone https://github.com/pashitox/skysense-iot-platform.git
cd skysense-iot-platform

# Start with Docker Compose (Development)
docker-compose up -d

# Or deploy to Kubernetes (Production)
./deploy-to-k8s.sh

Kubernetes Deployment

# Create namespace and deploy
kubectl create namespace skysense
kubectl apply -f k8s/ -n skysense

# Check deployment status
kubectl get all -n skysense

# Access the application
echo "๐ŸŒ Frontend: http://192.168.49.2:32323"
echo "๐Ÿ”ง Backend API: http://192.168.49.2:30080"
echo "๐Ÿ“š API Docs: http://192.168.49.2:30080/docs"

Environment Configuration

# Database Configuration
POSTGRES_DB=skysense_db
POSTGRES_USER=skysense_user
POSTGRES_PASSWORD=secure_password

# Backend Configuration
DATABASE_URL=postgresql://user:password@postgresql:5432/skysense_db
WEB_CONCURRENCY=4

# Frontend Configuration
API_URL=http://localhost:30080/api
WS_URL=ws://localhost:30080/ws

๐Ÿ› ๏ธ Tech Stack

Frontend

  • Angular 17 - Modern TypeScript framework
  • WebSocket API - Real-time data streaming
  • Material Design - Professional UI components
  • RxJS - Reactive programming library

Backend

  • FastAPI - High-performance Python API
  • WebSocket - Bi-directional real-time communication
  • SQLAlchemy - Database ORM
  • Uvicorn - ASGI web server

Database

  • PostgreSQL 13 - Relational database
  • Time-series Data - Optimized for sensor data
  • Automated Backups - Data persistence

Infrastructure

  • Kubernetes - Container orchestration
  • Istio Service Mesh - Traffic management & security
  • Docker - Containerization
  • Prometheus/Grafana - Monitoring stack

๐Ÿ“ Project Structure

skysense-iot-platform/
โ”œโ”€โ”€ ๐ŸŽจ frontend/                 # Angular 17 Application
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ dashboard/
โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ dashboard.component.ts
โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ dashboard.component.html
โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ dashboard.component.css
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ sensor-charts/
โ”‚   โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ charts.component.ts
โ”‚   โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ charts.component.html
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ services/
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ websocket.service.ts
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ models/
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ sensor-data.ts
โ”‚   โ”‚   โ”œโ”€โ”€ environments/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ environment.ts
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ environment.prod.ts
โ”‚   โ”‚   โ””โ”€โ”€ assets/
โ”‚   โ”‚       โ””โ”€โ”€ env.js
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ”œโ”€โ”€ angular.json
โ”‚   โ””โ”€โ”€ Dockerfile
โ”‚
โ”œโ”€โ”€ ๐Ÿ backend/                  # FastAPI Application
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ main.py              # FastAPI application
โ”‚   โ”‚   โ”œโ”€โ”€ models.py            # SQLAlchemy models
โ”‚   โ”‚   โ””โ”€โ”€ database.py          # Database configuration
โ”‚   โ”œโ”€โ”€ requirements.txt
โ”‚   โ””โ”€โ”€ Dockerfile
โ”‚
โ”œโ”€โ”€ โ˜ธ๏ธ k8s/                      # Kubernetes Manifests
โ”‚   โ”œโ”€โ”€ frontend/
โ”‚   โ”‚   โ”œโ”€โ”€ deployment.yaml
โ”‚   โ”‚   โ”œโ”€โ”€ service.yaml
โ”‚   โ”‚   โ””โ”€โ”€ configmap.yaml
โ”‚   โ”œโ”€โ”€ backend/
โ”‚   โ”‚   โ”œโ”€โ”€ deployment.yaml
โ”‚   โ”‚   โ”œโ”€โ”€ service.yaml
โ”‚   โ”‚   โ””โ”€โ”€ configmap.yaml
โ”‚   โ”œโ”€โ”€ postgresql.yaml
โ”‚   โ””โ”€โ”€ ingress.yaml
โ”‚
โ”œโ”€โ”€ ๐Ÿ“Š monitoring/               # Observability Stack
โ”‚   โ”œโ”€โ”€ grafana-dashboards/
โ”‚   โ”œโ”€โ”€ prometheus-alerts/
โ”‚   โ””โ”€โ”€ kiali-config/
โ”‚
โ”œโ”€โ”€ ๐Ÿณ docker-compose.yml        # Development environment
โ”œโ”€โ”€ ๐Ÿ”ง deploy-to-k8s.sh          # Production deployment script
โ””โ”€โ”€ ๐Ÿ“„ README.md                 # This file

๐Ÿ”Œ API Endpoints

WebSocket Endpoints

# Real-time sensor data stream
ws://localhost:30080/ws/sensors

# Example WebSocket message
{
  "sensor_id": "sensor_1",
  "temperature": 23.5,
  "humidity": 65.2,
  "pressure": 1013.25,
  "timestamp": "2024-01-15T10:30:00Z"
}

REST API Endpoints

Method Endpoint Description
GET /api/health System health check
GET /api/sensors Get sensor data (with pagination)
GET /api/sensors/{sensor_id} Get data for specific sensor
GET /api/metrics System performance metrics
POST /api/sensors Submit sensor data (batch)

Example API Usage

# Health check
curl http://localhost:30080/api/health

# Get latest sensor data
curl http://localhost:30080/api/sensors?limit=10

# API Documentation
open http://localhost:30080/docs

๐Ÿ“Š Live Dashboard

Dashboard Preview

Real-time Features:

  • ๐Ÿ“ˆ Live Sensor Metrics - Temperature, humidity, pressure
  • ๐Ÿ”„ WebSocket Connection - Real-time data streaming
  • ๐Ÿ“ฑ Responsive Design - Mobile-first approach
  • ๐ŸŽฏ Data Visualization - Charts and graphs
  • โšก Instant Updates - Sub-second latency

๐Ÿ” Monitoring & Observability

Access Monitoring Tools

# Kiali - Service Mesh Visualization
kubectl port-forward -n istio-system svc/kiali 20001:20001
# http://localhost:20001 (admin/admin)

# Grafana - Metrics Dashboard
kubectl port-forward -n monitoring svc/monitoring-grafana 3001:80
# http://localhost:3001

# ArgoCD - GitOps Dashboard
kubectl port-forward -n argocd svc/argocd-server 8081:443
# https://localhost:8081

Available Dashboards

  • ๐Ÿ“Š Kubernetes Cluster Metrics - Resource usage and performance
  • ๐Ÿ” SkySense Application Metrics - Custom application monitoring
  • ๐Ÿ—„๏ธ PostgreSQL Performance - Database health and queries
  • ๐Ÿ›ก๏ธ Istio Service Mesh - Traffic flow and security

๐Ÿ”ฎ Roadmap

โœ… Completed

  • Microservices architecture with Kubernetes
  • Real-time WebSocket communication
  • PostgreSQL database with time-series data
  • Angular frontend with live dashboard
  • Docker containerization
  • Service Mesh with Istio
  • Monitoring with Prometheus/Grafana
  • GitOps with ArgoCD

๐Ÿšง In Progress

  • Machine Learning anomaly detection
  • Advanced data visualization
  • Multi-tenant support
  • Advanced alerting system

๐Ÿ“… Planned

  • Mobile application (React Native)
  • Edge computing capabilities
  • Advanced analytics dashboard
  • IoT device management
  • Predictive maintenance features

๐Ÿ‘จโ€๐Ÿ’ป Author

Pashitox - Full Stack Developer & IoT Specialist

GitHub LinkedIn

"Building the future of IoT, one sensor at a time. Transforming real-world data into actionable insights through cutting-edge technology and scalable cloud infrastructure."


๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


โญ Star us on GitHub!

If this IoT platform helps you in your projects, please give it a star on GitHub!

SkySense IoT Platform - Enterprise-grade real-time sensor monitoring ๐Ÿš€

About

Production-grade monitoring with health checks and ConfigMaps

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors