{"id":16351412,"url":"https://github.com/gabbhack/base-bot","last_synced_at":"2025-03-21T00:31:06.589Z","repository":{"id":152730890,"uuid":"590574634","full_name":"gabbhack/base-bot","owner":"gabbhack","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-10T20:51:58.000Z","size":402,"stargazers_count":6,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T19:12:17.805Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gabbhack.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}},"created_at":"2023-01-18T18:15:11.000Z","updated_at":"2025-01-26T12:19:20.000Z","dependencies_parsed_at":"2023-09-26T14:00:10.237Z","dependency_job_id":"6f2e32fa-0b9b-47b3-a7e3-9afd8c548b7d","html_url":"https://github.com/gabbhack/base-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabbhack%2Fbase-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabbhack%2Fbase-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabbhack%2Fbase-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabbhack%2Fbase-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabbhack","download_url":"https://codeload.github.com/gabbhack/base-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244717356,"owners_count":20498282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-11T01:09:20.825Z","updated_at":"2025-03-21T00:31:06.274Z","avatar_url":"https://github.com/gabbhack.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# some-bot\n## Copyleft\nThis template and this README.md are (un)licensed under the terms of [Unlicense](https://unlicense.org/).\n## Before start\n1. Change project name in `pyproject.toml`, `Makefile` and `README.md` files.\n2. Change default i18n language in `Makefile` file.\n## Requirements for dev environment\n1. `Git`\n2. `Makefile`\n3. `Python 3.11`\n4. `Poetry`\n5. `EdgeDB`\n### Optional\n1. `Docker`\n2. `docker-compose`\n## Project structure\n- `app` - main application directory.\n- `app/settings.py` - settings file; all values are taken from the environment variables.\n- `app/filters` - filters for routers and handlers.\n- `app/routers` - aiogram routers.\n- `app/routers/main.py` - main router, includes all other routers.\n- `app/models` - database models.\n- `app/middlewares` - aiogram middlewares.\n- `app/setup` - functions that will be called on startup.\n- `app/setup/setup.py` - main on startup function, calls all other functions.\n- `app/__main__.py` - main file, starts bot.\n- `scripts/run.sh` - Docker entrypoint; makes migrations and starts bot.\n## Settings\n### Linters\nThis template uses rather strict linter settings. Please configure the linters as you wish.\n- mypy - `mypy.ini`\n- ruff - `pyproject.toml#tool.ruff` and `pyproject.toml#tool.ruff.mccabe`\n- black - `pyproject.toml#tool.black`\n### Runtime\nThe bot is configured using environment variables.\nPossible environment variables are described in the `example.env` file.\n### I18n\nBy default, the bot uses user language information from Telegram.\nIf you need to implement more complex logic, configure i18n middleware in `app/setup/i18n.py`.\n\nMore on https://docs.aiogram.dev/en/dev-3.x/utils/i18n.html\n### Storage\nBy default, the bot uses `MemoryStorage` and `SimpleEventIsolation`.\nPlease configure storage in `app/setup/storage.py`.\n\nMore on https://docs.aiogram.dev/en/dev-3.x/dispatcher/finite_state_machine/storages.html\n## Install dev environment\nRun `make install`.\nThis command will\n1. Install all dependencies via `poetry`\n2. Setup `pre-commit`\n3. Init `i18n` stuff.\n4. Init `EdgeDB` project.\n5. **Init** Git repository and **create** first commit.\n\nYou can find other usefully commands via `make help` command.\n## Cases\n### Update translations\n1. Run `make text-update`.\n2. Translate new strings in `app/{YOUR_LOCALES_DIR}/{LANG}/LC_MESSAGES/messages.po`.\n3. Run `make text-compile`.\n### Add new language\n1. Run `text-create-language language=YOUR_LANGUAGE`.\n2. Translate strings in `app/{YOUR_LOCALES_DIR}/{LANG}/LC_MESSAGES/messages.po`.\n3. Run `make text-compile`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabbhack%2Fbase-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabbhack%2Fbase-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabbhack%2Fbase-bot/lists"}