Back to home
ONLINE 10/2025 PRIVATE Personal

TK — Telegram Automation Platform

A SaaS platform to manage Telegram bots & accounts at scale, currently serving 100k+ members

PythonFastAPIMongoDBRedisTelethonNext.jsWeb3Cloudflare WorkersGrafana
0K+
Telegram members
0+
API modules
0
Service / Agent
0/7
Realtime sync

Overview

A large SaaS system for centrally managing many Telegram bots and accounts at once. A central backend (FastAPI + MongoDB + Redis + AWS S3) orchestrates the rule engine, broadcast, notifications, media/video processing and usage metering; self-hosted agents (bot, userbot, Cloudflare Worker) run on any VPS and sync in realtime with the backend over WebSocket. The system currently supports more than 100,000 members on Telegram.

Role: Author & maintainer — designed the architecture, central backend, self-host agents and dashboard

System architecture

> Interface
Dashboard
Next.js
Telegram
100k+ members
> Central Backend
FastAPI
28+ modules
WebSocket
realtime sync
> Data Infrastructure
MongoDB
Redis
AWS S3
> Distributed Agents (self-host)
Bot Agent
Userbot Agent
Telethon
Video Service
Cloudflare Worker
email
> Observability
Loki
Grafana
Reports

Modules & Services

Bots & Accounts

4
BotsBot AgentUser AccountsUserbot Agent

Rule Engine

3
Forward RulesReply RulesAI Rules

Messaging

5
BroadcastsConversationsChatsNotificationsPush

Email & Media

4
Email RoutingMediaFile CacheVideo Tools

Billing (Blockchain)

5
SubscriptionsCrypto PaymentsConnect WalletService AuthSettings

Observability

4
LogsAgent LogsReportsDashboard

Key features

Manage many Telegram bots and user accounts (Telethon) from one central dashboard
Rule engine: forward rules, reply rules, AI rules — synced in realtime to agents via WebSocket, HTTP fallback on disconnect
Self-hosted agents: run bots/userbots anywhere, multi-bot in one process to save RAM, auto-reconnect + heartbeat
Email routing via Cloudflare Email Routing + Cloudflare Worker to receive and process email
Broadcast / mass messaging plus a notification system (notifications + push)
Video cutting & processing, media managed with AWS S3 and file cache
On-chain billing: crypto payments via connect wallet (Web3), subscriptions & plan limits, usage metering via the service-auth API
Monitoring & observability with Loki + Grafana, agent logs, reports and a realtime dashboard

Highlights

Currently serving 100k+ members on Telegram
Distributed architecture: central backend + self-host agents synced in realtime over WebSocket
Central service-auth enforces plan limits / usage for every microservice, Redis cache 5 min
Self-host agents packaged with Docker, multi-bot per process, HTTP fallback on WS loss
Decentralized on-chain billing — crypto payments via connect wallet (Web3)
Lý Vĩnh Thái - Backend Developer & DevOps Engineer