Summary
Wire up email notifications for the existing anomaly detection system, so users get proactive alerts without opening the app.
What Already Exists
Anomaly table with types: high_expense, unusual_category, large_transfer, budget_exceeded
_detect_anomalies() in analytics engine with threshold-based detection
/api/analytics/v2/anomalies endpoint + review/dismiss workflow
AnomalyReviewPage in frontend with severity levels
notify_anomalies field in user preferences (not wired up)
What's Missing
1. Email Delivery
- Integrate a transactional email service (Resend or SendGrid free tier)
- Daily digest: batch all new anomalies into one email
- Clean email template showing flagged transactions with context
2. Notification Preferences
- Wire up existing
notify_anomalies preference to actually trigger emails
- Add email input field in Settings
- Threshold configuration for sensitivity
3. Rate Limiting
- Max 1 digest email per day
- Never include sensitive account details in emails
Acceptance Criteria
Summary
Wire up email notifications for the existing anomaly detection system, so users get proactive alerts without opening the app.
What Already Exists
Anomalytable with types: high_expense, unusual_category, large_transfer, budget_exceeded_detect_anomalies()in analytics engine with threshold-based detection/api/analytics/v2/anomaliesendpoint + review/dismiss workflowAnomalyReviewPagein frontend with severity levelsnotify_anomaliesfield in user preferences (not wired up)What's Missing
1. Email Delivery
2. Notification Preferences
notify_anomaliespreference to actually trigger emails3. Rate Limiting
Acceptance Criteria