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

Description

Handles creation and persistence of events by posting to POST /api/v1/events with organization context derived from the JWT. Queues failed or offline submissions in the Drift mutation outbox for retry on reconnect. Returns the persisted event entity to the calling UI layer.

Feature: Event Creation

event-service

Sources & reasoning

Event Service encapsulates all server-side and offline interaction for event creation. The source doc specifies POST /api/v1/events, JWT org context, and Drift mutation outbox for offline - these are distinct service-layer concerns separated from the wizard UI.

No source references — this artifact was included based on reasoning alone (see above).

Responsibilities

  • POST new event records to the REST API with org-scoped JWT context
  • Enqueue offline event creation payloads in the Drift mutation outbox
  • Validate event payload completeness before transmission
  • Map API responses and errors to typed result objects for the UI
  • Notify the event listing feed on successful creation

Interfaces

createEvent(payload: EventPayload): Future<EventResult>
queueOfflineEvent(payload: EventPayload): void
validateEventPayload(payload: EventPayload): ValidationResult

Relationships

Dependencies (2)

Components this component depends on

Dependents (1)

Components that depend on this component

Related Data Entities (1)

Data entities managed by this component