Enterprise-grade video transcoding platform with real-time monitoring. Designed for high-performance servers running 80-120 simultaneous channels.
- Docker & Docker Compose
- Node.js 20+ (for local development)
- Go 1.22+ (for local development)
- Start with Docker Compose:
cd docker
docker-compose -f docker-compose.local.yml up -d- Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
- PostgreSQL: localhost:5432
- Redis: localhost:6379
- Default credentials (local development only):
- Email:
admin@cashbacktv.local - Password:
admin123
Backend:
cd backend
go mod download
go run cmd/server/main.goFrontend:
cd frontend
npm install
npm run devcashbacktv.live/
├── backend/ # Go API (Clean Architecture)
│ ├── cmd/server/ # Entry point
│ ├── internal/
│ │ ├── domain/ # Business entities
│ │ ├── application/ # Use cases
│ │ ├── infrastructure/# External implementations
│ │ └── interfaces/ # HTTP handlers
│ └── migrations/ # Database migrations
│
├── frontend/ # Next.js 14 + shadcn/ui
│ ├── app/ # App Router pages
│ ├── components/ # React components
│ └── lib/ # Utilities & API client
│
└── docker/ # Docker configurations
├── nginx/ # Nginx configs
└── docker-compose.*.yml
| Layer | Technology |
|---|---|
| Frontend | Next.js 14, React 18, shadcn/ui, Tailwind CSS |
| Backend | Go, Fiber, Clean Architecture |
| Database | PostgreSQL 16, Redis 7 |
| Transcoding | FFmpeg |
| Container | Docker, Docker Compose |
| Proxy | Nginx (SSL, HLS delivery) |
POST /api/v1/auth/login- LoginPOST /api/v1/auth/logout- LogoutPOST /api/v1/auth/refresh- Refresh tokenGET /api/v1/auth/me- Current user
GET /api/v1/channels- List all channelsPOST /api/v1/channels- Create channelGET /api/v1/channels/:id- Get channelPUT /api/v1/channels/:id- Update channelDELETE /api/v1/channels/:id- Delete channelPOST /api/v1/channels/:id/start- Start transcodingPOST /api/v1/channels/:id/stop- Stop transcodingPOST /api/v1/channels/:id/restart- Restart transcodingGET /api/v1/channels/:id/metrics- Get metrics
Environment variables for backend:
| Variable | Default | Description |
|---|---|---|
SERVER_PORT |
8080 | API server port |
DATABASE_HOST |
localhost | PostgreSQL host |
DATABASE_PORT |
5432 | PostgreSQL port |
DATABASE_USER |
cashbacktv | Database user |
DATABASE_PASSWORD |
cashbacktv | Database password |
REDIS_HOST |
localhost | Redis host |
JWT_SECRET |
- | JWT signing secret |
STORAGE_HLS_PATH |
/var/lib/cashbacktv/streams | HLS output path |
For Dual Intel Xeon Gold 6152 (44 cores / 88 threads, 256GB RAM):
| Channels | CPU Usage | Memory | Bandwidth |
|---|---|---|---|
| 50 | 30-40% | 100GB | 250 Mbps |
| 80 | 50-60% | 160GB | 400 Mbps |
| 100 | 60-75% | 200GB | 500 Mbps |
| 120 | 75-90% | 240GB | 600 Mbps |
-
Update environment variables in
.env -
Setup SSL certificates for both domains:
# For main domain
certbot certonly --standalone -d cashbacktv.live -d www.cashbacktv.live
# For CDN domain
certbot certonly --standalone -d cdn.cashbacktv.live- Start production stack:
cd docker
docker-compose -f docker-compose.prod.yml up -d- Domain Configuration:
- Main domain:
cashbacktv.live- Frontend and API - CDN domain:
cdn.cashbacktv.live- HLS streaming content only
Note: Make sure DNS records are configured:
cashbacktv.live→ Server IPwww.cashbacktv.live→ Server IPcdn.cashbacktv.live→ Server IP (or CDN provider)
MIT License