This repository serves as a template for building a Slack applications using serverless event-driven architectures on AWS. The template covers the basic auth set up for multi workspace deployments and how to handle different Slack events.
The architecture of the application is as follows:
- AWS account
- Slack account with permissions to create apps in the workspace
- Node.js and pnpm installed
- AWS CLI installed and configured
- Create a Slack app by following the Slack API Hello World tutorial
- Copy and past the manifest file from the
slack-app-manifest.json
file in this repository to the app settings. - Note the
SLACK_CLIENT_ID
,SLACK_CLIENT_SECRET
and theSLACK_SIGNING_SECRET
from the Slack app settings.
- Clone this repository.
- Navigate to the cloned directory and then to the services/slack-interface directory.
- Run
pnpm install
to install dependencies. - Have your aws credentials configured in your environment.
- Deploy the application using using the command
pnpm ci:deploy -c stage=dev
. - Note the api endpoint from the output of the deployment.
- In the App Manifest file, update the with the actual API endpoint.
- To install the app to your workspace, visit the site
<api-endpoint>/slack/install
in your browser. You will be redirected to Slack to authorize the app.
Copy this repository to your own repository and start building your own Slack application. The template provides a basic structure for handling Slack events and commands.
Contributions are welcome! Feel free to open issues or submit pull requests to enhance the functionality of this Slack application.
- Andre du Plessis - Initial work - jaduplessis
Enjoy building your event-driven Slack applications!