How algora-io/tv works
Main System Components
a) Frontend Layer:
• Phoenix LiveView components (under lib/algora_web/live)
• Static assets (JavaScript, CSS, images)
• Web components and layouts
b) Backend Services:
• Authentication system (GitHub OAuth)
• Video processing pipeline
• Chat system
• Advertisement system
• User management
• Content management
c) Storage Systems:
• PostgreSQL database
• Tigris object storage
• Cache layer
d) External Services Integration:
• GitHub OAuth
• Tigris storage
• FFmpeg for video processing
Detailed Architecture Representation
Client Layer
• Web Interface (Phoenix LiveView)
• OBS Studio Integration
• Video Player Interface
API/Web Layer
• Phoenix Controllers
• LiveView Handlers
• WebSocket Channels
• API Endpoints
Core Services Layer
• Account Management
• User, Identity, Entity management
• Video Pipeline
• RTMP Server
• HLS Processing
• Video Processing Workers
• Chat System
• Message Processing
• Presence Tracking
• Advertisement System
• Ad Management
• Analytics
• Content Management
• Shows
• Channels
• Videos
Storage Layer
• PostgreSQL Database
• Tigris Object Storage
• Cache System
External Services
• GitHub OAuth
• FFmpeg
• ImageMagick
Data Flow Representation
a) Livestreaming Flow:
Streamer → RTMP → Pipeline Processing → HLS → Tigris Storage → Viewers
b) Video Upload Flow:
Upload → Processing Pipeline → Storage → Distribution
c) Authentication Flow:
User → GitHub OAuth → Account System → Session Management
Special Focus Areas
• Real-time aspects (WebSocket, LiveView)
• Advertisement integration points
• Demonstrate the scaling points (Fly.io deployment)
Additional Elements
• Monitoring and telemetry components
• Error handling paths
• Backup and recovery flows
• Scaling points and load balancing