Share anonymous confessions in Slack.
Prox comprises of three components:
- The web server for receiving and responding to event payloads from Slack
- A MongoDB database for saving the current post number, submitted posts, user pseudonyms, etc.
- The Slack app itself
Here are all the variables you need to set up on the server, with hints.
# Port to run the server on
PORT=3000
DATABASE_URL=mongodb://…
# App config. Obtained from the "Basic Information" page of your app.
SLACK_BOT_TOKEN=xoxb-…
SLACK_SIGNING_SECRET=…
# Slack channels where the app should post to. The review and stream channels are highly recommended to be private channels.
SLACK_POST_CHANNEL_ID=CXXXXXXXX
SLACK_REVIEW_CHANNEL_ID=GXXXXXXXX
SLACK_STREAM_CHANNEL_ID=GXXXXXXXX
This section is only relevent to you if you’ve decided to run Prox on a platform other than Heroku.
git clone https://github.com/ifvictr/prox
cd prox
# Install dependencies
yarn
# Start Prox in production! This will build the source files and then run them.
yarn start
# Or, if you need to run it in development mode instead.
yarn dev
For Prox to work, you’ll need to register a Slack app with the appropriate OAuth permissions, event subscriptions, and commands.
For the Request URL under the Interactivity section, enter http://<YOUR DOMAIN HERE>/slack/events
. This will be used for the app’s buttons.
The following commands are needed. Enter the same request URL you used in the previous section.
/prox
: Learn how to use Prox
Install the Slack app to your Slack workspace first.
The following bot token scopes are required:
channels:read
: Used for logging movement events.chat:write
: Used for sending messages.chat:write.customize
: Used for sending anonymous replies with pseudonyms and icons that distinguish different repliers.commands
: Used for/prox
.groups:read
: Used for logging movement events.im:history
: Used for receiving submissions via DMs from users.im:write
: Used for starting DM channels with users, which can then be used to send anonymous reaction prompts when needed.reactions:write
: Used for adding anonymous reactions.
Subscribe to the following bot events:
app_home_opened
member_joined_channel
member_left_channel
message.im
The request URL is also the same here.
After you’ve followed all the above steps, you should see something like this in the console:
Starting Prox…
Listening on port 3000