Appearance
notifications
FreshSource: BIBLE.md (Phase 12 Phase 2, notifications 5 routes)
Discord webhooks plus 5 notification channels. Exports a notify() function used everywhere.
5 channels
| Channel | Purpose |
|---|---|
cookie-failures | Cookie refresh failures |
rank-changes | Rank moved more than threshold |
campaign-completion | Campaign finished |
errors | Critical errors |
health-alerts | Account health drops |
Routes (5)
| Method | Route | What |
|---|---|---|
| POST | /notifications/send | Send one notification |
| GET | /notifications/channels | List configured channels |
| PUT | /notifications/channels/:name | Update channel webhook |
| GET | /notifications/history | Recent notifications |
| POST | /notifications/test | Send test message |
Example payload
bash
curl -X POST http://localhost:4700/notifications/send \
-H "Content-Type: application/json" \
-d '{
"channel": "rank-changes",
"title": "Rank improvement",
"message": "junk removal dallas: 12 to 7",
"level": "info"
}'Configuration
Each channel maps to a Discord webhook URL in .env:
DISCORD_WEBHOOK_COOKIE_FAILURES=https://discord.com/api/webhooks/...
DISCORD_WEBHOOK_RANK_CHANGES=https://discord.com/api/webhooks/...
DISCORD_WEBHOOK_CAMPAIGN_COMPLETION=https://discord.com/api/webhooks/...
DISCORD_WEBHOOK_ERRORS=https://discord.com/api/webhooks/...
DISCORD_WEBHOOK_HEALTH_ALERTS=https://discord.com/api/webhooks/...