Skip to content

TritonSE/TSE-Muffin

Repository files navigation

muffin 🧁

matching up future friends inexpensively

muffin is an open-source, self-hosted Slack bot that pairs people up on a regular basis. By default, you'll meet someone new every two weeks.

muffin is inspired by donut. Although muffin has fewer features, if your team has more than 24 people, or you want to enable pairings in multiple channels, then hosting muffin yourself is ~10x cheaper than donut's paid plans.

Setup

muffin has a Node.js backend and uses MongoDB, so you'll need to provide both of those.

You can get a free MongoDB instance through Atlas, and there are many good options for backend hosting. In particular, the provided Dockerfile is known to work on DigitalOcean App Platform, which costs $5/month.

Create a Slack app

  1. Click here to create a new, pre-configured app in your workspace.

    Alternatively, you can create a new app and paste in manifest.json manually, using these steps.

  2. Install the app to your workspace. You may have been prompted to do this after creating the app.

Set environment variables

See .env.example for the environment variables you'll need to configure.

Deploy the backend

You can either use the Dockerfile, or do it the old-fashioned way:

npm install
npm run build
npm start

Subscribe to events

In your app's event subscription request URL, you should change the domain from example.com to your domain, but keep the /slack/events path. See these instructions for details.

Test your deployment

If you send muffin the word "help" as a direct message, it should react to your message with a checkmark, and reply with a list of commands. Your direct message with muffin is essentially a command-line interface.

Usage

To schedule pairings, use the following command:

round_schedule #my-channel 2023-06-05T10:00:00-0700 2w

Everyone in that channel will be paired up at the specified date and time. This is an ISO 8601 date string; be sure to replace -0700 with the offset of your time zone.

2w specifies a duration of two weeks. Also try days (4d) or even hours and minutes (1h10m).

You can repeat this command with different dates (and even channels) to schedule as many rounds as you like. If you're scheduling multiple consecutive rounds in the same channel, you can schedule the first one as usual, then use round_repeat #my-channel.

About

Slack bot that pairs people up regularly

Topics

Resources

License

Stars

Watchers

Forks

Languages