{"id":45097148,"url":"https://github.com/ksilisk/telegram-bot-spring","last_synced_at":"2026-05-03T20:09:50.449Z","repository":{"id":319524405,"uuid":"1074347498","full_name":"ksilisk/telegram-bot-spring","owner":"ksilisk","description":"Telegram Bot Spring Boot Starter","archived":false,"fork":false,"pushed_at":"2026-02-14T18:54:59.000Z","size":313,"stargazers_count":28,"open_issues_count":5,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-15T02:55:33.300Z","etag":null,"topics":["java","spring-boot","spring-boot-starter","telegrambot"],"latest_commit_sha":null,"homepage":"","language":"Java","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/ksilisk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-11T16:03:46.000Z","updated_at":"2026-02-14T19:01:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"7be96b44-cdb6-4a61-9a6a-0b90fbd79056","html_url":"https://github.com/ksilisk/telegram-bot-spring","commit_stats":null,"previous_names":["ksilisk/telegram-bot-spring"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ksilisk/telegram-bot-spring","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksilisk%2Ftelegram-bot-spring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksilisk%2Ftelegram-bot-spring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksilisk%2Ftelegram-bot-spring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksilisk%2Ftelegram-bot-spring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ksilisk","download_url":"https://codeload.github.com/ksilisk/telegram-bot-spring/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksilisk%2Ftelegram-bot-spring/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29627798,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T18:02:07.722Z","status":"ssl_error","status_checked_at":"2026-02-19T18:01:46.144Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["java","spring-boot","spring-boot-starter","telegrambot"],"created_at":"2026-02-19T19:05:46.975Z","updated_at":"2026-05-03T20:09:50.439Z","avatar_url":"https://github.com/ksilisk.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Telegram Bot Spring Boot Starter**\n\nA modular Spring Boot framework for building Telegram bots on **Java 17** and Spring Boot ecosystem.\n\nThis project provides a structured, extensible foundation for Telegram bots that require clear routing, lifecycle management, transport abstraction, and optional observability.\n\n---\n\n## **Overview**\n\nThe framework is designed around a **transport-agnostic core pipeline** with explicit extension points.\n\nIt allows building anything from small bots to larger, long-lived applications without rewriting the architecture.\n\nThe project follows standard Spring Boot conventions and avoids hidden runtime magic.\n\n---\n\n## **Key characteristics**\n\n- Modular, layered architecture\n- Transport-independent core\n- Explicit update processing pipeline\n- Multiple delivery modes (long polling, webhook)\n- Pluggable HTTP client implementations\n- Optional metrics and observability\n- Spring Boot auto-configuration\n- Runnable example applications\n\n---\n\n## **Quick start**\n\n### **1. Add dependency**\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.ksilisk\u003c/groupId\u003e\n    \u003cartifactId\u003etelegram-bot-spring-boot-starter\u003c/artifactId\u003e\n    \u003cversion\u003e0.7.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nBy default, this enables **long polling** transport.\n\n---\n\n### **2. Configure bot token**\n\n```yaml\ntelegram:\n  bot:\n    token: ${TELEGRAM_BOT_TOKEN}\n```\n\n---\n\n### **3. Implement a handler**\n\n```java\n@Component\npublic class StartCommandHandler implements CommandUpdateHandler {\n    private final TelegramBotExecutor executor;\n\n    public StartCommandHandler(TelegramBotExecutor executor) {\n        this.executor = executor;\n    }\n\n    @Override\n    public void handle(Update update) {\n        executor.execute(\n            new SendMessage(Updates.chatId(update), \"Hello\")\n        );\n    }\n\n    @Override\n    public Set\u003cString\u003e commands() {\n        return Set.of(\"/start\");\n    }\n}\n```\n\nRun the Spring Boot application to start the bot.\n\n---\n\n## **Processing model**\n\nConceptually, updates are processed as follows:\n\n```\nTelegram\n  ↓\nIngress (long polling / webhook)\n  ↓\nDelivery (thread pool)\n  ↓\nInterceptors\n  ↓\nDispatcher\n  ↓\nRouters\n  ↓\nHandlers\n  ↓\n(No-match strategies / Exception handlers)\n```\n\nApplication code usually interacts only with **handlers**, **rules**, and optional interceptors.\n\n---\n\n## **Project structure**\n\nThe repository is organized into focused modules:\n\n|**Module**|**Description**|\n|---|---|\n|telegram-bot-core|Core processing pipeline, routing, handlers, SPI|\n|telegram-bot-long-polling|Long polling transport (default)|\n|telegram-bot-webhook|Webhook transport (opt-in)|\n|telegram-bot-observability|Metrics and observability integration|\n|telegram-bot-spring-boot-autoconfigure|Spring Boot auto-configuration|\n|telegram-bot-spring-boot-starter|Starter dependency|\n|telegram-bot-dependencies|BOM for dependency management|\n|examples/|Runnable sample applications|\n\nEach module contains a dedicated README with detailed documentation.\n\n---\n\n## **Transport selection**\n\nThe framework supports multiple update ingestion modes.\n\n### **Built-in transports**\n\n- **LONG_POLLING** (default)\n\n  Receives updates via Telegram long polling. Requires no HTTP endpoint.\n\n- **WEBHOOK**\n\n  Receives updates via HTTPS callbacks from Telegram.\n\n  Requires an explicit dependency and a public HTTPS endpoint.\n\n- **NO_INGRESS**\n\n  Runs the bot without any update ingress.\n\n  Incoming updates from Telegram are not received. Suitable for outbound-only bots,\n  scheduled notifications, and integration-driven use cases.\n\n### **Custom ingress**\n\n- **CUSTOM**\n\n  Disables built-in transports and allows applications to provide their own UpdateIngress implementation.\n\n\nThis mode is intended for advanced use cases, such as:\n\n- custom gateways or proxies\n- message queues or event streams\n- testing and replaying updates\n- non-standard Telegram delivery mechanisms\n\nTransport selection is controlled via:\n\n```yaml\ntelegram:\n  bot:\n    mode: LONG_POLLING | WEBHOOK | CUSTOM | NO_INGRESS\n```\n\nIn CUSTOM mode, application startup will fail if no UpdateIngress bean is provided.\n\n---\n\n## **Configuration model**\n\nConfiguration is based on Spring Boot @ConfigurationProperties and follows a single, consistent prefix:\n\n```\ntelegram.bot.*\n```\n\nTransport-specific and optional modules introduce their own nested namespaces.\n\n---\n\n## **Examples**\n\nThe [/examples](examples) directory contains standalone Spring Boot applications demonstrating:\n\n- minimal long polling setup\n- webhook configuration and lifecycle\n- routing and handler composition\n\nEach example can be run independently.\n\n---\n\n## **Design principles**\n\n- Explicit over implicit\n- Interfaces over implementations\n- Transport-agnostic core\n- Predictable lifecycle and threading\n- Production-oriented defaults\n\n---\n\n## **Documentation entry points**\n\n- **Core architecture**: [telegram-bot-core/README.md](telegram-bot-core/README.md)\n- **Long polling transport**: [telegram-bot-long-polling/README.md](telegram-bot-long-polling/README.md)\n- **Webhook transport**: [telegram-bot-webhook/README.md](telegram-bot-webhook/README.md)\n- **Observability**: [telegram-bot-observability/README.md](telegram-bot-observability/README.md)\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksilisk%2Ftelegram-bot-spring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fksilisk%2Ftelegram-bot-spring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksilisk%2Ftelegram-bot-spring/lists"}