Seraya Psikologi — Documentation

Booking and payment MVP · Implementation baseline · 96 ADR

40. Generate Availability on a Rolling Ninety-day Horizon

Status

Accepted for the MVP working model; 90-day rolling horizon, rule/exception source, and preservation of held/booked history are resolved by ADR 0040/0061. Exact generation trigger, backfill cadence, and publication controls remain open.

Context

Recurring rules and exceptions are durable sources, while concrete AvailabilitySlot records are bookable capacity. Generating indefinitely creates unnecessary data and exposes dates the practice may not want to commit to; generating too little makes package follow-up scheduling frustrating.

Decision

Use a rolling BookingHorizon of 90 days by default, configurable by Admin. Generate/expose offering-specific AvailabilitySlot instances only within the horizon and Asia/Jakarta operational semantics. The horizon moves forward as time passes; rules/exceptions are the source of truth and regeneration must not overwrite held/booked history.

Consequences

Positive:

Costs and constraints:

Open follow-up

Define generation trigger/backfill cadence, exact horizon configuration owner, slot archival, and how package expiry beyond the current horizon is presented. Rule-change regeneration and preservation boundaries are resolved by ADR 0061.