This is a generic Bolt for JavaScript (TypeScript) template app used to build Slack apps with Nitro
Before getting started, make sure you have a development workspace where you have permissions to install apps. You can use a developer sandbox or create a workspace
git clone https://github.com/vercel-partner-solutions/slack-bolt-with-nitro.git && cd slack-bolt-with-nitro && pnpm install
manifest.json
into the text box that says "Paste your manifest code here" (JSON tab) and click NextSLACK_BOT_TOKEN
SLACK_SIGNING_SECRET
NGROK_AUTH_TOKEN
to your .env
file
slack app link
update the manifest source to remote
select yes
Local
when prompted.slack/config.json
and update your manifest source to local
{"manifest": {"source": "local"},"project_id": "<project-id-added-by-slack-cli>"}
slack run
. If prompted, select the workspace you'd like to grant access toyes
if asked "Update app settings with changes to the local manifest?"hello
. Your app should reply with world!
SLACK_BOT_TOKEN
SLACK_SIGNING_SECRET
request_url
and url
fields use https://<your-app-domain>/api/slack/events
hello
and your app will respond with world!
manifest.json
manifest.json
defines your Slack app's configuration. With a manifest, you can create or update an app with a pre-defined configuration
src/bolt/app.ts
This is the Bolt app entry. It initializes @vercel/slack-bolt
's VercelReceiver
and registers listeners
src/bolt/listeners
Every incoming request is routed to a "listener". Inside this directory, we group each listener by Slack Platform feature, e.g. messages
for message events
src/server/api/slack/events.post.ts
This file defines your POST request handler that receives Slack events. Its pathname matches the URLs defined in your manifest.json
. Learn more about Hono routing here
pnpm dev:tunnel
: A helper script to automatically start your Slack app with ngrok tunneling