Downloads · 30 days
0
wpbtvr/teleplay-backend
teleplay-backend is a machine learning model from wpbtvr. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
[](https://huggingface.co/spaces/wpbtvr/teleplay-backend)
Downloads · 30 days
0
Access
Public
Updated Jul 24, 2026
Repo size
1.8 MB
Likes
1
Public
Click a slice to open those files.
.js3.3 MB · 58%
From the Hugging Face model README
Stream your Telegram media files (videos, audio) to any browser or Android TV using multi-bot parallel streaming with intelligent caching.
Browser/TV App → Cloudflare Tunnel → FastAPI (uvicorn) → PyroTGFork clients → Telegram MTProto
↕
Sliding Window Cache (500MB RAM global)
↕
NVMe Disk Cache (13GB, 3h TTL)
| Component | Description |
|---|---|
| FastAPI backend | REST API for auth, file listing, streaming |
| 14 Telegram bots | 1 main bot + 13 helper bots for parallel chunk fetching |
| StreamCache | Position-aware sliding window: 300MB fwd + 100MB back per stream |
| CacheManager | Global 500MB RAM limit across all streams, spills to NVMe |
| Disk cache | All chunks persisted to NVMe (data/chunks/), 3h TTL, 13GB max |
| Status monitor | Live dashboard at monitor.aaruvi.space |
3GB ARM64, 15GB NVMe. Accessible via Cloudflare Tunnel:
| Domain | Service |
|---|---|
REDACTED_DOMAIN | TelePlay web player |
REDACTED_DOMAIN | opencode Web UI (debug) |
monitor.aaruvi.space | Status dashboard |
# HidenCloud runs: python /home/container/run.py
# Fresh git clone on every restart:
git clone https://github.com/Thirupathi-pirate/Aruvi-backend.git code/repo
.env:
TELEGRAM_API_ID=
TELEGRAM_API_HASH=
TELEGRAM_BOT_TOKEN=
TELEGRAM_STORAGE_CHANNEL_ID=
TELEGRAM_HELPER_BOT_TOKENS=token2,token3,...,token14
DATABASE_URL=postgresql+asyncpg://...
TUNNEL_TOKEN=
Daily exit at 3:30 AM IST — fresh IP on restart.
Deployed via Docker:
docker build -t aruvi-backend .
docker run -p 7860:7860 \
-e TELEGRAM_API_ID=... \
-e TELEGRAM_API_HASH=... \
-e TELEGRAM_BOT_TOKEN=... \
-e TELEGRAM_STORAGE_CHANNEL_ID=... \
aruvi-backend
Env vars specific to HF Spaces:
| Variable | Required | Notes |
|---|---|---|
CLOUDFLARE_WORKERS_TOKEN | no | Auto-deploys CF Worker proxy for api.telegram.org |
CLOUDFLARE_PROXY_URL | no | Pre-existing proxy URL (skip auto-setup) |
CLOUDFLARE_PROXY_SECRET | no | Shared secret for proxy auth |
APP_START_CMD | no | Default: uvicorn app.main:app --host 0.0.0.0 --port 7860 |
get_messages() to avoid cross-bot FILE_REFERENCE_INVALIDconcurrency None tuples on task queue signal workers to stopreconnect_client uses start() — gets new auth key on AuthKeyUnregistered, not just connect()MIT