{"id":13821717,"url":"https://github.com/chralp/heyburrito","last_synced_at":"2025-05-16T14:34:30.181Z","repository":{"id":37873903,"uuid":"136749440","full_name":"chralp/heyburrito","owner":"chralp","description":"Slack application HeyBurrito! :burrito:","archived":false,"fork":false,"pushed_at":"2024-03-26T10:38:43.000Z","size":1510,"stargazers_count":90,"open_issues_count":16,"forks_count":50,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-19T22:41:34.969Z","etag":null,"topics":["burrito","heyburrito","mongodb","nodejs","reward-system","scoreboard","slack","slack-api"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/chralp.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":"2018-06-09T18:48:53.000Z","updated_at":"2024-11-07T11:42:11.000Z","dependencies_parsed_at":"2024-01-15T16:33:53.010Z","dependency_job_id":"ce4a73bc-fd64-47df-9d50-f771bd5062cc","html_url":"https://github.com/chralp/heyburrito","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chralp%2Fheyburrito","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chralp%2Fheyburrito/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chralp%2Fheyburrito/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chralp%2Fheyburrito/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chralp","download_url":"https://codeload.github.com/chralp/heyburrito/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254547164,"owners_count":22089272,"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":["burrito","heyburrito","mongodb","nodejs","reward-system","scoreboard","slack","slack-api"],"created_at":"2024-08-04T08:01:26.667Z","updated_at":"2025-05-16T14:34:29.446Z","avatar_url":"https://github.com/chralp.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"![Logo](resources/hey_burrito_github.png)\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://forthebadge.com\"\u003e\u003cimg src=\"https://forthebadge.com/images/badges/makes-people-smile.svg\" alt=\"Makes people smile\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://forthebadge.com\"\u003e\u003cimg src=\"https://forthebadge.com/images/badges/built-with-love.svg\" alt=\"Built with love\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n  \n### Whats Heyburrito\nHeyburrito is a slack reward system that allows slack team members to recognize and reward team members who have performed well. Reward your colleagues / friends by sending them a :burrito:, each burrito is converted to points witch can be showed on a scoreboard.\nHeyburrito is like heytaco, but free and you host it yourself.\n\n\n### How does it work\nEach burrito will increment the users \"burrito\" - points.\nAnd a rottenburrito will decrement \"burrito\" - points\n\nGive away burrito  to a colleague if they done something good.\n...Or maybe a rottenburrito ( :rottenburrito: , emoji needed ) if they done something bad.. :)\n\nPing one or several of your colleagues and give away a burrito if they deserv it. Otherwise rottenburrito if not ...\n\nExample:  \nThis will increase chralps \"burrito\" - points by 3\n`@chralp :burrito::burrito::burrito: - awesome app!` \n\nThis will decrease chralps \"burrito\" - points by 2\n`@chralp :rottenburrito::rottenburrito: - bad app...`\n\nThis will increase chralps and fagges \"burrito\" - points by 2 ( each )\n`@chralp @fagge :burrito::burrito: - awesome app!` \n\nYou can run heyburrito and disable rottenburrito by passing environment variables.\nBy disabling decrement you can send rottenburritos but it will not decrement the users score.\n\nIn the default theme you will find filters to show diffrent leaderboards, burrito board and rottenburrito board. If env for disable decrement is passed the burrito board will not count rottenburritos. But you can see leaderboard for rottenburritos ( sent and received ).\n\nYou can also disable decrement emoji completely. This way you will not be able to send any decrement score.\n\nCheck environment variables section.\n\n### Requirments\n- slack ( of course )\n- node ( lts/erbium ) \n\n### Get started\n\n1. Go to https://yourworkspace.slack.com/apps and search for Bots.  \n2. Add **Bots ( Connect a bot to the Slack Real Time Messaging API)**.  \n3. Give the bot a name, ex: heyburrito, and obtain apiToken.  \n4. Choose how to run it =\u003e See Docker or Node section .\n5. Invite the new bot to your slack channels ( where u want to be able to send burritos ).\n\n### Docker\n1. Open and edit `docker-compose.yml`.\n2. Set environment variables that you need / want. Check \"Environment variables\" for more details.\n3. `docker-compose up -d`.\n\n( Dockerhub repo =\u003e https://hub.docker.com/r/chralp/heyburrito  )\n### Node\n1. `git clone git@github.com:chralp/heyburrito.git`\n2. `cd heyburrito`\n3. `npm install`\n4. `cp .env.example .env`\n5. Set environment variables that you need / want. Check \"Environment variables\" for more details.\n6. `npm run start`\n\n\n### Environment Variables\n\n| ENV Variables       | Default Value                              | Required | Note                                                              |\n| ----------------    | -------------                              | ------   | -----------                                                       |\n| BOT_NAME            |                                            | Yes      | Same botname as in Get started section                            |\n| DATABASE_DRIVER     | file                                       | No       | See database drivers section                                      |\n| DATABASE_PATH       | projectRoot/data/                          | No       | Only use if DATABASE_DRIVER is file and u want to change the path |\n| MONGODB_URL         |                                            | Yes*     | Only requierd if DATABASE_DRIVER is mongodb                       |\n| MONGODB_DATABASE    |                                            | Yes*     | Only requierd if DATABASE_DRIVER is mongodb                       |\n| DATABASE_URI        | MONGODB_URL/MONGODB_DATABASE               | No       | Only in use when DATABASE_DRIVER is mongodb                       |\n| SLACK_API_TOKEN     |                                            | Yes      | See Get started section                                           |\n| SLACK_EMOJI_INC     | :burrito:                                  | No       | Emoji to increment points. ex:( :burrito: )                       |\n| SLACK_EMOJI_DEC     | :rottenburrito:                            | No       | Emoji to decrement points. ex:( :rottenburrito: )                 |\n| SLACK_DAILY_CAP     | 5                                          | No       | Defaults to 5/day .                                               |\n| SLACK_DAILY_DEC_CAP | 5                                          | No       | separate cap ONLY IF env ENABLE_DECREMENT is set to false.        |\n| DISABLE_EMOJI_DEC   | false                                      | No       | Disable rottenburrito completely, set true to disable             |\n| ENABLE_DECREMENT    | true                                       | No       | Enable decrement of points, set false to disable                  |\n| API_PATH            | /api/                                      | No       | Must start and end with slash                                     |\n| WEB_PATH            | /heyburrito/                               | No       | Serving html from .                                               |\n| HTTP_PORT           | 3333                                       | No       | For API and website                                               |\n| WSS_PORT            | 3334                                       |  No        |                                                                   |\n| THEME_URL           | https://github.com/chralp/heyburrito-theme | No       | Pass git url to theme                                             |\n| THEME_LATEST        | false                                      | No       | Donwload latest from git repo on start                            |\n| THEME_PATH          |                                            | No       | Pass local path to theme                                          |\n| LOG_LEVEL           | prod = info, dev = debug                   | No       | levels = debug, log, warn                                         |\n\n  \n### Database drivers\n\n| Name    | Recomended | Note                           |\n|---------|------------|--------------------------------|\n| mongodb | Yes        |                                |\n| file    | Yes        | Creates a fileDB under projectRoot/data/burrito-{ENV}.db |\n| array   | No         | Used when testing, \"memmoryDB\" |\n\n\n### Emojis\nRottenburrito and burrito emoji can be found under resources ( Burrito.png and Rottenburrito.png ).\nYou can add the emojis in slack via the emoji toolbox =\u003e Add emoji.\nIts not possible to overwrite the standard burrito emoji in slack, so if you want to use heyburritos burrito emoji you can set a new name for it.\n\nNote, set the ENV keys SLACK_EMOJI_INC and SLACK_EMOJI_DEC with the emojis that you want to use.\nIf u want to use the standard burrito emoji and our burrito emoji you have to pass both emojis in SLACK_EMOJI_INC.\nex:\nIf you set our burrito with name :burre: .\nENV SLACK_EMOJI_INC should look like this.\n```\nSLACK_EMOJI_INC :burrito:, :burre:\n```\n\n### Theme\nDefaults to heyburrito-theme. [https://github.com/chralp/heyburrito-theme](https://github.com/chralp/heyburrito-theme)\nIf you want link a theme from disk, check environment variables THEME_PATH .\n  \n#### Available third party themes\n| Name          | Author    | link                                       |\n|---------------|-----------|--------------------------------------------|\n| cardi-burrito | tbleckert | https://github.com/tbleckert/cardi-burrito |\n\nIf you want your theme to be on the list, create a PR or issue!\n\n### API\n#### Return object\n```\n{\n  \"error\": boolean,\n  \"code\": HTTP codes as number,\n  \"message\": String or null,\n  \"data\": Object or array\n} \n```\n#### Values\n| Param          | Value    |\n|---------------|-----------|\n| userId | slack userId |\n| listType | to / from |\n| scoreType | inc / dec |\n\n#### api/scoreboard\n````\nGET /api/scoreboard/\u003clistType\u003e/\u003cscoreType\u003e \n````\nExample\n````\nGET /api/scoreboard/to/inc\n````\n````JSON\n{\n  \"error\": false,\n  \"code\": 200,\n  \"message\": \"ok\",\n  \"data\": [\n    {\n      \"username\": \"USER3\",\n      \"name\": \"User3\",\n      \"avatar\": \"https://link.to.avatar.48.burrito\",\n      \"memberType\": \"member\",\n      \"score\": 9\n    },\n    {\n      \"username\": \"USER5\",\n      \"name\": \"User5\",\n      \"avatar\": \"https://link.to.avatar.48.burrito\",\n      \"memberType\": \"member\",\n      \"score\": 7\n    }\n  ]\n}\n````\n\n#### api/userscore\n````\nGET /api/userscore/\u003cuserId\u003e/\u003clistType\u003e/\u003cscoreType\u003e \n````\nExample\n````\nGET /api/userscore/USER2/to/inc\n````\n````JSON\n{\n  \"error\": false,\n  \"code\": 200,\n  \"message\": \"ok\",\n  \"data\": {\n    \"username\": \"USER2\",\n    \"name\": \"User2\",\n    \"avatar\": \"https://link.to.avatar.48.burrito\",\n    \"memberType\": \"member\",\n    \"score\": 5,\n    \"scoreType\": \"inc\",\n    \"listType\": \"to\"\n  }\n}\n````\n\n#### api/userstats\n````\nGET /api/userstats/\u003cuserId\u003e\n````\nExample\n````\nGET /api/userstats/USER2\n````\n````JSON\n{\n  \"error\": false,\n  \"code\": 200,\n  \"message\": \"ok\",\n  \"data\": {\n    \"user\": {\n      \"username\": \"USER2\",\n      \"name\": \"User2\",\n      \"avatar\": \"https://link.to.avatar.48.burrito\",\n      \"memberType\": \"member\",\n      \"receivedToday\": 1,\n      \"givenToday\": 0,\n      \"received\": 2,\n      \"given\": 2\n    },\n    \"given\": [\n      {\n        \"username\": \"USER8\",\n        \"name\": \"USER8\",\n        \"avatar\": \"https://link.to.avatar.48.burrito\",\n        \"memberType\": \"member\",\n        \"scoreinc\": 1,\n        \"scoredec\": 0\n      },\n      {\n        \"username\": \"USER9\",\n        \"name\": \"USER9\",\n        \"avatar\": \"https://link.to.avatar.48.burrito\",\n        \"memberType\": \"member\",\n        \"scoreinc\": 0,\n        \"scoredec\": 1\n      }\n    ],\n    \"received\": [\n      {\n        \"username\": \"USER20\",\n        \"name\": \"USER20\",\n        \"avatar\": \"https://link.to.avatar.48.burrito\",\n        \"memberType\": \"member\",\n        \"scoreinc\": 1,\n        \"scoredec\": 0\n      },\n      {\n        \"username\": \"USER25\",\n        \"name\": \"USER25\",\n        \"avatar\": \"https://link.to.avatar.48.burrito\",\n        \"memberType\": \"member\",\n        \"scoreinc\": 1,\n        \"scoredec\": 0\n      },\n    ],\n    \"givenToday\": [],\n    \"receivedToday\": [\n      {\n        \"username\": \"USER33\",\n        \"name\": \"USER33\",\n        \"avatar\": \"https://link.to.avatar.48.burrito\",\n        \"memberType\": \"member\",\n        \"scoreinc\": 1,\n        \"scoredec\": 0\n      }\n    ]\n  }\n}\n````\n#### api/userstats/today\n````\nGET api/userstats/today/\u003cuserId\u003e\n````\nExample\n````\nGET api/userstats/today/USER2\n````\n````JSON\n{\n   \"error\": false,\n   \"code\": 200,\n   \"message\": \"ok\",\n   \"data\": {\n     \"givenToday\": 0,\n     \"receivedToday\": 1\n  }\n}\n````\n\n\n\n### Scoreboard\nScoreboard is accessable via localhost or host on port `3333`.\n\n\nShowcase\n-----------\nFrom heyburrito-theme ( [https://github.com/chralp/heyburrito-theme](https://github.com/chralp/heyburrito-theme) ) \n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/13852280/74108695-3e832a00-4b7d-11ea-91ec-162a0ad46532.png\" width=\"75%\" height=\"75%\"\u003e\n\u003c/p\u003e    \n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/13852280/74108696-3f1bc080-4b7d-11ea-9a99-6bac9631e608.png\" width=\"75%\" height=\"75%\"\u003e\n  \u003c/p\u003e    \n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/13852280/74108698-3fb45700-4b7d-11ea-893b-21d33238efa1.png\" width=\"75%\" height=\"75%\"\u003e\n\u003c/p\u003e    \n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/13852280/74108699-3fb45700-4b7d-11ea-9e21-1da65a583a0d.png\" width=\"75%\" height=\"75%\"\u003e\n  \u003c/p\u003e    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchralp%2Fheyburrito","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchralp%2Fheyburrito","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchralp%2Fheyburrito/lists"}