HeyGoose 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 🪿, each goose is converted to points witch can be showed on a scoreboard. HeyGoose is like heytaco, but free and you host it yourself.
Each goose will increment the users "goose" - points. And a rottengoose will decrement "goose" - points
Give away goose to a colleague if they done something good. ...Or maybe a rottengoose ( :rottengoose: , emoji needed ) if they done something bad.. :)
Ping one or several of your colleagues and give away a goose if they deserv it. Otherwise rottengoose if not ...
Example:
This will increase chralps "goose" - points by 3
@chralp :goose::goose::goose: - awesome app!
This will decrease chralps "goose" - points by 2
@chralp :rottengoose::rottengoose: - bad app...
This will increase chralps and fagges "goose" - points by 2 ( each )
@chralp @fagge :goose::goose: - awesome app!
You can run heygoose and disable rottengoose by passing environment variables. By disabling decrement you can send rottengooses but it will not decrement the users score.
In the default theme you will find filters to show diffrent leaderboards, goose board and rottengoose board. If env for disable decrement is passed the goose board will not count rottengooses. But you can see leaderboard for rottengooses ( sent and received ).
You can also disable decrement emoji completely. This way you will not be able to send any decrement score.
Check environment variables section.
- slack ( of course )
- node ( lts/erbium )
- yarn package manager (if you don't install, install it with
npm install -g yarn
)
- Go to https://yourworkspace.slack.com/apps and search for Bots.
- Add Bots ( Connect a bot to the Slack Real Time Messaging API).
- Give the bot a name, ex: heygoose, and obtain apiToken.
- Choose how to run it => See Docker or Node section .
- Invite the new bot to your slack channels ( where u want to be able to send gooses ).
- Open and edit
docker-compose.yml
. - Set environment variables that you need / want. Check "Environment variables" for more details.
docker-compose up -d
.
( Dockerhub repo => https://hub.docker.com/r/chralp/heyburrito )
git clone [email protected]:chralp/heyburrito.git
cd heyburrito
yarn install
oryarn
cp .env.example .env
- Set environment variables that you need / want. Check "Environment variables" for more details.
yarn start
ENV Variables | Default Value | Required | Note |
---|---|---|---|
BOT_NAME | Yes | Same botname as in Get started section | |
DATABASE_DRIVER | file | No | See database drivers section |
DATABASE_PATH | projectRoot/data/ | No | Only use if DATABASE_DRIVER is file and u want to change the path |
MONGODB_URL | Yes* | Only requierd if DATABASE_DRIVER is mongodb | |
MONGODB_DATABASE | Yes* | Only requierd if DATABASE_DRIVER is mongodb | |
DATABASE_URI | MONGODB_URL/MONGODB_DATABASE | No | Only in use when DATABASE_DRIVER is mongodb |
SLACK_API_TOKEN | Yes | See Get started section | |
SLACK_EMOJI_INC | 🌯 | No | Emoji to increment points. ex:( 🌯 ) |
SLACK_EMOJI_DEC | :rottenburrito: | No | Emoji to decrement points. ex:( :rottenburrito: ) |
SLACK_DAILY_CAP | 5 | No | Defaults to 5/day . |
SLACK_DAILY_DEC_CAP | 5 | No | separate cap ONLY IF env ENABLE_DECREMENT is set to false. |
DISABLE_EMOJI_DEC | false | No | Disable rottenburrito completely, set true to disable |
ENABLE_DECREMENT | true | No | Enable decrement of points, set false to disable |
API_PATH | /api/ | No | Must start and end with slash |
WEB_PATH | /heyburrito/ | No | Serving html from . |
HTTP_PORT | 3333 | No | For API and website |
WSS_PORT | 3334 | No | |
THEME_URL | https://github.com/chralp/heyburrito-theme | No | Pass git url to theme |
THEME_LATEST | false | No | Donwload latest from git repo on start |
THEME_PATH | No | Pass local path to theme | |
LOG_LEVEL | prod = info, dev = debug | No | levels = debug, log, warn |
Name | Recomended | Note |
---|---|---|
mongodb | Yes | |
file | Yes | Creates a fileDB under projectRoot/data/burrito-{ENV}.db |
array | No | Used when testing, "memmoryDB" |
Rottengoose and goose emoji can be found under resources ( Burrito.png and Rottenburrito.png ). You can add the emojis in slack via the emoji toolbox => Add emoji. Its not possible to overwrite the standard goose emoji in slack, so if you want to use heygoose goose emoji you can set a new name for it.
Note, set the ENV keys SLACK_EMOJI_INC and SLACK_EMOJI_DEC with the emojis that you want to use. If u want to use the standard goose emoji and our goose emoji you have to pass both emojis in SLACK_EMOJI_INC. ex: If you set our goose with name :burre: . ENV SLACK_EMOJI_INC should look like this.
SLACK_EMOJI_INC :goose:, :burre:
Defaults to heygoose-theme. https://github.com/chralp/heyburrito-theme If you want link a theme from disk, check environment variables THEME_PATH .
Name | Author | link |
---|---|---|
cardi-burrito | tbleckert | https://github.com/tbleckert/cardi-burrito |
If you want your theme to be on the list, create a PR or issue!
{
"error": boolean,
"code": HTTP codes as number,
"message": String or null,
"data": Object or array
}
Param | Value |
---|---|
userId | slack userId |
listType | to / from |
scoreType | inc / dec |
GET /api/scoreboard/<listType>/<scoreType>
Example
GET /api/scoreboard/to/inc
{
"error": false,
"code": 200,
"message": "ok",
"data": [
{
"username": "USER3",
"name": "User3",
"avatar": "https://link.to.avatar.48.burrito",
"memberType": "member",
"score": 9
},
{
"username": "USER5",
"name": "User5",
"avatar": "https://link.to.avatar.48.burrito",
"memberType": "member",
"score": 7
}
]
}
GET /api/userscore/<userId>/<listType>/<scoreType>
Example
GET /api/userscore/USER2/to/inc
{
"error": false,
"code": 200,
"message": "ok",
"data": {
"username": "USER2",
"name": "User2",
"avatar": "https://link.to.avatar.48.burrito",
"memberType": "member",
"score": 5,
"scoreType": "inc",
"listType": "to"
}
}
GET /api/userstats/<userId>
Example
GET /api/userstats/USER2
{
"error": false,
"code": 200,
"message": "ok",
"data": {
"user": {
"username": "USER2",
"name": "User2",
"avatar": "https://link.to.avatar.48.burrito",
"memberType": "member",
"receivedToday": 1,
"givenToday": 0,
"received": 2,
"given": 2
},
"given": [
{
"username": "USER8",
"name": "USER8",
"avatar": "https://link.to.avatar.48.burrito",
"memberType": "member",
"scoreinc": 1,
"scoredec": 0
},
{
"username": "USER9",
"name": "USER9",
"avatar": "https://link.to.avatar.48.burrito",
"memberType": "member",
"scoreinc": 0,
"scoredec": 1
}
],
"received": [
{
"username": "USER20",
"name": "USER20",
"avatar": "https://link.to.avatar.48.burrito",
"memberType": "member",
"scoreinc": 1,
"scoredec": 0
},
{
"username": "USER25",
"name": "USER25",
"avatar": "https://link.to.avatar.48.burrito",
"memberType": "member",
"scoreinc": 1,
"scoredec": 0
},
],
"givenToday": [],
"receivedToday": [
{
"username": "USER33",
"name": "USER33",
"avatar": "https://link.to.avatar.48.burrito",
"memberType": "member",
"scoreinc": 1,
"scoredec": 0
}
]
}
}
GET api/userstats/today/<userId>
Example
GET api/userstats/today/USER2
{
"error": false,
"code": 200,
"message": "ok",
"data": {
"givenToday": 0,
"receivedToday": 1
}
}
Scoreboard is accessable via localhost or host on port 3333
.
From heygoose-theme ( https://github.com/chralp/heyburrito-theme )