Telegram bot on AIOgram, SQLAlchemy, Alembic and PostgreSQL for financial control
financial_telegram_bot/
├── migrations/ # default alembic folder
├── src/
│ ├── common/
│ │ ├── callback_factory/
│ │ │ ├── __init__.py
│ │ │ └── expense.py
│ │ ├── dto/
│ │ │ ├── __init__.py
│ │ │ ├── expense.py
│ │ │ └── user.py
│ │ ├── fsm/
│ │ │ ├── __init__.py
│ │ │ ├── ad_filling_state.py
│ │ │ └── expense_filling_state.py
│ │ ├── interfaces/
│ │ │ ├── __init__.py
│ │ │ ├── abstract_repository.py
│ │ │ └── abstract_uow.py
│ │ ├── keyboards/
│ │ │ ├── __init__.py
│ │ │ ├── command_menu.py
│ │ │ └── keyboard_generator.py
│ │ ├── markers/
│ │ │ ├── __init__.py
│ │ │ └── gateway.py
│ │ ├── __init__.py
│ │ └── types.py
│ ├── core/
│ │ ├── __init__.py
│ │ └── settings.py
│ ├── database/
│ │ ├── core/
│ │ │ ├── __init__.py
│ │ │ ├── connection.py
│ │ │ ├── gateway.py
│ │ │ └── sqlalchemy_uow.py
│ │ ├── models/
│ │ │ ├── base/
│ │ │ │ ├── mixins/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── with_time.py
│ │ │ │ ├── __init__.py
│ │ │ │ └── core.py
│ │ │ ├── __init__.py
│ │ │ ├── expense.py
│ │ │ └── user.py
│ │ ├── repositories/
│ │ │ ├── __init__.py
│ │ │ ├── expense_repository.py
│ │ │ ├── sqlalchemy_repository.py
│ │ │ └── user_repository.py
│ │ └── __init__.py
│ ├── filters/
│ │ ├── __init__.py
│ │ └── is_admin.py
│ ├── routers/
│ │ ├── admin/
│ │ │ ├── commands/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── ad.py
│ │ │ │ └── change_admin_status.py
│ │ │ ├── messages/
│ │ │ │ ├── __init__.py
│ │ │ │ └── ad_filling.py
│ │ │ ├── __init__.py
│ │ │ └── router.py
│ │ ├── client/
│ │ │ ├── callbacks/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── actions_on_finances.py
│ │ │ │ ├── add_expense.py
│ │ │ │ ├── remove_expense.py
│ │ │ │ └── view_expense.py
│ │ │ ├── commands/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── action.py
│ │ │ │ ├── help.py
│ │ │ │ ├── profile.py
│ │ │ │ └── start.py
│ │ │ ├── messages/
│ │ │ │ ├── __init__.py
│ │ │ │ └── expense_filling.py
│ │ │ ├── my_chat_member/
│ │ │ │ ├── __init__.py
│ │ │ │ └── member_status_changed.py
│ │ │ ├── __init__.py
│ │ │ └── router.py
│ │ ├── default/
│ │ │ ├── callback/
│ │ │ │ ├── __init__.py
│ │ │ │ └── other.py
│ │ │ ├── messages/
│ │ │ │ ├── __init__.py
│ │ │ │ └── other.py
│ │ │ ├── __init__.py
│ │ │ └── router.py
│ │ └── __init__.py
│ ├── utils/
│ │ ├── lexicon/
│ │ │ ├── __init__.py
│ │ │ ├── admin.py
│ │ │ ├── client.py
│ │ │ └── command.py
│ │ ├── __init__.py
│ │ └── send_ad.py
│ ├── __init__.py
│ └── __main__.py
├── .dockerignore
├── .env_example
├── .flake8
├── .gitignore
├── Dockerfile
├── alembic.ini
├── docker-compose.yml
├── requirements.txt
└── mypy.ini
git clone https://github.com/mulphers/financial_telegram_bot.git
Rename .env_example to .env and fill in
BOT_TOKEN=your_token
DATABASE_URI=sqlite+aiosqlite:///{} || postgresql+asyncpg://{}
DATABASE_NAME=your_db_name
DATABASE_HOST=your_db_host || None
DATABASE_PORT=your_db_port || None
DATABASE_USER=your_db_user || None
DATABASE_PASSWORD=your_db_password || None
Go to your working directory and enter the command
docker-compose up
You can manage the database by following the link
http://127.0.0.1:8080