todo-app-tg-bot v1.0.0

Asynchronous task manager Telegram bot

Create, edit, delete and track your tasks. Can be deployed even on a phone using Termux.

Python Telegram Bot aiogram Todo MariaDB

todo-app-tg-bot — asynchronous task manager Telegram bot. TODO app (task management app) is a simple app that allows users to create, edit, delete and track their tasks.

This bot can be deployed even on a phone using Termux.

  • Architectural code refactoring
  • The code has been rewritten using the MVC (Model-View-Controller) architecture
  • Bugs fixed
  • The user interface has been simplified and improved
  • The structure and readability of the code has been improved, making it easier to maintain and extend functionality (SOLID, DRY, MVC)

  • Adding comments to tasks
  • Adding subtasks to tasks

1. Clone and Get Token:

# Clone the repository
git clone https://github.com/smartlegionlab/todo-app-tg-bot.git
cd todo-app-tg-bot

# Create a bot and get a token using: @BotFather

2. MariaDB Setup:

sudo mysql -u root -p

CREATE USER 'USER_NAME'@'localhost' IDENTIFIED BY 'PASSWORD';
CREATE DATABASE database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES ON database_name.* TO 'USER_NAME'@'localhost';
FLUSH PRIVILEGES;

3. Create .env File:

API_TOKEN="[token]"
DB_USER="[db_user]"
DB_NAME="[db_name]"
DB_PASSWORD="[password]"
DB_HOST="[host]"

4. Install and Run:

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python bot.py

Initial Termux Setup:

# Install Termux, then run:
termux-wake-lock
pkg update
pkg upgrade
pkg install termux-tools
pkg install python
pkg install python-pip
pkg install git
pkg install vim
pkg install mariadb

# The problem with installing aiogram is solved by installing rust:
pkg install rust

MariaDB on Termux:

mysql_install_db
mysqld_safe &
mysql -u root -p

ALTER USER 'root'@'localhost' IDENTIFIED BY 'your_password';
CREATE USER 'USER_NAME'@'localhost' IDENTIFIED BY 'PASSWORD';
CREATE DATABASE database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES ON database_name.* TO 'USER_NAME'@'localhost';
FLUSH PRIVILEGES;

Clone and Run:

git clone https://github.com/smartlegionlab/todo-app-tg-bot.git
cd todo-app-tg-bot

# Create .env file with your credentials

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python bot.py

> Your ToDo Telegram bot now runs directly on your Android phone! No server required.

By using this software, you agree to the full disclaimer terms.

Software provided "AS IS" without warranty. You assume all risks.

Full legal disclaimer: See DISCLAIMER.md

License: BSD 3-Clause License

Links


Created by Alexander Suvorov

Copyright © 2026, Alexander Suvorov