feat: add webhook notification system for Slack, Discord, and email a… - #133
Open
Shikhar-404exe wants to merge 3 commits into
Open
feat: add webhook notification system for Slack, Discord, and email a…#133Shikhar-404exe wants to merge 3 commits into
Shikhar-404exe wants to merge 3 commits into
Conversation
…lerts - Add modular provider system (Slack/Discord/Email) with abstract base class - Implement fire-and-forget dispatch isolated from core scheduler flow - Add per-event-type rate limiting (default 300s window) - Fire notifications after scrape/discover/draft cycles: jobs:new, contacts:found, emails:drafted, scrape:error, cycle:complete - Add Gateway REST endpoints: GET/PUT /api/notifications/config, POST /api/notifications/test - Add Settings tab to dashboard with webhook URL inputs, event-type checkboxes, and test buttons for each channel - Reuse existing Gmail SMTP infrastructure for email notifications - Document new env vars and add to docker-compose.yml
…structure - Remove duplicate btn-scrape and btn-export-csv elements - Fix misplaced nav-right div (was outside <nav> tag) - Fix stray closing </nav> tags - Remove duplicate event listeners for scrape modal
|
@Shikhar-404exe is attempting to deploy a commit to the Vaibhav Sharma's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements a modular webhook notification system that pushes real-time alerts to Slack, Discord, and Email when automation events occur. Closes #74.
Event Types Notified
jobs:newcontacts:foundemails:draftedscrape:errorcycle:completeArchitecture — Modular Provider System
notifier.dispatch() ← fire-and-forget, never propagates exceptions ├── SlackProvider (slack.py) ← Incoming Webhooks, blocks layout ├── DiscordProvider (discord.py) ← Webhook embeds, color-coded └── EmailProvider (email.py) ← Gmail SMTP (reuses existing mailer pattern)
Adding a new channel = subclass
NotificationProvider+ register withnotifier.register().Admin Requirements Addressed
NOTIFY_RATE_LIMIT_SECS)EmailProvideruses the samesmtplib.SMTP_SSL/ Gmail App Password pattern asemail-generator-service/mailer.pyNew Files (6)
scheduler/notifier.pyscheduler/providers/base.pyNotificationProviderABC +NotificationEventdataclassscheduler/providers/slack.pyscheduler/providers/discord.pyscheduler/providers/email.pyModified Files (6)
scheduler/tasks.pyscheduler/main.pyNOTIFY_EVENTSfilter; fires error notifications on failuresgateway/main.pyGET/PUT /api/notifications/config,POST /api/notifications/testgateway/dashboard.htmldocker-compose.ymlscheduler/README.mdDashboard — Settings Tab
/data/notify_config.json)Environment Variables (all optional — notifications are no-ops when unset)
SLACK_WEBHOOK_URLDISCORD_WEBHOOK_URLNOTIFICATION_EMAILNOTIFY_RATE_LIMIT_SECS300NOTIFY_EVENTSTesting
SLACK_WEBHOOK_URLorDISCORD_WEBHOOK_URLin.envor docker-compose overridedocker compose up -d schedulerMANUAL_TASK=scrape docker compose run --rm scheduler