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 |
| Domain | Service |
|---|---|
REDACTED_DOMAIN | TelePlay web player |
REDACTED_DOMAIN | opencode Web UI (debug) |
monitor.aaruvi.space | Status dashboard |
1# HidenCloud runs: python /home/container/run.py
2# Fresh git clone on every restart:
3git 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=1docker build -t aruvi-backend .
2docker run -p 7860:7860 \
3 -e TELEGRAM_API_ID=... \
4 -e TELEGRAM_API_HASH=... \
5 -e TELEGRAM_BOT_TOKEN=... \
6 -e TELEGRAM_STORAGE_CHANNEL_ID=... \
7 aruvi-backend| 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()