Practitionist / Practitionist/elluminar_web

Novu notification infrastructure + WhatsApp-native automation

Open
#10 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

notifications post-mvp v1
Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
17h 2m
Merged PRs (30d)
18

Description

Why / Context

MVP sends transactional email directly via Resend and writes in-app Notification rows. This issue graduates delivery to Novu workflows (multi-channel orchestration, digests, preferences) and adds WhatsApp-native automation — a teardown STEAL from Euron Systems: "materially cheaper, higher-open-rate conversion channel than email alone for India-first growth" (built as a first-class channel, not an afterthought).

Schema already in place — NO migration required

  • Notification (in-app inbox, channelsSent[]) and NotificationPreference.prefs (category × channel matrix including whatsapp)
  • DeviceToken for push (mobile later)
  • UserProviderIdentity(provider: NOVU) for subscriber mapping
  • User.phone + marketingOptIn; Announcement.channels[]

Implementation plan

  1. Novu setup (cloud): environments, API keys; subscriber sync service (src/lib/notifications/novu.ts) — upsert subscriber on signup/profile change, store subscriberId in UserProviderIdentity.
  2. Introduce a notification facade (notify(userId, category, payload)) that (a) writes the in-app Notification row, (b) triggers the Novu workflow named by category; migrate all MVP direct-Resend call sites to the facade (Resend becomes a Novu email provider).
  3. Recreate MVP templates as Novu workflows: verification, receipts, enrollment, cohort reminders, review-ready, refund status, payout paid, dunning — with digest rules (e.g., discussion replies batched hourly).
  4. Preference center UI backed by NotificationPreference.prefs; enforce per-category channel opt-outs in the facade; marketing vs transactional separation (DPDP consent).
  5. WhatsApp BSP: pick provider (Meta Cloud API direct, or via Novu-supported BSP e.g. Gupshup/Twilio); register templates (utility: cohort reminder, payment link, review-ready; marketing: new-batch broadcast with opt-in only).
  6. WhatsApp funnel automations (Euron pattern): "new cohort open — reply YES to get the payment link" flow → inbound webhook → send checkout link; enrollment-deadline and abandoned-cart nudges.
  7. Announcement fan-out: Announcement.channels drives Novu topic broadcast per cohort/course.
  8. Deliverability ops: bounce/complaint webhooks → suppress channel; admin send-log view.

Acceptance criteria

  • All MVP transactional messages flow through the facade → Novu (Resend as provider), in-app rows still written
  • User channel preferences honored per category; unsubscribes suppress marketing only
  • WhatsApp utility templates deliver for cohort reminder + review-ready; YES-reply flow returns a working payment link
  • Digest batching works for discussion replies
  • Announcement to a cohort fans out to selected channels

Dependencies / sequencing

  • MVP M13 (email baseline) required; issues #7 (funnel nudges) and #12 (event tracking) consume this
  • WhatsApp template approval lead time — file templates early

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/lib/notifications/novu.ts and inspect the existing direct-Resend call sites, then review the Notification, NotificationPreference, UserProviderIdentity, User, and Announcement entities described in the issue. Confirm the MVP M13 dependency before planning the facade and provider integrations. Done means the listed acceptance criteria pass, including Novu delivery, preferences, WhatsApp replies, digests, and announcement fan-out.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend, cloud, payments
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.