hoangsonww/AI-Gov-Content-Curator

Enable customizable topic subscriptions and real-time alerts

Open

#28 opened on Aug 6, 2025

View on GitHub
 (0 comments) (1 reaction) (2 assignees)TypeScript (18 forks)auto 404
backendci/cdcrawlerdocumentationenhancementfrontendgood first issuehelp wanted

Repository metrics

Stars
 (29 stars)
PR merge metrics
 (PR metrics pending)

Description

Description:
Currently SynthoraAI sends a single daily newsletter covering all articles. To improve relevance and engagement, allow users to subscribe to specific topics, keywords or sources and receive real-time alerts (via email and/or in-app/web notifications) when new matching articles are ingested.

Acceptance Criteria:

  1. Users can select one or more topics, keywords, or sources from the frontend “Preferences” or “Subscriptions” page.
  2. Subscriptions are persisted in the user profile (MongoDB).
  3. When the crawler/backend ingests a new article that matches a user’s subscription criteria, the system immediately enqueues a notification job.
  4. Notifications support both:
    • Email: via existing Resend integration
    • Web Push / In-app: via a new notifications endpoint and WebSocket or polling fallback
  5. Users can manage (add/remove) their subscriptions and toggle real-time vs. daily digest modes.
  6. All subscription and notification APIs are documented in Swagger.

Tasks:

  • Add Subscription schema in Mongoose (fields: userId, topics, keywords, sources, mode)
  • Build frontend “Subscriptions” UI: multi-select topics, keyword input, source checkboxes, mode toggle
  • Create backend endpoints:
    • GET /api/subscriptions
    • POST /api/subscriptions
    • PUT /api/subscriptions/:id
    • DELETE /api/subscriptions/:id
  • Extend crawler/backend ingestion pipeline to evaluate article metadata against active subscriptions and enqueue notification jobs
  • Implement notification service:
    • Email notifications via Resend
    • Web Push / in-app notifications via Socket.io or polling
  • Add notification preferences to user settings and persist choices
  • Write Playwright and Jest tests for subscription flows, ingestion triggers, and notification delivery
  • Update Swagger docs with new subscription & notification endpoints

Estimated Effort: ~2 sprints

Contributor guide