MVC Architecture with Aiogram
Telegram Base Bot is a foundational architectural skeleton for building Telegram bots using Python 3.11 and the Aiogram framework. This project follows the Model-View-Controller (MVC) design pattern, providing a structured and modular approach to developing feature-rich Telegram bots.
- MVC Architecture: Organize your bot's code in a clean and maintainable structure, separating concerns into models, views, and controllers.
- Aiogram Framework: Leverage the power of Aiogram, a asynchronous Python framework for Telegram Bot API, to streamline bot development.
- Modular Design: Easily extend and customize your bot by adding new features or modifying existing components without affecting the entire codebase.
Follow these steps to set up your Telegram Base Bot.
Clone the Repository:
git clone https://github.com/your_username/telegram_base_bot.git
Configure your Bot Token:
Create a new bot on Telegram and obtain the API token.
https://t.me/BotFather
To add the bot key to the .env file:
# bot api key export BOT_TOKEN=''
Set environment variables:
source .env
Install Dependencies:
pip install --upgrade -r requirements.txt
Run the Bot:
python run.py
Build and run the Docker Compose services:
docker-compose -f docker-compose.dev.yml up --build
telegram_base_bot/ │ ├── src/ │ ├── __init__.py │ ├── keyboards.py | ├── messages.py | ├── models.py | ├── views.py │ └── ... │ ├── static/ │ └── ... | ├── tests/ │ └── ... | ├── .env ├── requirements.txt ├── Dockerfile ├── docker-compose.yml ├── run.py
This project is licensed under the MIT License