Skip to content

feat: email bounce handling, job monitoring dashboard, API key analytics, benchmarking - #988

Merged
nanaf6203-bit merged 4 commits into
MettaChain:mainfrom
JoeX17:feat/email-bounce-job-monitoring-api-key-analytics-benchmarking
Jul 27, 2026
Merged

feat: email bounce handling, job monitoring dashboard, API key analytics, benchmarking#988
nanaf6203-bit merged 4 commits into
MettaChain:mainfrom
JoeX17:feat/email-bounce-job-monitoring-api-key-analytics-benchmarking

Conversation

@JoeX17

@JoeX17 JoeX17 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Closes #943, Closes #944, Closes #945, Closes #946

Changes

#946 - Performance Benchmarking Suite

  • Benchmark script for 10 critical API endpoints
  • Baseline recording with p50/p95/p99 latencies
  • Performance budgets: p95 < 500ms lists, p95 < 200ms detail
  • GitHub Actions workflow for CI benchmark runs

#945 - API Key Usage Analytics & Quota

  • Daily/monthly usage aggregation
  • Configurable monthly quota per API key
  • 429 response when quota exceeded
  • Usage alerts at 75%, 90%, 100% thresholds
  • Usage analytics endpoint

#944 - Background Job Monitoring Dashboard

  • Queue list with job counts (waiting/active/completed/failed)
  • Failed job details and error inspection
  • Retry/cancel failed jobs endpoints
  • Admin-only access via JWT + RolesGuard

#943 - Email Bounce Handling

  • Webhook endpoint for bounce/complaint notifications
  • List-Unsubscribe headers in marketing emails
  • Hard bounce auto-suppress with email status update
  • Spam complaint handling
  • Sender reputation dashboard endpoint

…chmark suite

Closes MettaChain#943, MettaChain#944, MettaChain#945, MettaChain#946

- Email bounce/complaint webhook handling with spam complaint support
  and sender reputation dashboard (GET /email/reputation)
- List-Unsubscribe header added to marketing emails
- Hard bounce auto-suppress sets user emailStatus to BOUNCED
- Background job monitoring dashboard for BullMQ queues under
  admin/queues with retry/cancel endpoints (admin-only)
- API key usage analytics with daily aggregation, configurable
  monthly quota, 429 on exceeded, usage alerts at 75/90/100%
- GET /auth/api-keys/:id/usage returns detailed usage breakdown
- Performance benchmark suite (scripts/benchmark.ts) for 10 critical
  endpoints with p50/p95/p99 latencies and performance budgets
- GitHub Actions workflow for weekly and PR-triggered benchmarks
- Prisma schema: ApiKeyUsageDaily model, monthlyQuota on ApiKey,
  SpamAction enum and spamAction field on EmailBounce
@drips-wave

drips-wave Bot commented Jul 26, 2026

Copy link
Copy Markdown

@JoeX17 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@nanaf6203-bit nanaf6203-bit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

# Conflicts:
#	prisma/schema.prisma
@nanaf6203-bit
nanaf6203-bit merged commit 78a541a into MettaChain:main Jul 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants