Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Phase 5: Weekly digest email (new this week + closing in 7 days)

Đang mở
#38 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
react, supabase, typescript
Lĩnh vực
backend, database, devops, frontend

Hướng nghiên cứu

Read PRD §8.12 and inspect the existing link-health cron, resource fields, profiles schema, and profile page. Then use the listed files—src/emails/weekly-digest.tsx, src/app/api/cron/weekly-digest/route.ts, src/lib/email.ts, and vercel.json—as entry points. Done means opted-in users receive the two requested sections with unsubscribe and preference controls on the scheduled weekly run.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Description

Implement weekly digest email as specified in PRD §8.12. This is a P2 requirement for Phase 5.

Acceptance Criteria (from PRD §8.12)

  • "New this week" + "closing in 7 days" — sent via Resend or Mailvex

Current State

  • No email infrastructure exists
  • Link-health cron runs weekly (Monday 03:00 UTC)
  • Resources have createdAt and deadline fields
  • Supabase Auth has user emails

Implementation Plan

  1. Choose email provider: Resend (recommended) or Mailvex (dogfooding)
  2. Create email template:
    • Section 1: New this week (resources created in last 7 days)
    • Section 2: Closing in 7 days (deadlines within 7 days)
    • Unsubscribe link
  3. Build email generation logic:
    • Query new resources: createdAt > now() - 7 days
    • Query closing deadlines: deadline BETWEEN now() AND now() + 7 days
    • Render HTML email (React Email or MJML)
  4. Schedule sending:
    • Vercel Cron (weekly, different day than link-health)
    • Or Supabase pg_cron
  5. User preferences:
    • Add emailDigest boolean to profiles table (default true)
    • Allow unsubscribe in email and on profile page

Files to Create

  • src/emails/weekly-digest.tsx (new) - React Email template
  • src/app/api/cron/weekly-digest/route.ts (new) - Cron endpoint
  • src/lib/email.ts (new) - Email sending utility (Resend client)
  • vercel.json - add weekly digest cron schedule

Email Template Structure

Subject: StudentStack Weekly — 3 new offers, 2 deadlines closing soon

┌─────────────────────────────────────────────┐
│  🎓 StudentStack Weekly Digest              │
├─────────────────────────────────────────────┤
│  📅 New This Week (3)                       │
│  ┌─────────────────────────────────────┐   │
│  │ GitHub Copilot — Free Student Plan  │   │
│  │ AI coding assistance • Free         │   │
│  │ [Claim Offer]                       │   │
│  └─────────────────────────────────────┘   │
│  ...                                       │
├─────────────────────────────────────────────┤
│  ⏰ Closing in 7 Days (2)                   │
│  ┌─────────────────────────────────────┐   │
│  │ Google Summer of Code 2026          │   │
│  │ Applications close Oct 15           │   │
│  │ [View Details]                      │   │
│  └─────────────────────────────────────┘   │
├─────────────────────────────────────────────┤
│  [Unsubscribe] • [Manage Preferences]       │
└─────────────────────────────────────────────┘

Dependencies

  • resend npm package
  • @react-email/components or react-email for templates
  • Vercel Cron or Supabase pg_cron for scheduling

Notes

  • Only send to users who opted in (emailDigest = true)
  • Batch send in chunks (Resend supports batch)
  • Track open/click rates via Resend dashboard
  • Consider: only send if there's actual new content
Ngôn ngữ chính
TypeScript
Star
1
Fork
6
Merge trung bình
11 giờ 16 phút
Pull request đã merge (30 ngày)
16

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Your-Voldemort/StudentStack

Tất cả issue của Your-Voldemort/StudentStack

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.