Skip to content

[M1][Epic 1.5] Implement threshold-based alerting with webhook notifications #61

@POWDER-RANGER

Description

@POWDER-RANGER

Problem

Start with single alert rule type (average sentiment threshold) and single notification channel (webhook or console log for MVP).

Tasks

  • Create alert rule schema (threshold type: avgSentiment > threshold)
  • Implement alert evaluation logic after ingestion completes
  • Store triggered alerts in alerts table
  • Choose notification channel (webhook recommended, email acceptable)
  • Implement notification sender
  • Add alert polling or WebSocket for frontend real-time updates
  • Create GET /api/alerts/recent endpoint

Acceptance Criteria

  • ✅ Alert created when avgSentiment crosses threshold
  • ✅ Alert appears in dashboard within 5 seconds of ingestion
  • ✅ Notification sent to configured channel
  • ✅ Alert history queryable via API

Priority: P1 - High
Labels: backend, alerts, M1, P1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions