a49f67bbff1021a3e4605d07582f63ae0430f604
Full reference covering: - Architecture and design decisions - PostgreSQL schema (all tables) - Stream engine internals (ProviderPool, BroadcastGroup, ffmpeg flags) - Xtream Codes API endpoints - Admin dashboard features and WebSocket protocol - EPG and Jellyfin integration - Nginx + systemd configs - Environment variables and Python dependencies - Step-by-step reinstall guide - Common operations (update, logs, Redis/Postgres inspection) - Lessons learned (ffmpeg flags to avoid, health thresholds, zapping logic) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
KiraTV
Sistema de proxy y gestión IPTV con soporte multiusuario y fan-out de streams.
Stack
- Backend: Python 3.13 + FastAPI + asyncio
- Base de datos: PostgreSQL 17 + SQLAlchemy 2 + Alembic
- Cache / estado: Redis 8
- Frontend: React 18 + Vite + TailwindCSS
- Proxy inverso: Nginx
Características
- Compatible con API Xtream Codes (TiviMate, Smarters, IPTV Pro…)
- Fan-out de streams: N usuarios ven el mismo canal → 1 solo slot del proveedor
- Soporte multi-cuenta del mismo proveedor con balanceo de slots
- Catálogos personalizados por usuario (live, VOD, series)
- Integración Jellyfin: biblioteca local como categorías KiraTV
- EPG XMLTV con merge por tvg-id
- Dashboard en tiempo real (WebSocket): qué usuario ve qué canal y qué slot usa
- Reconexión automática con detección de stall y A/V sync garantizado
Instalación
cp .env.example /opt/kirastream/.env
# Editar .env con tus valores reales
cd /opt/kirastream/frontend
npm install && npm run build
cd /opt/kirastream
python3 -m venv venv
venv/bin/pip install -r backend/requirements.txt
venv/bin/python -m alembic upgrade head
Configuración
Ver .env.example para todas las variables disponibles.
La configuración de Nginx está en nginx/kirastream.conf.
El servicio systemd está en kirastream.service.
Description
Languages
Python
55.2%
TypeScript
44.1%
Shell
0.3%
HTML
0.2%
JavaScript
0.1%