{"id":29542493,"url":"https://github.com/the-asind/budu_dolzhen_bot","last_synced_at":"2026-05-15T12:34:01.482Z","repository":{"id":302871347,"uuid":"1013362118","full_name":"the-asind/budu_dolzhen_bot","owner":"the-asind","description":"Telegram bot for safe, simple debt tracking between friends. Log, confirm, settle, and keep your balances up to date — all within chat.","archived":false,"fork":false,"pushed_at":"2025-08-06T11:57:02.000Z","size":379,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-06T13:39:52.580Z","etag":null,"topics":["aiogram","debt-manager","finance-management","friends","python","sqlite","telegram-bot"],"latest_commit_sha":null,"homepage":"https://budu_dolzhen_bot.t.me","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/the-asind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-03T19:16:51.000Z","updated_at":"2025-08-06T11:57:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd0e31e3-cd3b-44b3-a4cf-3edd9b06d849","html_url":"https://github.com/the-asind/budu_dolzhen_bot","commit_stats":null,"previous_names":["the-asind/budu_dolzhen_bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/the-asind/budu_dolzhen_bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-asind%2Fbudu_dolzhen_bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-asind%2Fbudu_dolzhen_bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-asind%2Fbudu_dolzhen_bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-asind%2Fbudu_dolzhen_bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/the-asind","download_url":"https://codeload.github.com/the-asind/budu_dolzhen_bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-asind%2Fbudu_dolzhen_bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33067356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aiogram","debt-manager","finance-management","friends","python","sqlite","telegram-bot"],"created_at":"2025-07-17T11:03:06.429Z","updated_at":"2026-05-15T12:34:01.449Z","avatar_url":"https://github.com/the-asind.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Budu Dolzhen Bot\n\nBudu Dolzhen Bot (\"Буду Должен\") is a Telegram bot for tracking shared expenses and debts between friends or group members. It parses free‑form messages, keeps confirmations transparent, and reminds participants about outstanding balances.\n\n## Key Features\n\n- **Natural language input** – Record debts using short messages like `@user1 1200 for coffee` or split amounts between several users: `я @user1 @user2 3000/3 торт`.\n- **Arithmetic expressions** – Amounts can include basic `+`, `-`, `*` and `/` expressions.\n- **Confirmation workflow** – Debtors confirm each entry via inline buttons to avoid disputes.\n- **Payment tracking** – Register partial or full repayments with two‑sided confirmation.\n- **Reminders and reports** – Weekly summaries and optional payday notifications via APScheduler.\n- **Settings menu** – Manage contact details, reminder days and trusted users through an FSM‑driven interface.\n- **Localization** – English and Russian message catalogues are included.\n- **Repository pattern** – All data access is routed through asynchronous repositories using SQLite.\n\n## Project Structure\n\n```\nbot/              # Application package\n├─ core/          # Business logic: debt parsing, managers, notification service\n├─ db/            # Database models, repositories and connection pool\n├─ handlers/      # aiogram message and callback handlers\n├─ keyboards/     # Inline keyboard factories\n├─ locales/       # JSON translation files and i18n helpers\n├─ middlewares/   # User, logging and i18n middlewares\n├─ scheduler/     # Scheduled jobs (weekly reports, timeout checks)\n└─ utils/         # Validators and helpers\n```\nAdditional top‑level files:\n\n- `main.py` – Entry point that starts the bot and scheduler.\n- `docs/schema.sql` – Database schema used during initialization.\n- `Dockerfile` and `docker-compose.yml` – Container configuration.\n- `tests/` – Extensive pytest suite covering parsing, FSM flows and the scheduler.\n\n## Requirements\n\n- Python 3.12+\n- Telegram Bot API token from [@BotFather](https://t.me/BotFather)\n- (Optional) Docker and Docker Compose for containerized deployment\n\n## Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/your-username/budu_dolzhen_bot.git\ncd budu_dolzhen_bot\n\n# Create and activate a virtual environment\npython -m venv .venv\nsource .venv/bin/activate\n\n# Install runtime dependencies\npip install -r requirements.txt\n```\n\n### Environment configuration\n\nCreate a `.env` file in the project root with the following variables:\n\n```\nBOT_TOKEN=your_bot_token\nBOT_ADMIN_ID=123456789\nDATABASE_PATH=budu_dolzhen.db\nLOG_LEVEL=INFO\nSCHEDULER_TIMEZONE=UTC\n```\n\n`BOT_ADMIN_ID` is used for privileged commands and error notifications.\n\n## Running the bot\n\n### Locally\n\n```bash\npython main.py\n```\n\n### With Docker\n\n```bash\ndocker-compose up --build\n```\n\nThe container uses the same `.env` file and persists the SQLite database in the `data/` volume.\n\n## Usage basics\n\n- `/start` – Register with the bot and see onboarding instructions.\n- `/help` – Detailed help with examples and tips.\n- `/settings` – Open the profile settings menu (contact info, reminders, trusted users).\n- `/summary` – View active debts and pending payments awaiting your confirmation.\n- **Recording debts** – Mention users with an amount and optional description. Example:\n  `@alice @bob 900/3 dinner` – both users owe you 300 each.\n- **Marking payments** – Use `/pay @alice 1000` in a private chat with the bot to log a payment.\n\nThe bot works in private chats and groups; pending confirmations expire after 23 hours if not accepted.\n\n## Running tests\n\nDevelopment dependencies are listed in `requirements-dev.txt`.\nInstall them in your virtual environment and run:\n\n```bash\npip install -r requirements-dev.txt\npytest -q\n```\n\n## Contributing\n\nIssues and pull requests are welcome. Please ensure new features include tests and documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-asind%2Fbudu_dolzhen_bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-asind%2Fbudu_dolzhen_bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-asind%2Fbudu_dolzhen_bot/lists"}