Template repository for bootstrapping Serverless Slack Apps using Swift & AWS Lambdas.
To get started using this template, I recommend using GitHub CLI and issuing the following command to create & clone a new public repo based off this template.
gh repo create <AppName> \
--template spydercapriani/SlackApp-SwiftServerlessTemplate \
--public \
--clone
There is a shared scheme for SlackApp
executable product with a few
environment variables necessary for running the app.
- (!)
SLACK_ACCESS_TOKEN
- This can be found in your Slack's App Dashboard under
OAuth & Permissions > Bot User OAuth
- This can be found in your Slack's App Dashboard under
- (?)
SLACK_VERIFICATION_TOKEN
1- This can be found in your Slack's App Dashboard under
Basic Information
- This can be found in your Slack's App Dashboard under
(!) denotes required
(?) denotes optional
See Brewfile for tool dependencies.
SwiftBlocksUI leverages MacroApp under the hood to provide a declarative "SwiftUI" like approach to creating interactive Slack "applications" using Swift.
MacroApp layers on top of MacroExpress which focuses on generating API endpoints in a fast, typesafe way.
MacroLambda acts as a middleware component for running MacroExpress apps as AWS Lambda Runtime executables.
Plugin for creating an AWS Lambda binary .zip using an AmazonLinux2 container via Docker.
Usage: swift package --disable-sandbox archive
This will create a <ProductName>.zip
file located at:
.build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager//.zip which can be used for uploading to AWS Lambda.
Requires Docker to be installed/running
brew install docker
- Instant "SwiftUI" Flavoured Slack Apps
- Deploying Swift on AWS Lambda
- Block Kit Builder: Block Kit gives you a way to create rich, interactive UI for your Slack app. This site lets you preview Slack UI elements and better understand how they are created.
Footnotes
-
This will soon be deprecated in favor of
SLACK_SIGNING_SECRET
↩