A supercharged, production-ready template for building scalable Telegram bots with all the bells and whistles!
- 🤖 Aiogram 3 - Built with aiogram for elegant bot handlers
- ⚡ FastAPI Integration - Lightning-fast API endpoints with automatic OpenAPI docs
- 🔥 Webhook Support - Production-ready webhook handling for reliable bot updates
- 🗄️ Database Ready - Pre-configured database integration with Tortoise ORM
- 📡 Redis Support - Built-in Redis for caching and real-time data handling
- 🌍 i18n Support - Multi-language support using Babel
- 🔐 Environment Management - Secure configuration using Pydantic settings
- 📊 Logging & Monitoring - Comprehensive logging setup with rotating file handlers
- 🐳 Docker Support - Containerized for easy deployment and scaling
- 🧪 Health Checks - Built-in health check endpoints for monitoring
- FastAPI - Modern API framework
- aiogram - Powerful Telegram Bot framework
- Tortoise ORM - Easy async ORM for Python
- Redis - In-memory data store
- Babel - Internationalization framework
- Docker - Containerization
- Poetry - Dependency management
- Clone the repository:
git clone https://github.com/verybigsad/telegram-bot-template.git
- Install dependencies:
poetry install
- Set up your environment variables:
cp app/.env.example app/.env
- Run the bot in polling mode:
python start-polling.py
soon to be here 👀
app/
├── api/ # FastAPI routes and schemas
├── core/ # Core functionality
│ ├── db/ # Database models and config
│ ├── redis/ # Redis integration
├── locales/ # Locales for i18n
└── bot/ # Telegram bot handlers and logic
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Give a ⭐️ if this project helped you!
Built with ❤️ and ☕ by verybigsad.