{"id":27938606,"url":"https://github.com/willowtreeapps/catalyst-slack-service","last_synced_at":"2026-03-07T08:02:35.737Z","repository":{"id":56374642,"uuid":"230963329","full_name":"willowtreeapps/catalyst-slack-service","owner":"willowtreeapps","description":"Unconscious gender bias has been fueling the gender gap for far too long. We’re releasing the #BiasCorrect code in hopes that coders around the world will adapt it for whatever chat-based platforms they use in order to give more people access to this tool for change.","archived":false,"fork":false,"pushed_at":"2020-11-11T14:41:27.000Z","size":189,"stargazers_count":12,"open_issues_count":1,"forks_count":0,"subscribers_count":15,"default_branch":"develop","last_synced_at":"2024-04-14T23:17:07.996Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willowtreeapps.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":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2019-12-30T18:42:38.000Z","updated_at":"2020-11-13T17:35:02.000Z","dependencies_parsed_at":"2022-08-15T17:31:28.420Z","dependency_job_id":null,"html_url":"https://github.com/willowtreeapps/catalyst-slack-service","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willowtreeapps%2Fcatalyst-slack-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willowtreeapps%2Fcatalyst-slack-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willowtreeapps%2Fcatalyst-slack-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willowtreeapps%2Fcatalyst-slack-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willowtreeapps","download_url":"https://codeload.github.com/willowtreeapps/catalyst-slack-service/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252847292,"owners_count":21813440,"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":[],"created_at":"2025-05-07T08:49:34.314Z","updated_at":"2026-03-07T08:02:30.709Z","avatar_url":"https://github.com/willowtreeapps.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# catalyst-slack-service\n\nA microservice that integrates Slack and [Bias Correction Service](https://github.com/willowtreeapps/catalyst-bias-correct-service). This service subscribes to message events on Slack and utilizes the Bias Correction Service for potential suggestions to replace biased terms.\n\n## Prerequisites\n* [JDK 12](https://www.oracle.com/java/technologies/javase/jdk12-archive-downloads.html)\n* [sbt 1.3.5](https://www.scala-sbt.org/download.html)\n* [docker](https://hub.docker.com/editions/community/docker-ce-desktop-mac)\n* [redis](https://redis.io/topics/quickstart) \n    - ```docker run --name my-redis -p 6379:6379 --restart always --detach redis```\n\n## Run\n\nYou can run this project using IntelliJ IDEA, Docker or terminal. You will need the same configuration variables for all 3 options.\n\n####Environment Variables\n\n```\nREDIS_HOST={REDIS_HOST}\nREDIS_PORT={REDIS_PORT}\nPLAY_SECRET_KEY={PLAY_SECRET_KEY}\nBIAS_CORRECT_URL={BIAS_CORRECT_URL}\nSLACK_TOKEN={SLACK_TOKEN}\nSLACK_SIGNING_SECRET={SIGNING_SECRET}\nSLACK_CLIENT_SECRET={CLIENT_SECRET}\nSLACK_CLIENT_ID={CLIENT_ID}\nTRACKING_ID={TRACKING_ID}\n```\n`REDIS_HOST`: Defaults to localhost if not defined\n\n`REDIS_PORT`: Defaults to 6379 if not defined\n\n`PLAY_SECRET_KEY`: You can generate a new secret using `sbt playGenerateSecret` or if you don't already have an sbt server running `head -c 30 /dev/random | base64`.\n\n`BIAS_CORRECT_URL`: URL for the Bias Correction Service Endpoint (ex. http://localhost:8000/corrector/correct).\n\n`SLACK_TOKEN` \u0026\u0026 `SIGNING_SECRET` \u0026\u0026 `CLIENT_SECRET` \u0026\u0026 `CLIENT_ID`: Navigate to api.slack.com/app. Select your app and view the `Basic Information` section.\n\n`TRACKING_ID`: Google Analytics Tracking ID (ex. UA-XXXX-Y).\n\n### [IntelliJ IDEA](https://www.jetbrains.com/idea/)\nOpen Project\n1. Open Project wizard, select **Import Project**.\n1. In the window that opens, select this project.\n1. On the next page of the wizard, select **Import project from external model** option, choose **sbt project**.\n1. On the next page of the wizard, ensure that the **Project JDK** is set to **JDK 12**.\n1. Enable Auto-Import for **sbt projects**.\n\nSetup Configuration\n1. Add configuration template **sbt Task**.\n2. In the window that opens, enter \"run\" into the **Tasks** input.\n3. Uncheck the **Use sbt shell** option.\n4. Add the above configuration as environment variables.\n\nPress Run\n\n### [Docker](https://hub.docker.com/editions/community/docker-ce-desktop-mac)\nsbt provides the infrastructure to easily build out a Docker image from our application. The current build.sbt file is configured with the options to use OpenJDK 12 on Alpine. This is intended to keep our shipping image as lean as possible. The application.conf file has also been updated to capture a few values from the environment when available. Finally, the build.sbt file has the option to configure the current version from an environment variable (which will be captured in the docker container tags).\n\nCreate a `prod.env` file containing all configuration outlined above. Then publish your project locally and run the container.\n\n```\nsbt docker:publishLocal\n\ndocker run -p 8000:9000 -e PLAY_SECRET_KEY=\"$(head -c 30 /dev/random | base64)\" --env-file prod.env catalyst-slack-service:1.0-SNAPSHOT\n```\n\nIn the above example, we expose the host/local port 8000 to the container's port 9000 (the default port for the Play framework).  We've also chosen to generate a random secret key and use the default Docker tag.  If we had specified an environment variable during the build phase (`VERSION_NUMBER=example sbt docker:publishLocal`), then our tag would be `catalyst-slack-service:example`.\n\n### Terminal\n\nYou can also run the application using your terminal. Make sure that you have sbt 1.3.5 installed. Export the environment variables defined above if you had not done so previously, then run the application using sbt.\n```\nsbt version\n\nexport REDIS_HOST={REDIS_HOST} \u0026\u0026 \\\nexport REDIS_PORT={REDIS_PORT} \u0026\u0026 \\\nexport PLAY_SECRET_KEY={PLAY_SECRET_KEY} \u0026\u0026 \\\nexport BIAS_CORRECT_URL={BIAS_CORRECT_URL} \u0026\u0026 \\\nexport SLACK_TOKEN={SLACK_TOKEN} \u0026\u0026 \\\nexport SLACK_SIGNING_SECRET={SIGNING_SECRET} \u0026\u0026 \\\nexport SLACK_CLIENT_SECRET={CLIENT_SECRET} \u0026\u0026 \\\nexport SLACK_CLIENT_ID={CLIENT_ID} \u0026\u0026 \\\nexport TRACKING_ID={TRACKING_ID}\n\nsbt run\n```\n\n## Configure Slack App\n\nAfter getting your local service running you will need to use [ngrok](https://dashboard.ngrok.com/get-started) to expose your local server. \n\nSetup and connect your ngrok account then expose your local service.\n\n`./ngrok http 4542`\n\nTake note of the forwarding https url. Next you need to update your Slack App with this forwarding url. \n\nNavigate to api.slack.com/apps.\n\n1. Update **Interactivity \u0026 Shortcuts** with the **Request URL** `{FORWARDING_URL}/bias-correct/v2/slack/actions`.\n2. Update **OAuth \u0026 Permissions** with the **Redirect URL** `{FORWARDING_URL}/bias-correct/v2/slack/auth/redirect`.\n3. Update **Event Subscriptions** with the **Request URL** `{FORWARDING_URL}/bias-correct/v2/slack/events`.\n4. Update **Slash Commands** with the **Request URL** `{FORWARDING_URL}/bias-correct/v2/slack/help`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillowtreeapps%2Fcatalyst-slack-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillowtreeapps%2Fcatalyst-slack-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillowtreeapps%2Fcatalyst-slack-service/lists"}