## Overview Alerts are stored in SQLite but never delivered. NGOs never receive notifications. We need a lightweight background worker to attempt delivery. ## Scope - [ ] Read unacknowledged alerts from the `alerts` table - [ ] Attempt email delivery via SMTP (configurable in `.env`) - [ ] Attempt webhook delivery via HTTP POST to `organization.webhook_url` - [ ] Update delivery status in DB (`delivered`, `failed`, `pending`) - [ ] Expose retry logic (max 3 attempts with exponential backoff) - [ ] Add endpoint `GET /api/organizations/{org_id}/alerts/pending` for monitoring ## Acceptance Criteria - When an alert is created, the worker attempts delivery within 60 seconds - Failed deliveries are retried up to 3 times - Delivery status is queryable via API - Worker runs as FastAPI `BackgroundTasks` (no external queue needed for MVP) ## Resources - `src/climatevision/api/main.py` — alert creation endpoints - `src/climatevision/db.py` — SQLite schema - `team_docs/PM_ROLE_UPDATES_FOR_GAPS.md` — gap #5 details **Difficulty:** Intermediate **Labels:** `help wanted`, `backend`, `api`
Activity
[-][Help Wanted] Build alert delivery worker (email + webhook)[/-][+][Good First Issue] Build alert delivery worker (email + webhook)[/+]Presmanes3 commentedon May 16, 2026
Hi, I would like to take care of this task! Could you please assign it to me?
feat: add alert delivery worker with email/webhook support