devtrack icon indicating copy to clipboard operation
devtrack copied to clipboard

[FEAT] Add weekly email digest via Resend

Open Priyanshu-byte-coder opened this issue 6 months ago • 11 comments

Summary

Send users a weekly email digest every Monday with their key stats from the past week: commits, streak status, top repo, PR summary, and goal progress.

Motivation

Push users back to DevTrack even when they haven't visited. A weekly "Your week in code" email is a proven engagement driver.

Acceptance Criteria

  • [ ] New POST /api/digest/send endpoint (called by a scheduled job or manual trigger)
  • [ ] Uses Resend for email delivery (npm install resend)
  • [ ] Email template rendered with @react-email/components (or simple HTML string)
  • [ ] Content: current streak, commits this week, PRs merged this week, top repo, goal progress
  • [ ] User opt-in setting in Settings page (new DB column digest_email_enabled BOOLEAN DEFAULT false)
  • [ ] Unsubscribe link in footer (sets flag to false)
  • [ ] Requires new env vars: RESEND_API_KEY, RESEND_FROM_EMAIL
  • [ ] Add both to .env.example

New Dependencies

  • resend
  • @react-email/components (optional, for HTML email template)

Files to Touch

  • New: src/app/api/digest/send/route.ts
  • src/app/dashboard/settings/page.tsx
  • supabase/schema.sql

Priyanshu-byte-coder avatar May 16 '26 19:05 Priyanshu-byte-coder

Hi @Priyanshu-byte-coder I would like to work on this issue, please assign this issue to me under lable: gssoc:approved as well.

abdullahxyz85 avatar May 17 '26 02:05 abdullahxyz85

Hi @Priyanshu-byte-coder , I’d like to work on this issue under GSSOC 26.

This looks like a really interesting backend feature involving scheduled jobs, email delivery, and user engagement workflows.

My approach would be to:

  • Implement the POST /api/digest/send endpoint for triggering weekly digest emails
  • Integrate Resend for email delivery
  • Build a clean email template using @react-email/components (or fallback HTML if preferred)
  • Include weekly stats like streak status, commits, merged PRs, top repo, and goal progress
  • Add the opt-in setting in the Settings page along with the required DB schema update
  • Implement unsubscribe handling securely by updating the digest_email_enabled flag
  • Document all required environment variables in .env.example

I’d be happy to work on this if it’s available. Thanks!

maria-453 avatar May 17 '26 17:05 maria-453

Hi @Priyanshu-byte-coder, I would like to work on this issue under GSSoC 2026. I have experience working with backend integrations and email workflows, and I’m interested in implementing the weekly email digest feature using Resend. Please assign this issue to me. Thanks!

Aarya1402 avatar May 19 '26 06:05 Aarya1402

Hi , I would like to work on this issue under GSSoC'26. Kindly assign this issue to me. Thank you!

mahi0097 avatar May 19 '26 10:05 mahi0097

Hey @Priyanshu-byte-coder, I'm a GSSoC 26 contributor and would like to work on this issue. Please assign it to me. /claim /assign

PrishaNagpal avatar Jun 21 '26 12:06 PrishaNagpal

Hi @Priyanshu-byte-coder 👋

I would like to work on this issue under GSSoC 2026.

I have reviewed the requirements . I’m interested in contributing to this issue and would appreciate it if you could assign it to me.

Thank you!

manisha2008-creator avatar Jun 29 '26 16:06 manisha2008-creator

@manisha2008-creator This issue is already taken by @abdullahxyz85. Check other open issues!

github-actions[bot] avatar Jun 29 '26 16:06 github-actions[bot]

Hey @abdullahxyz85 — this issue was assigned a while back with no recent activity. Unassigning so it's available for Hacktoberfest contributors. Still working on it? Comment and we'll reassign you.

Priyanshu-byte-coder avatar Oct 14 '26 18:10 Priyanshu-byte-coder

Assigned to @Priyanshu-byte-coder! You have 7 days to open a PR. No PR after 7 days = auto-unassigned so others can pick it up. Good luck!

github-actions[bot] avatar Oct 14 '26 18:10 github-actions[bot]

Done: the weekly digest email runs from /api/cron/weekly-digest.

Priyanshu-byte-coder avatar Nov 04 '26 03:11 Priyanshu-byte-coder

✅ Closed as completed!

If DevTrack has been useful, a ⭐ star on the repo helps the project grow and reach more developers.

github-actions[bot] avatar Nov 04 '26 03:11 github-actions[bot]