Skip to content

VeryBigSad/telegram-bot-template

Repository files navigation

πŸš€ Ultimate Telegram Bot Template

A supercharged, production-ready template for building scalable Telegram bots with all the bells and whistles!

✨ Features

  • πŸ€– 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

πŸ› οΈ Tech Stack

  • 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

πŸš€ Quick Start

  1. Clone the repository:
git clone https://github.com/verybigsad/telegram-bot-template.git
  1. Install dependencies:
poetry install
  1. Set up your environment variables:
cp app/.env.example app/.env
  1. Run the bot in polling mode:
python start-polling.py

πŸ”§ Configuration

soon to be here πŸ‘€

πŸ“ Project Structure

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

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

⭐ Show Your Support

Give a ⭐️ if this project helped you!


Built with ❀️ and β˜• by verybigsad.

About

Telegram bot template that you'd wanna use.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published