Seraya Psikologi — Documentation

Booking and payment MVP · Implementation baseline · 96 ADR

4. Model Availability as Rules, Exceptions, and Concrete Slots

Status

Accepted for the MVP working model; psychologist-specific offering slots, 90-day generation horizon, 15-minute default buffer, published-only exposure, exception precedence, and unheld/held/booked regeneration boundaries are resolved by ADR 0013/0040/0041/0044/0061. Scheduler trigger/backfill and active-hold invalid-source resolution remain open.

Context

The platform needs to publish bookable availability for five psychologists while supporting recurring schedules, leave, holidays, one-off changes, temporary slot holds, and concurrency. A single JSON availability blob would obscure lifecycle and make date-specific changes difficult to audit.

External calendar synchronization is not the MVP source of truth.

Decision

Use three layers:

Booking and concurrency operate on AvailabilitySlot, not directly on rules. The generation horizon is 90 days by default, the transition buffer defaults to 15 minutes, slots belong to one ServiceOffering, and only published offerings expose new slots. AvailabilityException overrides AvailabilityRule for the same date/range; ADR 0061 governs regeneration and preservation of unheld, held, and Appointment-linked slots.

Consequences

Positive:

Costs and constraints:

Open follow-up

Define scheduler trigger/backfill cadence and Admin resolution when an active hold's source becomes invalid. Rule/exception precedence and future-slot preservation/withdrawal are resolved by ADR 0061.