Data Layer medium complexity mobilebackend
0
Dependencies
2
Dependents
1
Entities
0
Integrations

Description

Data access layer managing reads and writes to the event_registrations table. Applies optimistic local updates on the mobile side so the UI reflects sign-up state immediately, and synchronises with the backend when connectivity is available.

Feature: Event Sign-up

event-registrations-repository

Responsibilities

  • Persist new event registrations to event_registrations table
  • Apply optimistic local cache updates for immediate UI reflection
  • Fetch registrations by event ID or by user ID for home dashboard display
  • Delete or cancel registrations and propagate changes to local cache
  • Resolve conflicts between optimistic local state and confirmed server state

Interfaces

save(registration: EventRegistration) -> EventRegistration
findByEventId(eventId: String) -> List<EventRegistration>
findByUserId(userId: String) -> List<EventRegistration>
findById(registrationId: String) -> EventRegistration?
delete(registrationId: String) -> void
applyOptimisticUpdate(eventId: String, registration: EventRegistration) -> void
rollbackOptimisticUpdate(eventId: String) -> void

Relationships

Dependents (2)

Components that depend on this component

Related Data Entities (1)

Data entities managed by this component