{"id":22147152,"url":"https://github.com/kratochj/jidlobot","last_synced_at":"2026-05-04T18:41:19.396Z","repository":{"id":265303014,"uuid":"895675887","full_name":"kratochj/jidlobot","owner":"kratochj","description":"Jidlobot is a Slack bot built with Spring Boot that fetches and displays the daily menu from Jídlovice. It integrates with Slack via Socket Mode, supports caching for efficiency, and provides customizable configurations for seamless operation.","archived":false,"fork":false,"pushed_at":"2025-03-12T09:26:28.000Z","size":166,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T10:24:51.265Z","etag":null,"topics":["java","slack","slackbot","spring-boot"],"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/kratochj.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}},"created_at":"2024-11-28T16:54:29.000Z","updated_at":"2025-03-12T09:17:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"79466ebe-aff4-4669-9bdb-84c83fc5d784","html_url":"https://github.com/kratochj/jidlobot","commit_stats":null,"previous_names":["kratochj/jidlobot"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kratochj%2Fjidlobot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kratochj%2Fjidlobot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kratochj%2Fjidlobot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kratochj%2Fjidlobot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kratochj","download_url":"https://codeload.github.com/kratochj/jidlobot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245268222,"owners_count":20587578,"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":["java","slack","slackbot","spring-boot"],"created_at":"2024-12-01T23:13:38.093Z","updated_at":"2026-05-04T18:41:14.344Z","avatar_url":"https://github.com/kratochj.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jidlobot\n[![Docker](https://github.com/kratochj/jidlobot/actions/workflows/build.yml/badge.svg)](https://github.com/kratochj/jidlobot/actions/workflows/build.yml)  \n[![CodeQL](https://github.com/kratochj/jidlobot/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/kratochj/jidlobot/actions/workflows/github-code-scanning/codeql)\n\n**Jidlobot** is a Slack bot designed to fetch and display the daily menu from **Jídlovice**. Built with **Spring Boot**, it integrates seamlessly with Slack using the **Bolt framework**.\n\n---\n\n## 🌟 Features\n\n- **Fetch Daily Menu**: Automatically retrieves the daily menu, including soups, main dishes, and special dishes.\n- **Slack Integration**: Responds to mentions and commands in Slack via Socket Mode.\n- **Cache Management**: Optimizes HTTP requests by caching menu data for a configurable duration.\n\n---\n\n## ⚙️ Setup\n\n### Prerequisites\n\n- **Java** 21\n- **Maven** 3.x\n- **Docker** (optional, for containerization)\n- A Slack workspace with a configured bot user\n\n### Obtaining Slack Keys\n\nTo use Jidlobot, you will need two Slack keys:\n1. **Bot User OAuth Token (`SLACK_BOT_TOKEN`)**\n2. **App-Level Token (`SLACK_APP_LEVEL_TOKEN`)**\n\nFollow these steps to obtain them:\n\n1. **Create a Slack App**:\n    - Visit the [Slack API Apps Page](https://api.slack.com/apps) and click **Create an App**.\n    - Select **From scratch** and give your app a name (e.g., `Jidlobot`), then choose the appropriate Slack workspace.\n\n2. **Enable Bot Token Scopes**:\n    - In the **OAuth \u0026 Permissions** section of your app, scroll to **Bot Token Scopes**.\n    - Add the following scopes:\n        - `app_mentions:read`\n        - `chat:write`\n        - `channels:read`\n        - `groups:read`\n\n3. **Install the App to Your Workspace**:\n    - Once scopes are configured, install the app to your workspace from the **OAuth \u0026 Permissions** section.\n    - Copy the **Bot User OAuth Token** (starts with `xoxb-`) and use it as `SLACK_BOT_TOKEN`.\n\n4. **Generate an App-Level Token**:\n    - Go to the **Socket Mode** section and enable Socket Mode.\n    - Click **Generate Token and Scopes**, then add the `connections:write` scope.\n    - Copy the **App-Level Token** (starts with `xapp-`) and use it as `SLACK_APP_LEVEL_TOKEN`.\n\n---\n\n### Installation\n\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/\u003cyour-username\u003e/jidlobot.git\n   cd jidlobot\n   ```\n\n2. **Build the project**:\n   ```bash\n   mvn install\n   ```\n\n3. **Configure Slack Tokens**:  \n   Create a Kubernetes `Secret` with your Slack bot credentials:\n\n   ```yaml\n   apiVersion: v1\n   kind: Secret\n   metadata:\n     name: slack-secrets\n     namespace: fun\n   type: Opaque\n   data:\n     SLACK_BOT_TOKEN: \u003cbase64-encoded-value\u003e\n     SLACK_APP_LEVEL_TOKEN: \u003cbase64-encoded-value\u003e\n   ```\n\n4. **Run the application**:\n   ```bash\n   mvn spring-boot:run\n   ```\n\n5. **Deploy to Kubernetes** (optional):  \n   Use the `jidlobot-deployment.yaml` file provided in the repository. Adjust the image name and tag as necessary.\n\n   The pre-built Docker image for `jidlobot` is available on [GitHub Container Registry (GHCR)](https://github.com/kratochj/jidlobot/pkgs/container/jidlobot).\n\n---\n\n## 🔧 Configuration\n\nCustomize the application using the `application.yaml` file:\n\n```yaml\nslack:\n  bot-token: ${SLACK_BOT_TOKEN}\n  app-token: ${SLACK_APP_LEVEL_TOKEN}\n\nmenu:\n  url: \"https://www.jidlovice.cz/telehouse/\"\n  cache-enabled: true\n  cache-for-seconds: 3600\n```\n\n---\n\n## 🛠️ Usage\n\n- Mention the bot in any channel with commands like:\n  ```text\n  @jidlobot menu\n  ```\n  to receive the current menu.\n\n- Use:\n  ```text\n  @jidlobot help\n  ```\n  to view help instructions.\n\n---\n\n## 💻 Development\n\n### Running Tests\nRun the test suite using Maven:\n```bash\nmvn test\n```\n\n### Code Coverage\nGenerate a code coverage report:\n```bash\nmvn jacoco:report\n```\n\n### Building a Docker Image\nBuild and push Docker images using the provided GitHub Actions workflow. Images are automatically pushed to **GitHub Container Registry (GHCR)**.\n\nTo pull the pre-built Docker image, use:\n```bash\ndocker pull ghcr.io/kratochj/jidlobot:latest\n```\n\n---\n\n## 📜 License\n\nThis project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.\n\n---\n\n## 🤝 Contributors\n\nContributions are welcome! Please read the [CONTRIBUTING.md](CONTRIBUTING.md) file for the code of conduct and details on submitting pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkratochj%2Fjidlobot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkratochj%2Fjidlobot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkratochj%2Fjidlobot/lists"}