A robust real-time video streaming platform built with WebRTC, React, and Socket.IO, featuring comprehensive development tools and infrastructure automation.
The application consists of four main components:
- Nginx: Reverse proxy and SSL termination
- Web App: React frontend application
- API Server: Node.js/Express backend server
graph TD
Client --> Nginx
Nginx --> WebApp
Nginx --> Server
WebApp --> Server[API/WebSocket Server]
- Live Video Broadcasting: Create rooms and broadcast video streams
- Multiple Viewer Support: Multiple users can join a room and view broadcasts
- Real-time Communication: Built on WebRTC for low-latency streaming
- Mobile-Optimized: 9:16 aspect ratio perfect for mobile/vertical video
- Picture-in-Picture: Support for PiP mode while broadcasting
- Robust Error Handling: Comprehensive error logging and management
- Health Monitoring: Built-in health check endpoints
- Graceful Shutdown: Proper cleanup of resources on server shutdown
- Database Migrations: Automated database schema management
- Seeding Support: Development data seeding
- Docker and Docker Compose
- Make
- Git
- Modern web browser with WebRTC support
- Docker: 4GB+ memory allocation
- Available ports: 443, 8000, 9222, 9229, 27017
- Storage: 10GB+ recommended
- Clone the repository:
git clone <repository-url>
cd <project-directory>
- Start development environment:
make up
Access to address https://0.0.0.0 in browser
- View logs:
make logs SERVICE=webapp # or server
# Start development environment
make up
# Start production environment
make up ENV=production
# Stop environment
make down
# Restart specific service
make restart SERVICE=webapp
# View logs
make logs SERVICE=server
# Run all tests
make test-all
# Run specific test suites
make run-unit-tests
# Run linters
make lint
# Shell access to containers
make shell SERVICE=webapp
# View running containers
make ps
# Clean up resources
make prune
- Configure environment:
cp .env.example .env
# Edit .env with production values
- Deploy:
make up ENV=production
# Initialize Terraform
make tf-init
# Plan changes
make tf-plan
# Apply changes
make tf-apply
# Destroy infrastructure
make tf-destroy
# Access Terraform shell
make tf-shell
- Unit Tests
make run-unit-tests
NODE_ENV=development|production
NODE_ENV=development|production
PORT=3001
HOST=0.0.0.0
LOG_LEVEL=debug|info
- Logs:
make logs SERVICE=<service-name>
- Health Checks: Automated monitoring for all services
- Chrome DevTools: Port 9222
- Node.js Debugger: Port 9229
- Picture-in-Picture aspect ratio may not be preserved in all browsers
- STUN server is using Google's public server (consider using your own TURN server for production)
- Browser support for WebRTC features may vary
For a complete list of available commands:
make help
Output includes:
- Docker Compose commands
- Application commands
- Terraform commands
- Utility commands
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Run tests (
make test-all
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
For issues and feature requests, please open an issue in the GitHub repository.