This document describes the runtime configuration and deployment expectations for the notifier package.
The notifier runs on Convex.
Important pieces:
- Convex functions and schema
- HTTP endpoints for Slack and Discord installs and commands
- an hourly polling cron
Slack install flow depends on these environment variables:
SLACK_CLIENT_IDSLACK_CLIENT_SECRETSLACK_REDIRECT_URISLACK_SIGNING_SECRET
Discord install flow depends on these environment variables:
DISCORD_APPLICATION_IDDISCORD_CLIENT_IDDISCORD_PUBLIC_KEYDISCORD_BOT_TOKENDISCORD_REGISTER_COMMANDS_SECRET
AI-powered release summaries additionally support:
OPENAI_API_KEYOPENAI_SUMMARY_NANO_MODELoptional overrideOPENAI_SUMMARY_MINI_MODELoptional overrideGITHUB_TOKENoptional, for higher GitHub API rate limits
These are read in:
If Slack env vars are missing, the Slack OAuth callback returns 500 Server misconfiguration.
If Discord env vars are missing, the Discord install flow, interaction verification, or command registration will fail.
Defined in convex/http.ts:
GET /slack/oauth-callbackPOST /slack/npmtrackPOST /slack/npmuntrackPOST /slack/listPOST /slack/helpPOST /slack/events
These routes are intended to be configured in Slack as:
- OAuth redirect URL:
/slack/oauth-callback - Slack slash command request URLs:
/slack/npmtrack,/slack/npmuntrack,/slack/list,/slack/help - event subscriptions:
/slack/events
Defined in convex/http.ts:
GET /discord/installPOST /discord/interactionsPOST /discord/register-commands
These routes are intended to be configured in Discord as:
- Interactions endpoint URL:
/discord/interactions - Optional post-deploy command registration trigger:
/discord/register-commandswithx-patchpulse-secret
The notifier uses an hourly cron defined in convex/crons.ts:
poll npm packages
This cron:
- fetches npm metadata
- detects updates
- stores the latest version
- stores GitHub repo metadata when available
- delivers notifications grouped by target channel
- queues Slack-only release enrichment jobs that can backfill links and post thread summaries later
Slack installs create:
- a
subscribersrow for the workspace - a
slackSubscriberDetailsrow with bot token and webhook channel details
Discord servers create subscriber rows lazily on first command use:
- a
subscribersrow for the guild - a
discordSubscriberDetailsrow with guild identity details
Tracked packages create:
- a
packagesrow - one or more
subscriptionsrows
- Set
SLACK_CLIENT_ID - Set
SLACK_CLIENT_SECRET - Set
SLACK_SIGNING_SECRET - Set
SLACK_REDIRECT_URI - Set
DISCORD_APPLICATION_ID - Set
DISCORD_CLIENT_ID - Set
DISCORD_PUBLIC_KEY - Set
DISCORD_BOT_TOKEN - Set
DISCORD_REGISTER_COMMANDS_SECRET - Set
OPENAI_API_KEYif AI summaries should be enabled - Optionally set
GITHUB_TOKENif you expect heavier GitHub API usage - Confirm Slack app redirect URL matches
SLACK_REDIRECT_URI - Confirm slash command request URLs point to the Convex HTTP endpoints
- Confirm event subscriptions point to
/slack/events - Confirm Discord interactions point to
/discord/interactions - Run
curl -X POST -H "x-patchpulse-secret: $DISCORD_REGISTER_COMMANDS_SECRET" https://grand-yak-92.convex.site/discord/register-commands - Confirm the poller cron is deployed
- Install the Slack app into a test workspace
- Run
/npmtrack react - Run
/npmtrack react #general - Run
/npmlist - Verify the default channel and explicit channel grouping
- Verify update notifications arrive in the expected channels
- Verify new notifications receive
⏳while enrichment is pending - Verify a thread summary appears and the reaction changes to
📝when evidence is available - Install the Discord app into a test server
- Run
/npmtrack package:react - Run
/npmtrack package:react channel:#releases - Run
/npmlist - Verify the bot replies ephemerally and notifications arrive in the chosen channel