Bot · Automation Open source

VPN Sales Bot

ربات فروش VPN

A platform for selling V2Ray subscriptions through Telegram, with a customer bot, an admin bot and a full Persian web dashboard. I built it for myself in about six weeks, and the code is open source.

All business logic lives in one shared service layer in the FastAPI backend, so the bots, the REST API and the background workers use a single source of truth. Data is stored in PostgreSQL through async SQLAlchemy with Alembic migrations, and Celery on Redis handles background work such as talking to the VPN panels (Marzban, X-UI) and payment gateways.

The customer and admin bots are written with aiogram 3, and the web dashboard is Next.js, TypeScript and Tailwind. The whole stack runs on Docker Compose, and a one-command installer sets up everything on an Ubuntu server: Docker, configuration, migrations, Nginx with free SSL, nightly backups and the first admin user.

Key features

  • Customer bot for buying and renewing subscriptions
  • Admin bot for managing everything from Telegram
  • Persian RTL web dashboard in Next.js
  • One shared service layer for bots, API and workers
  • Integration with Marzban and X-UI panels and payment gateways
  • Background and scheduled jobs with Celery and Redis
  • One-command install with Docker, Nginx, SSL and nightly backups

Technologies

PythonFastAPISQLAlchemy (async)Alembicaiogram 3PostgreSQLRedisCeleryNext.jsTypeScriptTailwindDocker ComposeNginx

My role

Full-stack design & development

This project is open source; the code is available on GitHub.

Screenshots

Web admin panel of the VPN sales bot, a full-stack project by Sohaib Basharat
Web admin panel of the VPN sales bot, a full-stack project by Sohaib Basharat
VPN sales Telegram bot and user subscription management
VPN sales Telegram bot and user subscription management
Automated alerts and stock management in the Python VPN bot
Automated alerts and stock management in the Python VPN bot