explaingit

gongyichuren/tg-watchbot

33Python

TLDR

tg-watchbot is a small Python service that bundles three things into one tool: a two-way Telegram customer-service bot, a background watcher for websites and RSS feeds, and a web admin panel that ties both pieces together.

Mindmap

A visual breakdown will appear here once this repo is fully enriched.

In plain English

tg-watchbot is a small Python service that bundles three things into one tool: a two-way Telegram customer-service bot, a background watcher for websites and RSS feeds, and a web admin panel that ties both pieces together. It is meant to run on a personal server, a small home machine behind NAT, or a cheap VPS, with systemd or Docker keeping it alive. The whole project is a single application file driving everything. On the Telegram side, regular users talk privately to the bot, and every message is first saved to a SQLite database and then forwarded to one or more admins, up to three admin chat IDs. Admins can reply by simply replying to the forwarded message, or by using explicit commands like /reply, /sendpic, /block, /unblock, /note, and /who. There is a built-in spam filter with keyword lists, automatic blocking, and per-user rate limits. The bot uses the official Telegram Bot API, not a userbot. The monitor side checks RSS or Atom feeds and also scrapes web pages with CSS selectors, watching for keyword hits, new entries, price changes, or stock changes. Each monitor can choose to push alerts to Telegram, or only record them to the web panel's push history. The README notes a 60-second minimum interval and a built-in deduplication step so the same item is not pushed twice. The web panel runs on port 8765 with a real login page and HttpOnly session cookies rather than browser basic auth. From there an operator can add, edit, delete, and preview monitors, edit the YAML config, manage users, send proactive messages, view a full two-way inbox, set quick reply templates, import or export config.yaml, and check logs and a /health endpoint. Settings for the bot token, admin IDs, and panel account are entered through the panel itself, with a restart needed after saving. Installation is documented three ways: a Docker Compose one-liner, a manual Python virtualenv flow, and a systemd deployment with an optional Cloudflare Tunnel plus Zero Trust Access for exposing the panel safely. The project uses aiogram, FastAPI, Uvicorn, APScheduler, httpx, feedparser, BeautifulSoup, PyYAML, python-dotenv, and the standard library sqlite3 module.

Open on GitHub → Explain another repo

Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.