Skip to content

feat(automation): saved searches with email/in-app notifications #374

Description

@paruff

Problem

Pros need to be notified instantly when a property matching their criteria hits the market. Manual polling is too slow for competitive markets.

Acceptance Criteria

  • Create SavedSearch model: user, name, criteria (JSON), notification_frequency (immediate/daily/weekly), is_active
  • Create core/services/search_alerts.py with run_saved_searches() and send_notification(user, property, search)
  • Add management command: python manage.py run_saved_searches --frequency=immediate
  • Email notification via Django's email backend (SMTP configurable)
  • In-app notification center at /notifications/ with unread badge
  • Allow user to configure frequency per search (immediate / daily digest / weekly digest)
  • Deduplicate: don't notify twice for same property
  • E2E test: create saved search, trigger discovery, verify notification appears
  • Unit tests for search matching and deduplication logic

Implementation Guide (for opencode/mimo v2.5)

  1. Create SavedSearch model in core/models/discovery.py
  2. Create core/services/search_alerts.py with matching + notification logic
  3. Create core/management/commands/run_saved_searches.py
  4. Add notification center view at /notifications/
  5. Add notifications/ URL and template
  6. Add Celery/Redis task for immediate notifications (or cron for daily/weekly)

Dependencies

  • Requires: Discovery pipeline data sources (MLS, Rentometer, ATTOM)
  • Requires: Email backend configured (SMTP)
  • Enhances: Phase 1 data feeds (makes them actionable)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4:automationPhase 4: Automation & AlertsenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions