Skip to content

Implement event attendance ingestion pipeline #242

Description

@Lakes41

Difficulty: Advanced
Type: Feature

Background
"Full event attendance ingestion" is listed in the README's Deferred Areas. GuildPass's data model already includes communities, members, and badges (placeholder), which are natural building blocks for representing community events and attendance records.

Problem
There is currently no way to record that a member attended a community event (e.g. an AMA, a Discord voice session, an in-person meetup verified by an organizer), which blocks any future feature that wants to gate access or scoring on attendance history.

Expected outcome
A new domain model for CommunityEvent and EventAttendance, an authenticated ingestion API for recording attendance (single check-in and bulk import, since attendance is often batch-recorded after the fact from a third-party tool), and outbox events (EVENT_ATTENDANCE_RECORDED) so downstream consumers (e.g. the contribution scoring engine from issue #7, if implemented) can react.

Suggested implementation

  1. Add CommunityEvent (id, communityId, title, startsAt, endsAt) and EventAttendance (eventId, wallet, checkedInAt, source) models + migration to the Prisma schema.
  2. Add authenticated admin endpoints: POST /v1/communities/:communityId/events (create event), POST /v1/communities/:communityId/events/:eventId/attendance (single check-in), POST /v1/communities/:communityId/events/:eventId/attendance/bulk (bulk import via array payload, with per-row validation and a summary response of accepted/rejected rows).
  3. Emit an outbox event per successful attendance record within the same transaction, following the existing transactional outbox pattern.
  4. Add a badges placeholder integration point: attendance to N events of a given type could later unlock a badge (leave a documented TODO/interface, do not implement badge issuance logic in this issue — that is separate deferred scope).
  5. Add unit and integration tests, including bulk-import partial-failure behavior (some rows valid, some invalid, transaction should not fail entirely — return a per-row result).

Acceptance criteria

  • Events and attendance records can be created and are correctly scoped per community.
  • Bulk import handles partial failures gracefully with a clear per-row result.
  • Attendance recording emits a durable outbox event consistent with the existing event-type conventions.
  • New endpoints are documented in docs/openapi.json.
  • Tests cover single check-in, bulk import (all valid, partial valid, all invalid), and duplicate check-in handling.

Likely affected files/directories
apps/access-api/prisma/schema.prisma, apps/access-api/src/routes.ts, apps/access-api/src/services/*, apps/access-api/src/workers/outboxWorker.ts, docs/openapi.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSGrantFox Open Source Sponsorship program tagMaybe RewardedIssue may qualify for a reward upon successful completion per campaign rulesOfficial Campaign | FWC26Official FWC26 campaign issue — eligible for campaign scoring and rewardsfeatureNew feature, enhancement, or functional addition

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions