Skip to content

Build an audit activity ingestion model #25

@Lakes41

Description

@Lakes41

Summary

Move the activity log from a static mock list towards a structured audit activity model that can consume real events from dashboard actions, webhooks, or core API events.

Current Behaviour

mockActivity is a hard-coded array with simple fields such as type, description, timestamp, and actor. Dashboard stats and the activity page depend on this static data.

Expected Behaviour

Activity should be represented by a typed model that supports consistent event types, actors, entity references, severity, and source metadata.

Suggested Implementation

Define an ActivityEvent model and add an activity service behind the data access layer. Map existing mock events to the new shape. Add helper functions to create events from pass creation, member role changes, webhook events, and live API responses.

Files or Areas Likely Affected

  • apps/dashboard/lib/mock-data.ts
  • apps/dashboard/lib/data/
  • apps/dashboard/app/activity/page.tsx
  • apps/dashboard/app/dashboard/page.tsx
  • packages/integration-client/src/types.ts
  • packages/webhook-utils/src/

Acceptance Criteria

  • Activity events use a structured typed model
  • Existing mock activity is migrated to the new shape
  • Activity page renders actor, timestamp, event type, and target entity where available
  • Dashboard summary stats use the activity service instead of raw arrays
  • The model can represent pass, guild, member, access, and webhook events
  • Documentation explains the supported event types

Additional Notes

Do not implement a full analytics system in this issue. Keep the scope to audit event modelling and ingestion boundaries.

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