A Telegram bot for managing personal finances, including income tracking, expense logging, category management, statistics, and more. It supports multilingual features and uses both MongoDB and Redis for data management and caching.
.
├── app.py # Entry point
├── config/ # Configuration files
├── database/ # Database models and integrations (MongoDB, Redis)
├── telegram_bot/ # Bot logic: handlers, filters, keyboards, localization, etc.
├── tests/ # Unit tests
├── example.env # Example environment variables
├── requirements.txt # Python dependencies
└── README.md
git clone https://github.com/Neliz3/counter_bot.git
cd counter_botpython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtCopy .env from the example:
cp example.env .envEdit .env and fill in the required values (e.g., BOT_TOKEN, MONGO_URI, REDIS_URL, etc.).
python app.py- Python 3.10+
- MongoDB – persistent data storage
- Redis – caching and user state management
- aiogram – asynchronous Telegram bot framework
- pytest – for testing
| Command | Description |
|---|---|
/start |
Starts the bot and initializes user session |
/add_income |
Add a new income entry |
/add_spending |
Add a new expense |
/categories |
Manage and view spending/income categories |
/statistics |
View financial statistics |
/cancel |
Cancel the current action |
pytest tests/- Create and manage recurring or scheduled income types (e.g. salary, passive income).
- Notifications or visual indicators when spending exceeds a budgeted amount.
- Modify the most recent spending or income transaction for quick corrections.