A complete streaming solution for radio stations with live and playlist-based streaming, featuring a modern admin panel and real-time management capabilities.
This is a monorepo containing a full-featured radio streaming platform with:
- π΄ Live Streaming: Real-time audio streaming from external sources
- π» Radio Mode: Playlist-based streaming with track management
- ποΈ Admin Panel: Complete web-based control interface
- π± Frontend: Public-facing radio player interface
- π§ Backend API: RESTful API with WebSocket support
- π‘ Telegram Integration: Stream to Telegram channels
- π₯οΈ RTMP Server: Docker-based streaming infrastructure
radio/
βββ apps/
β βββ wave/ # Backend streaming server (Bun + Hono)
β βββ admin/ # Admin panel (React + TypeScript)
β βββ player/ # Public player (React + Vite)
βββ packages/
β βββ types/ # Shared TypeScript types
βββ docs/ # Documentation (this folder)
β βββ docs/ # Technical documentation
β βββ apps/ # App-specific documentation
β βββ setup/ # Setup and deployment guides
β βββ api/ # API documentation
βββ scripts/ # Utility scripts
- RTMP Server Management: Start, stop, and restart RTMP streaming server
- Telegram Integration: Stream to Telegram channels via PM2 daemon
- Configuration Management: Update RTMP and Telegram stream settings
- Real-time Monitoring: System health and service status monitoring
- Docker Integration: Container-based RTMP server management
- Modern UI: Built with React 18, TypeScript, and Tailwind CSS
- Real-time Updates: Live status monitoring with WebSocket support
- Stream Control Interface: Complete streaming management with tabs
- Monitoring Tab: Real-time service status and system health
- Configuration Tab: Service configuration management
- Logs Tab: System and service logs
- Service Management:
- RTMP server start/stop/restart
- Telegram streaming with daemon control
- Configuration updates for both services
- Error Handling: Comprehensive error reporting and recovery
- Backend: Bun runtime with Hono framework
- Frontend: React 18 with Vite build system
- State Management: React Query for server state, Zustand for client state
- Styling: Tailwind CSS with custom Ukrainian-themed design system
- Type Safety: Full TypeScript coverage with shared types package
- Process Management: PM2 for production deployment
- Real-time: WebSocket connections for live updates
- Node.js 22.15.0+
- Bun 1.2.9+
- pnpm 10.8.0+ (package manager)
- Docker (for RTMP server)
- PM2 (for production deployment)
- FFmpeg (for Telegram streaming)
# Clone the repository
git clone <repository-url>
cd radio
# Install dependencies
pnpm install
# Start all services in development
pnpm dev# Backend API server
pnpm wave:dev
# Admin panel
pnpm admin:dev
# Public player
pnpm player:dev- π Complete Setup Guide
- π³ Docker Deployment
- βοΈ Production Deployment
- π§ Environment Configuration
- ποΈ Architecture Overview
- π Data Flow
- π‘ Streaming Setup Guide
- π¨ Design System
- π§ͺ Testing
Navigate to http://localhost:3001/stream-control to access the stream control interface.
All streaming operations are available via REST API at http://localhost:6970/api/stream/:
| Method | Endpoint | Description |
|---|---|---|
POST |
/telegram/start |
Start Telegram stream |
POST |
/telegram/stop |
Stop Telegram stream |
POST |
/telegram/restart |
Restart Telegram stream |
GET |
/telegram/config |
Get Telegram configuration |
PUT |
/telegram/config |
Update Telegram configuration |
POST |
/rtmp/start |
Start RTMP server |
POST |
/rtmp/stop |
Stop RTMP server |
POST |
/rtmp/restart |
Restart RTMP server |
GET |
/rtmp/config |
Get RTMP configuration |
PUT |
/rtmp/config |
Update RTMP configuration |
| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Get complete monitoring data |
GET |
/health |
Get system health overview |
GET |
/telegram |
Get Telegram service statistics |
GET |
/rtmp |
Get RTMP service statistics |
GET |
/metrics/:service |
Get metrics for specific service |
GET |
/logs |
Get system logs |
GET |
/logs/:service |
Get logs for specific service |
- Docker-based RTMP streaming server
- Accepts RTMP input streams
- Provides HLS output for web playback
- Configurable stream keys and URLs
- Perfect for live streaming from external sources
- Stream to Telegram channels via PM2 daemon
- Automatic stream management
- Configuration-based setup
- Error handling and recovery
- Perfect for broadcasting to Telegram audiences
Each application has its own environment configuration:
- Wave Backend:
apps/wave/.env - Admin Panel:
apps/admin/.env - Player:
apps/player/.env
- Audio Tracks:
data/audio-tracks.json - Streaming Config:
data/streaming-config.json - Telegram Config:
data/telegram-config.json
- Wave Server:
logs/wave.log - Telegram Stream:
logs/telegram-stream.log - RTMP Server: Docker container logs
Error: ENOENT: no such file or directory, posix_spawn 'ffmpeg'
Solution: Install FFmpeg:
# Ubuntu/Debian
sudo apt update && sudo apt install ffmpeg
# macOS
brew install ffmpeg
# Verify installation
ffmpeg -versionError: Address already in use Solution: Check and kill processes using required ports:
# Check ports
sudo lsof -i :6970 # Wave API
sudo lsof -i :6971 # WebSocket
sudo lsof -i :3001 # Admin Panel
sudo lsof -i :1935 # RTMP Server
sudo lsof -i :8069 # HLS Output
# Kill process
sudo kill -9 <PID>Error: Telegram process keeps restarting Solution: Check configuration and dependencies:
# Check PM2 status
pm2 status
# Check Telegram stream logs
pm2 logs radio.telegram
# Restart Telegram service
pm2 restart radio.telegramError: RTMP server not responding Solution:
# Check Docker container
docker ps --filter "name=rtmp-server"
# Check container logs
docker logs rtmp-server
# Restart RTMP server
docker restart rtmp-server# Check all services status
pm2 status
pnpm wave:logs
# Check RTMP server
docker ps | grep rtmp-server
docker logs rtmp-server
# Check Telegram stream
pm2 logs radio.telegram --lines 50
# Check Wave backend
pm2 logs radio.wave --lines 50
# Test API endpoints
curl http://localhost:6970/health
curl http://localhost:6970/api/monitoring/
curl http://localhost:6970/api/stream/telegram/config
# Check FFmpeg installation
which ffmpeg
ffmpeg -versionEnsure services start in this order:
- Docker (RTMP server)
- Wave Backend (API server)
- Telegram Daemon (requires Wave backend and RTMP)
- Admin Panel (requires Wave backend)
- Frontend (requires Wave backend)
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Check the documentation in the
docs/folder - Review the troubleshooting section above
Built with β€οΈ for the radio streaming community