Skip to content

[FEAT] Add Slack/Discord webhook notifications for weekly digest #20

@Priyanshu-byte-coder

Description

@Priyanshu-byte-coder

What Needs to Be Done

Allow users to configure a Slack or Discord webhook URL in their profile settings. Send them a weekly summary of their metrics (commits, PRs, goal progress) via the webhook.

Why This Matters

Developers forget to check dashboards. Push-based notifications bring the data to where they already are (team Slack/Discord channels).

Files to Create/Modify

  • `src/app/profile/page.tsx` — add webhook URL input field (after [FEAT] Add user profile/settings page #15 is merged)
  • `supabase/schema.sql` — add `webhook_url` column to `users` table
  • `src/app/api/notifications/weekly/route.ts` — new API route that sends digests
  • Trigger: Vercel Cron Job (`vercel.json` cron config) or external scheduler

Acceptance Criteria

  • User can add/update Slack or Discord webhook URL in profile
  • Weekly digest sends: total commits, PRs merged, goal completion %
  • Works with both Slack and Discord webhook formats
  • Handles webhook failures gracefully (don't crash, log error)
  • No TypeScript errors, lint passes

Tech Context

Slack/Discord webhooks accept POST with JSON body:
```ts
// Slack
{ text: "Your weekly DevTrack summary: 23 commits, 5 PRs merged, 80% goals hit" }

// Discord
{ content: "Your weekly DevTrack summary: ..." }
```

For Vercel Cron:
```json
// vercel.json
{ "crons": [{ "path": "/api/notifications/weekly", "schedule": "0 9 * * 1" }] }
```

Depends on #15 (profile page) being merged first.

Metadata

Metadata

Labels

advancedAdvanced implementation taskenhancementNew feature or requestgssoc26GSSoC 2026 contributionlevel3GSSoC Level 3 - Advanced (45 points)~8hEstimated 8 hours

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions