A production-grade video streaming platform built with microservices architecture
StreamHive is a cloud-native video streaming solution featuring HLS adaptive bitrate streaming, deployed on a manually configured Kubernetes cluster in Azure. The platform handles the complete video lifecycle—from upload and transcoding to catalog management and playback.
┌─────────────────────────────────────────────────────────────────────────────────┐
│ CLOUDFLARE │
│ (DNS, DDoS Protection, Bot Protection, TLS) │
└─────────────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────────────┐
│ AZURE LOAD BALANCER │
└─────────────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────────────┐
│ KUBERNETES CLUSTER (Azure VMs) │
│ ┌───────────────────────────────────────────────────────────────────────────┐ │
│ │ ISTIO SERVICE MESH (API Gateway) │ │
│ └───────────────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ┌──────────────┬──────────────┬───┴───────┬───────────────┬──────────────┐ │
│ ▼ ▼ ▼ ▼ ▼ ▼ │
│ ┌──────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌───────┐ │
│ │Nginx │ │ Upload │ │Transcoder│ │ Video │ │ Playback │ │Security│ │
│ │(React│ │ Service │ │ Service │ │ Catalog │ │ Service │ │Service │ │
│ │Static│ │ (Node.js)│ │ (Go) │ │ (Go) │ │ (Go) │ │ (Go) │ │
│ └──────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ └───────┘ │
│ │ │ │ │ │
│ └──────────────┴─────┬──────┴─────────────┘ │
│ ▼ │
│ ┌─────────────────┐ │
│ │ RabbitMQ │ │
│ │ (Message Queue) │ │
│ └─────────────────┘ │
│ │
│ ┌────────────────┐ ┌────────────────┐ ┌────────────────┐ │
│ │ PostgreSQL │ │ Redis │ │ Prometheus │ │
│ │ (Metadata) │ │ (Caching) │ │ + Grafana │ │
│ └────────────────┘ └────────────────┘ └────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────────────┐
│ AZURE CLOUD SERVICES │
│ ┌───────────────────┐ ┌───────────────────┐ ┌───────────────────┐ │
│ │ Azure Blob Storage│ │ Azure Key Vault │ │ Azure DevOps │ │
│ │(Videos/Thumbnails)│ │ (Secrets) │ │ (CI/CD) │ │
│ └───────────────────┘ └───────────────────┘ └───────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────────┘
┌──────────┐ ┌──────────────┐ ┌───────────────┐ ┌─────────────────┐
│ Client │───▶│Upload Service│───▶│ Azure Blob │ │ TranscoderService│
│ │ │ │ │ (Raw Video) │ │ │
└──────────┘ └──────┬───────┘ └───────────────┘ └────────┬─────────┘
│ │
│ video.uploaded │ FFmpeg
▼ │ HLS Transcoding
┌─────────────┐ │
│ RabbitMQ │◀──────────────────────────────────┘
│ Exchange │ video.transcoded
└──────┬──────┘
│
▼
┌─────────────────┐ ┌──────────────┐ ┌──────────┐
│VideoCatalogServ.│───▶│PlaybackServ. │───▶│ Client │
│ (Metadata DB) │ │ (HLS URLs) │ │ (Player) │
└─────────────────┘ └──────────────┘ └──────────┘
| Service | Technology | Description |
|---|---|---|
| Frontend | React, Vite, Nginx | Static SPA served via Nginx for maximum performance |
| UploadService | Node.js, Express | Handles video uploads to Azure Blob Storage |
| TranscoderService | Go, FFmpeg | Transcodes videos to HLS adaptive bitrate (1080p/720p/480p/360p) |
| VideoCatalogService | Go, GORM, PostgreSQL | CRUD API for video metadata, consumes MQ events |
| PlaybackService | Go, Redis | Generates signed HLS playback URLs with caching |
| SecurityService | Go, JWT, bcrypt | Authentication & authorization (signup/login/validate) |
| Deployment-Pipelines | Azure DevOps YAML | CI/CD pipelines for building and deploying all services |
- Cloudflare — DNS, DDoS protection, Bot protection
- Full (Strict) TLS — Origin server TLS certificate with Cloudflare verification
- Istio mTLS — Service-to-service encryption within the cluster
- JWT Authentication — Stateless token-based auth via SecurityService
- Azure Key Vault — Secure secret management
- Rate Limiting — Protection against abuse
- Circuit Breakers — Using sony/gobreaker in Go services
- Health Checks — Kubernetes liveness and readiness probes
- Message Queue — RabbitMQ with retry/DLQ strategy for async processing
| Tool | Purpose |
|---|---|
| Prometheus | Metrics collection from all services |
| Grafana | Dashboards and alerting |
| Structured Logging | Zap logger in Go services |
- Go — Microservices (Transcoder, VideoCatalog, Playback, Security)
- Node.js — Upload Service
- PostgreSQL — Primary database for video metadata
- Redis — Caching layer for playback URLs
- RabbitMQ — Message broker (topic exchange pattern)
- FFmpeg — Video transcoding to HLS
- React — UI framework
- Vite — Build tool
- Nginx — Static file server (in production)
- Kubernetes — Container orchestration (manually configured on Azure VMs)
- Istio — Service mesh & API gateway
- Docker — Containerization
- Azure DevOps — CI/CD pipelines
- Azure Blob Storage — Video segments and thumbnails
- Azure Key Vault — Secrets management
- Azure Load Balancer — Traffic distribution
- Azure VMs — Kubernetes worker nodes
- Docker & Docker Compose
- Node.js 18+
- Go 1.21+
- FFmpeg
-
Clone the repository with submodules:
git clone --recursive https://github.com/Malisha4065/StreamHive.git cd StreamHive -
Set up environment variables:
cp .env.example .env # Edit .env with your Azure Storage credentials -
Start all services:
docker-compose up --build
-
Access the application:
- Frontend: http://localhost:5173
- Upload API: http://localhost:3001
- Catalog API: http://localhost:8080
- Playback API: http://localhost:8090
- RabbitMQ Management: http://localhost:15672
StreamHive/
├── Frontend/ # React SPA (submodule)
├── UploadService/ # Node.js upload service (submodule)
├── TranscoderService/ # Go FFmpeg transcoder (submodule)
├── VideoCatalogService/ # Go metadata API (submodule)
├── PlaybackService/ # Go playback URL service (submodule)
├── SecurityService/ # Go auth service (submodule)
├── Deployment-Pipelines/ # Azure DevOps YAML pipelines (submodule)
├── docker-compose.yml # Local development stack
└── README.md
Built with ❤️ by the StreamHive team.
This project is licensed under the MIT License.
