{"id":26988885,"url":"https://github.com/arturboyun/aiogrambottemplate","last_synced_at":"2026-03-16T16:32:31.749Z","repository":{"id":45728459,"uuid":"282882659","full_name":"arturboyun/AiogramBotTemplate","owner":"arturboyun","description":"This is a template for easy start of bot development for Telegram","archived":false,"fork":false,"pushed_at":"2025-03-30T17:32:18.000Z","size":122,"stargazers_count":106,"open_issues_count":0,"forks_count":12,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T18:28:50.628Z","etag":null,"topics":["aiogram","aiogram-bot","aiogram-bot-template","aiogram-dialog","aiogram-template","aiogrambot","bot","dishka","docker","fastapi","python","ruff","sqlalchemy","telegram","telegram-bot","uv"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arturboyun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-07-27T11:50:31.000Z","updated_at":"2025-03-30T17:32:22.000Z","dependencies_parsed_at":"2025-02-17T00:20:33.578Z","dependency_job_id":"ace263ce-a83f-4526-8795-975cf5de84b7","html_url":"https://github.com/arturboyun/AiogramBotTemplate","commit_stats":null,"previous_names":["arturboyun/aiogrambottemplate"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturboyun%2FAiogramBotTemplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturboyun%2FAiogramBotTemplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturboyun%2FAiogramBotTemplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturboyun%2FAiogramBotTemplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arturboyun","download_url":"https://codeload.github.com/arturboyun/AiogramBotTemplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247073697,"owners_count":20879101,"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":["aiogram","aiogram-bot","aiogram-bot-template","aiogram-dialog","aiogram-template","aiogrambot","bot","dishka","docker","fastapi","python","ruff","sqlalchemy","telegram","telegram-bot","uv"],"created_at":"2025-04-03T20:29:10.365Z","updated_at":"2026-03-16T16:32:31.734Z","avatar_url":"https://github.com/arturboyun.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📋 Telegram Bot Template\nThis template provides clean start to create bot using aiogram.\n\n## 🛠 Stack\n- Aiogram\n- Aiogram Dialog\n- Dishka\n- Pydantic\n- FastAPI\n- ~~I18n~~ (TODO)\n- SQLAlchemy + asyncpg\n- Alembic\n- UV\n- Ruff\n- Docker\n- PostgreSQL\n- Redis\n\n\n## 🐳 Setup with Docker\n1. Create `.env` file from `.env.dist` and fill it.\n2. Create `password.txt` in `db` folder and fill it.\n3. Run docker `docker compose up --build -d`\n4. Run migrations with `docker compose exec -it db uv run alembic upgrade head`\n\n## 🐇 Setup for local start\n1. Create `.env` file from `.env.dist` and fill it.\n2. Create `password.txt` in `db` folder and fill it.\n3. Run `docker compose up --build -d db redis`\n4. Install dependencies with `uv sync`\n5. Create `.venv` with `uv venv --seed`\n6. Activate virtual environment with `source .venv/bin/activate`\n7. Run migrations with `alembic upgrade head`\n8. Run bot with `python -m bot`\n\n## 📎Start with webhook\n1. Set `USE_WEBHOOK` to True in .env\n2. Update `BOT_SECRET_TOKEN`\n3. Set `API_HOST` to your domain\n4. Update `ORIGINS` in `.env`\n5. Start bot with `python -m bot`\n\n## 🍀 For production\n`docker compose -f compose.yml -f compose.prod.yml up --build -d`\n\n## How To?\n\n### Run migrations\n```shell\nalembic upgrade head\n```\n\n### Generate new migration\n```shell\nalembic revision --autogenerate -m \"\u003cmigration_name\u003e\"\n```\n\n### Generate Secret Keys\nSome environment variables in the .env file have a default value of changethis.\n\nYou have to change them with a secret key, to generate secret keys you can run the following command:\n```shell\npython -c \"import secrets; print(secrets.token_urlsafe(32))\"\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farturboyun%2Faiogrambottemplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farturboyun%2Faiogrambottemplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farturboyun%2Faiogrambottemplate/lists"}