Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.
/ teamtrain Public archive

Slack app for building relationships with your team

License

Notifications You must be signed in to change notification settings

ministrycentered/teamtrain

Repository files navigation

Team Train

Slack app for building relationships at planning center. This train themed application creates an event that anyone who has time and wishes to participate can join the train to get to know their teammates better.

This is a Node.js application that has two main components:

  1. a web component using Express for Slack Integration callbacks.
  2. a cli component that expose commands for automatic scheduling.

The basic workflow of this project in action:

  1. Scheduler prepare's train for departure by posting an all aboard message to the specified channel two hours prior to departure.
  2. Users react using 🎫 to signify their desire to board the train.
  3. Scheduler, at specified time (currently 8:30am PT and 1:30pm PT), starts the train by creating a DM between two (or three) random individuals that reacted to the intial all aboard message.
  4. Users are given randomly chosen prompts and one person is selected to begin the call.
  5. If users need additional conversation prompts, there is an interactive button that will go fetch additional prompts.

Getting Started

These instructions will get you a copy of this project up and running on your local machine for development and testing. See deployment notes on how to deploy the project on a live system.

Prerequisits

yarn to manage packages and dependencies. Ensure yarn, node, and npm are installed.

Installing

Review config/default.json to ensure the base configuration is correct.

Copy config/development.json.example to config/development.json and fill out the necessary configurations (see ).

{
  "slack": {
    "teamtrain": {
      "channel": "your-slack-channel",
      "token": "slack-bot-privilege-token",
      "verificationToken": "slack-app-verification-token"
    }
  }
}

Install dependencies

yarn install

Start it up and run the CLI components!

$ yarn run prep-train 1:30pm
🚂 will depart at 5:00pm
$ yarn run start-train

For the user requests new prompt Slack interactive component, use ngrok as a tunnel to your local machine.

When ngrok is running, in your Slack App, set the callback url to https://yourhash.ngrok.io/callback.

Start the webserver

yarn start

And profit! The interactive Slack buttons will now be functional.

Deployment

There are a few things to keep in mind:

  • Production uses config/production.json and config/custom-environment-variables.json to set up production environment configurations and environment variables respectively.
  • config/production.json is required to exist, even if you only environment variables.
  • If using ngrok locally, be sure to update your Slack component callback to your deployed environment host.

Built With

License

ISC

Contributing

We encourage you to contribute to Team Train! Please check out the Contributing to Team Train for guidelines about how to proceed. Join us!

Everyone interacting in Team Train's codebase, issue trackers, chat rooms, and mailing lists is expected to follow the Team Train code of conduct.

About

Slack app for building relationships with your team

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published