Service Layer medium complexity backend
1
Dependencies
1
Dependents
3
Entities
0
Integrations

Description

Backend API service layer responsible for all business logic around event sign-ups. Enforces capacity limits, prevents duplicate registrations for the same user or contact, and validates role-based permissions for proxy registrations.

Feature: Event Sign-up

event-registration-service

Responsibilities

  • Process POST /api/v1/events/{id}/registrations and return created registration
  • Enforce event capacity limits and reject registrations when capacity is reached
  • Prevent duplicate registrations for the same user or contact per event
  • Validate that proxy registration is only permitted by Coordinator role
  • Update the event participant count atomically on successful registration

Interfaces

registerUser(eventId: String, userId: String) -> EventRegistration
registerContactOnBehalf(eventId: String, contactId: String, coordinatorId: String) -> EventRegistration
cancelRegistration(registrationId: String, requesterId: String) -> void
getRegistrationsForEvent(eventId: String) -> List<EventRegistration>
isAlreadyRegistered(eventId: String, userId: String) -> bool
hasCapacityAvailable(eventId: String) -> bool

Relationships

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component

Related Data Entities (3)

Data entities managed by this component