Phase 5: Weekly digest email (new this week + closing in 7 days)
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
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ả
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
createdAtanddeadlinefields - Supabase Auth has user emails
Implementation Plan
- Choose email provider: Resend (recommended) or Mailvex (dogfooding)
- 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
- 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)
- Query new resources:
- Schedule sending:
- Vercel Cron (weekly, different day than link-health)
- Or Supabase pg_cron
- User preferences:
- Add
emailDigestboolean to profiles table (default true) - Allow unsubscribe in email and on profile page
- Add
Files to Create
src/emails/weekly-digest.tsx(new) - React Email templatesrc/app/api/cron/weekly-digest/route.ts(new) - Cron endpointsrc/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
resendnpm package@react-email/componentsorreact-emailfor 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
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Your-Voldemort/StudentStack
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
Your-Voldemort/StudentStack#42 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Your-Voldemort/StudentStack#41 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Your-Voldemort/StudentStack#40 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Your-Voldemort/StudentStack#37 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 3/5 3-5 ngày Mức phù hợp với người mới 68/100
Your-Voldemort/StudentStack#36 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Your-Voldemort/StudentStack
Issue tương tự
-
Flaky: mongodb-memory-server 'Port already in use' when another process starts a mongod concurrentlyĐang mởarea:testing bug effort:S priority:P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
lens:agent lens:process process
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
thebristolsound/birdbrain#1772 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug priority:low ready-for-dev
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Automattic/data-liberation-agent#685 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Business
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày