EventSignUpService
Component Detail
Description
Orchestrates the sign-up and cancellation business logic for events, enforcing idempotency and preventing double registration. Coordinates between the registration repository and the push notification system. Queues registration actions for offline sync when connectivity is unavailable.
event-sign-up-service
Sources & reasoning
The source doc highlights follow-up and participation tracking as a pain point (line 116, HLF survey finding). Event sign-up is the mobile mechanism that enables structured participation records without manual coordinator effort. The blueprint assigns [v1.0], consistent with the Phase 2 roadmap scope (Fase 2: Bufdir-rapportering, oppfølging); it extends the MVP event creation and listing foundation rather than replacing it.
-
docs/source/likeperson.md · line 116Oppfølging av likepersoner: 40 % var ikke fornøyd med oppfølgingen i spørreundersøkelse. Scenariobaserte push-meldinger og kalendersynkronisering.
Responsibilities
- Validate that a peer mentor is not already registered before submitting sign-up
- Submit idempotent registration requests to the backend API
- Enqueue registration and cancellation operations in the offline sync queue when offline
- Trigger push notification dispatch upon confirmed registration
- Expose participant list retrieval for coordinators managing an event
Interfaces
signUp(eventId: string, userId: string): Promise<RegistrationResult>
cancelRegistration(eventId: string, userId: string): Promise<void>
isRegistered(eventId: string, userId: string): Promise<boolean>
getParticipants(eventId: string): Promise<Participant[]>
syncPendingRegistrations(): Promise<SyncResult>
Related Data Entities (2)
Data entities managed by this component