PyTunnel VPN Bot
PyTunnel VPN Bot is a comprehensive Telegram bot system for managing a VPN service, built with Python and aiogram 3.x. The system consists of two separate bots: an Admin Bot for service management and a User Bot for customer interactions. The Admin Bot provides a complete management panel with system statistics, order management (approve, reject, deliver), plan management (add, edit, delete, pricing), wallet management, tutorial management, and admin management capabilities. The User Bot allows customers to browse and select VPN plans, process payments (card, cash, gift card), manage their wallet (balance, transactions, deposits), access installation tutorials for different platforms (Android, iOS, Windows, macOS), and request wallet deposits. The system features a modular architecture with shared database operations, authentication middleware, role-based access control (admin and super_admin), and a complete order workflow from pending to approved to delivered.
Year
2025
Role
Full Stack Developer
Technologies
Python, aiogram 3.x, SQLite, Telegram Bot API, Modular Architecture, Role-Based Access Control, Payment Processing, Wallet System

Challenge
Creating a comprehensive dual-bot system for VPN service management that handles both administrative tasks and customer interactions. The challenge was to build a modular architecture that separates admin and user functionality while sharing core database operations, implement secure authentication, manage complex order workflows, and provide a seamless user experience for both admins and customers.
Solution
Developed a modular architecture with shared components for database operations, models, keyboards, middleware, and utilities. Implemented two separate bot instances (admin and user) that share the same database but have distinct interfaces and permissions. Created a robust authentication middleware system with role-based access control (admin and super_admin roles). Built a complete order management system with status tracking (pending → approved → delivered/rejected), wallet system with transaction logging, plan management with flexible pricing, and tutorial management for multiple platforms. The system uses SQLite for data persistence and includes comprehensive error handling and Persian language support.
Results
Dual-bot system with separate admin and user interfaces
Complete order management workflow with status tracking
Wallet system with balance, transactions, and deposit requests
Flexible plan management with pricing and duration control
Role-based authentication with admin and super_admin roles
Multi-platform installation tutorials (Android, iOS, Windows, macOS)
Modular architecture with shared components
Production-ready with comprehensive error handling