Skip to content

A simple repository used to demo some of the features of Block Builder, together with Slack's BoltJS

License

Notifications You must be signed in to change notification settings

raycharius/slack-block-builder-demo

Repository files navigation

Logo

A lightweight Slack app to demo the features of Block Builder

Take a look at how Block Builder can be used together with Slack's BoltJS


This repository is a lightweight Slack app, built with the the Block Builder library, and Slack's very own BoltJS. It's a simple implementation whose goal is to demo some of the more complex features of Block Builder, such as the Paginator an Accordion components and how to handle them in pair with BoltJS.

The rest of this document walks you through setting up and running the app. It does assume that you are familiar with cloning and downloading GitHub repositories.

🏢   Adding The App To Your Workspace

This Slack app can easily be added to your own workspace and used locally using the Socket Mode:

  • Locate the manifest.yml file in the root of this repository
  • Copy the contents to your clipboard
  • Follow the instructions laid out by Slack to install an app via a manifest.
  • Go into the app's Basic Information and click Install to Workspace.

🔧   Adding The App Tokens

  • Create a file called .env in the root of the repository.
  • Copy over the contents of .env.example to the file.
  • Go into the OAuth and Persmissions section of the app in Slack's dashboard, and copy the Bot User OAuth Token to the clipboard.
  • Paste that value to BOT_TOKEN in the .env file.
  • Go into the Basic Information section of the app in Slack's dashboard, scroll down to App-Level Token.
  • Click the Generate Token and Scopes button, give the token a name and create it, and copy the value to the clipboard.
  • Paste that value to APP_TOKEN in the .env file.

🐳   Starting The App With Docker (Or Not)

There is a Docker file included in the repository, which is the recommended way of hosting the app locally:

  • Make sure that Docker is installed
  • In the terminal, make sure you are in the root of the project
  • Execute the docker-compose up command
  • The app should be up and running and ready to accept payloads from your workspace

For those who do not wish to use Docker, just execute npm run start.

🥳   Opening The Demo

  • Open your Slack workspace
  • Open any conversation or channel
  • Use the /block-builder slash command to launch the app's main menu.
  • Have fun!