Skip to content

Add webhook ingestion endpoints for dashboard activity #31

@Lakes41

Description

@Lakes41

Summary

Add secure webhook ingestion routes that can receive membership, pass, guild, and verification events and turn them into dashboard activity records.

Current Behaviour

The dashboard activity feed is static mock data, and the optional webhook utilities are not wired into dashboard route handlers.

Expected Behaviour

The dashboard should have server-side webhook endpoints that verify signatures, parse supported event types, and record or expose resulting activity events.

Suggested Implementation

Create Next.js route handlers under app/api/webhooks/. Use packages/webhook-utils for signature verification. Define an event mapping layer from webhook payloads to the dashboard ActivityEvent model.

Files or Areas Likely Affected

  • apps/dashboard/app/api/webhooks/
  • apps/dashboard/lib/activity/
  • apps/dashboard/lib/env.ts
  • packages/webhook-utils/src/
  • apps/dashboard/app/activity/page.tsx
  • README.md

Acceptance Criteria

  • Webhook routes verify signatures before processing payloads
  • Unsupported event types return a safe response without crashing
  • Valid events are mapped into typed dashboard activity records
  • Replayed or duplicate webhook events are handled idempotently
  • Tests cover valid, invalid, duplicate, and malformed webhook payloads
  • Documentation explains how to configure webhook secrets

Additional Notes

Assumption: durable persistence may not exist yet. If so, use an interface that can support in-memory mock storage now and database storage later.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions