{"id":31847937,"url":"https://github.com/wireapp/poll-bot","last_synced_at":"2026-02-28T05:34:14.831Z","repository":{"id":45650799,"uuid":"243209370","full_name":"wireapp/poll-bot","owner":"wireapp","description":"You know... for polls","archived":false,"fork":false,"pushed_at":"2025-02-21T16:04:07.000Z","size":408,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"staging","last_synced_at":"2025-02-21T17:20:27.648Z","etag":null,"topics":["exposed","ktor","poll-bot","roman","wire"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","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/wireapp.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-02-26T08:27:45.000Z","updated_at":"2025-02-21T16:04:11.000Z","dependencies_parsed_at":"2025-02-21T17:20:03.992Z","dependency_job_id":"18be0717-ec38-4a80-9902-4c97ec65ac92","html_url":"https://github.com/wireapp/poll-bot","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/wireapp/poll-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wireapp%2Fpoll-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wireapp%2Fpoll-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wireapp%2Fpoll-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wireapp%2Fpoll-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wireapp","download_url":"https://codeload.github.com/wireapp/poll-bot/tar.gz/refs/heads/staging","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wireapp%2Fpoll-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010951,"owners_count":26084841,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["exposed","ktor","poll-bot","roman","wire"],"created_at":"2025-10-12T09:58:38.464Z","updated_at":"2025-10-12T09:58:41.598Z","avatar_url":"https://github.com/wireapp.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wire Poll Bot\n[![GitHub version](https://badge.fury.io/gh/wireapp%2Fpoll-bot.svg)](https://badge.fury.io/gh/wireapp%2Fpoll-bot)\n![CI](https://github.com/wireapp/poll-bot/workflows/CI/badge.svg)\n![Docker Latest build](https://github.com/wireapp/poll-bot/workflows/Docker%20Latest%20build/badge.svg)\n![Staging Deployment](https://github.com/wireapp/poll-bot/workflows/Staging%20Deployment/badge.svg)\n![Release Pipeline](https://github.com/wireapp/poll-bot/workflows/Release%20Pipeline/badge.svg)\n\n[Wire](https://wire.com/) bot for the polls. This version is based on Roman therefore does not employ E2EE directly\n\nService code to enable Poll bot in your team:\n```bash\n3131a0af-89d4-4569-b36d-50bcced4b1fb:163a422b-c314-4e34-95af-10b6b36cde18\n```\n\n## Commands\nBasic usage \n* `/poll \"Question\" \"Option 1\" \"Option 2\"` will create poll\n* `/stats` will send result of the **latest** poll in the conversation\n* `/help` to show help\n* `/version` prints the current version of the poll bot\n\n## Technologies used\n* HTTP Server - [Ktor](https://ktor.io/)\n* HTTP Client - [Apache](https://ktor.io/clients/http-client/engines.html) under [Ktor](https://ktor.io/)\n* Dependency Injection - [Kodein](https://github.com/Kodein-Framework/Kodein-DI)\n* Build system - [Gradle](https://gradle.org/)\n* Communication with [Wire](https://wire.com/) - [Roman](https://github.com/dkovacevic/roman)\n\nBot is using webhooks coming from Roman, for that, the bot needs to have public URL or IP address.\n\n## Usage\n\n* The bot needs Postgres database up \u0026 running - we use one in [docker-compose.yml](docker-compose.yml), to start it up, you can use\n  command `make db`.\n* To run the application execute `make run` or `./gradlew run`.\n* To run the application inside the docker compose environment run `make up`.\n\nFor more details see [Makefile](Makefile).\n\n## Docker Images\n\nPoll bot has public [docker image](https://quay.io/wire/poll-bot).\n```bash\nquay.io/wire/poll-bot\n```\n\nTag `latest` is the latest release. [Releases](https://github.com/wireapp/poll-bot/releases) have then images with corresponding tag, so you\ncan always roll back. Tag `staging` is build from the latest commit in `staging` branch.\n\n\n## Bot configuration\nConfiguration is currently being loaded from the environment variables.\n\n```kotlin\n    /**\n     * Username for the database.\n     */\n    const val DB_USER = \"DB_USER\"\n\n    /**\n     * Password for the database.\n     */\n    const val DB_PASSWORD = \"DB_PASSWORD\"\n\n    /**\n     * URL for the database.\n     *\n     * Example:\n     * `jdbc:postgresql://localhost:5432/bot-database`\n     */\n    const val DB_URL = \"DB_URL\"\n\n    /**\n     * Token which is used for the auth of proxy.\n     */\n    const val SERVICE_TOKEN = \"SERVICE_TOKEN\"\n\n    /**\n     * Domain used for sending the messages from the bot to proxy eg. \"https://proxy.services.zinfra.io/api\"\n     */\n    const val PROXY_DOMAIN = \"PROXY_DOMAIN\"\n```\n\nVia the system variables - see [complete list](src/main/kotlin/com/wire/bots/polls/setup/EnvConfigVariables.kt).\n\n## Docker Compose\nTo run bot inside docker compose environment with default PostgreSQL database,\nplease create `.env` file in the root directory with the following variables:\n```bash\n# database\nPOSTGRES_USER=\nPOSTGRES_PASSWORD=\nPOSTGRES_DB=\n\n# application\nDB_USER=\nDB_PASSWORD=\nDB_URL=\nSERVICE_TOKEN=\nPROXY_DOMAIN=\n```\n\nSuch configuration can look for example like that:\n\n```bash\n# database\nPOSTGRES_USER=wire-poll-bot\nPOSTGRES_PASSWORD=super-secret-wire-pwd\nPOSTGRES_DB=poll-bot\n\n# application\nDB_USER=wire-poll-bot\nDB_PASSWORD=super-secret-wire-pwd\nDB_URL=jdbc:postgresql://db:5432/poll-bot\nSERVICE_TOKEN=x6jsd5vets967dsA01dz1cOl\nAPP_KEY=eyJhbGciOiJIUzM4NCJ9.......\nPROXY_DOMAIN=https://proxy.services.zinfra.io/api\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwireapp%2Fpoll-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwireapp%2Fpoll-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwireapp%2Fpoll-bot/lists"}