streamtg / README.md
dragonxd1's picture
Initial TGStream project: FastAPI backend + React frontend with Telegram streaming
750d1ce
metadata
title: Streamtg
emoji: 🐠
colorFrom: purple
colorTo: blue
sdk: docker
pinned: false

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

TGStream

TGStream is a personal Telegram movie streaming web app. It lists videos from a private Telegram channel and streams them on demand in the browser using HTTP range requests.

Backend setup

  1. Create a Telegram API app and obtain API_ID and API_HASH.
  2. Generate a session string:
python backend/gen_session.py
  1. Copy the environment template and fill it:
copy backend\.env.example backend\.env
  1. Install backend dependencies:
pip install -r backend/requirements.txt
  1. Run the API server:
uvicorn backend.main:app --reload

Frontend setup

cd frontend
npm install
npm run dev

The frontend expects the backend at http://localhost:8000 by default. Update the Config bar if you run it elsewhere.