{"id":28324154,"url":"https://github.com/perbu/lunchbot","last_synced_at":"2026-07-17T05:35:18.978Z","repository":{"id":294946970,"uuid":"988597960","full_name":"perbu/lunchbot","owner":"perbu","description":"A bot to help order lunch","archived":false,"fork":false,"pushed_at":"2025-05-28T11:13:01.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T11:42:53.050Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perbu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2025-05-22T19:35:35.000Z","updated_at":"2025-05-28T11:13:04.000Z","dependencies_parsed_at":"2025-05-29T09:18:33.781Z","dependency_job_id":null,"html_url":"https://github.com/perbu/lunchbot","commit_stats":null,"previous_names":["perbu/lunchbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/perbu/lunchbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perbu%2Flunchbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perbu%2Flunchbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perbu%2Flunchbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perbu%2Flunchbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perbu","download_url":"https://codeload.github.com/perbu/lunchbot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perbu%2Flunchbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35569651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-17T02:00:06.162Z","response_time":116,"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":[],"created_at":"2025-05-25T17:10:05.289Z","updated_at":"2026-07-17T05:35:18.971Z","avatar_url":"https://github.com/perbu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lunchbot\n\nA Slack bot written in Go that helps track lunch orders and participant counts for your team.\n\n## Features\n\n- **Lunch tracking**: Add or subtract participants for today or tomorrow\n- **Vacation management**: Track team members on vacation (automatically reduces daily count)\n- **Daily reports**: Automatic lunch count reports sent at 10:00 AM (Europe/Oslo time)\n- **Order reminders**: Warning messages sent 10 minutes before order deadline\n- **Baseline configuration**: Set a default daily lunch count\n- **SQLite storage**: Persistent data storage with automatic database setup\n\n## Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/perbu/lunchbot.git\n   cd lunchbot\n   ```\n\n2. Build the application:\n   ```bash\n   go build\n   ```\n\n3. Create your configuration file:\n   ```bash\n   cp config.yaml.example config.yaml\n   ```\n\n4. Configure your Slack app tokens and settings in `config.yaml`\n\n## Configuration\n\nCreate a `config.yaml` file in the project root with the following structure:\n\n```yaml\nslack_app_token: \"xapp-your-app-token\"\nslack_bot_token: \"xoxb-your-bot-token\"\nchannel: \"C1234567890\"          # Slack channel ID where the bot listens\nreport_user: \"U0987654321\"      # Slack user ID who receives daily reports\nbaseline: 10                    # Default number of lunches per day\ndb_path: \"lunchbot.db\"         # Path to SQLite database file\n```\n\n### Slack App Setup\n\n1. Create a new Slack app at https://api.slack.com/apps\n2. Enable Socket Mode and generate an App-Level Token\n3. Add the following bot token scopes:\n   - `app_mentions:read`\n   - `chat:write`\n   - `channels:read`\n4. Install the app to your workspace\n5. Copy the Bot User OAuth Token and App-Level Token to your config\n\n## Usage\n\n### Commands\n\nMention the bot in your configured channel with these commands:\n\n#### Lunch Management\n```\n@lunchbot lunch add 3 today @alice @bob @charlie\n@lunchbot lunch detract 2 tomorrow @dave @eve\n```\n\n- **Verb**: `add` or `detract`\n- **Count**: Number of participants (must match actual participant count)\n- **When**: `today` or `tomorrow`\n- **Participants**: Space-separated list of participants\n\n#### Vacation Management\n```\n@lunchbot vacation @alice 2024-12-25 2024-12-31\n```\n\n- **User**: Slack user mention\n- **Dates**: Start and end dates in YYYY-MM-DD format (inclusive)\n\n### Automated Features\n\n- **Daily reports**: Sent at 10:00 AM Europe/Oslo time to the configured report user\n- **Order warnings**: Sent at 9:50 AM Europe/Oslo time to the main channel\n- **Vacation deductions**: Automatically subtracts 1 from daily count for each person on vacation\n\n## Running\n\n```bash\n./lunchbot\n```\n\nThe bot will:\n1. Load configuration from `config.yaml`\n2. Initialize the SQLite database\n3. Connect to Slack via Socket Mode\n4. Start listening for mentions and running scheduled tasks\n\nPress `Ctrl+C` to gracefully shutdown.\n\n## Architecture\n\nThe project is organized into separate packages:\n\n- `config/` - Configuration loading and types\n- `storage/` - Database operations and data models\n- `bot/` - Slack bot logic and command handling\n- `main.go` - Application entry point\n\n## Requirements\n\n- Go 1.24.2+\n- Slack workspace with admin permissions to create apps\n- Network access to Slack's API\n\n## License\n\nMIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperbu%2Flunchbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperbu%2Flunchbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperbu%2Flunchbot/lists"}