Enterprise reference architecture
A proposed engineering design for this workflow. The enterprise scenario and stack below are illustrative architecture choices; they are separate from the confirmed project screens.
The enterprise scenario
A multi-location appointment business coordinates practitioner calendars, service durations, rooms and staff-assisted rescheduling.
Architecture objective: Protect reservation integrity under concurrent requests while keeping customer requests, temporary holds and confirmed appointments understandable.
Proposed technology stack and rationale
Client and operations tools
Flutter for mobile; React and TypeScript for scheduling
Provide distinct client booking and staff availability views over the same scheduling rules.
Scheduling domain
ASP.NET Core with explicit appointment commands
Centralise service duration, resource eligibility and allowed cancellation transitions.
Reservation store
PostgreSQL with transactional overlap constraints
Enforce the selected practitioner and time-window rules at the database boundary, not only in the calendar UI.
Workflow coordination
Hangfire background jobs and idempotent provider activities
Coordinate reminders, wait-list offers and external-calendar updates without assuming remote calls execute only once.
Identity and operations
OIDC, scoped staff roles and Application Insights
Separate client, practitioner and scheduler permissions and trace each booking decision.
Technical challenges and design approach
1Concurrent slot selection
Two customers can select the same visible slot. Use a transactional constraint for the final reservation and return a clear alternative when the conflict is detected.
2Rescheduling across resources
Changing the practitioner or duration can invalidate the selected time. Validate the full proposed appointment before releasing or replacing the existing reservation.
3Location-specific time
The display zone and the resource’s scheduling zone may differ. Preserve both the appointment instant and the relevant local scheduling context.
How the proposed workflow fits together
- The client selects a service and location before requesting available resources.
- A hold or reservation command validates the complete resource and time combination.
- The transaction either commits the appointment or returns an explicit availability conflict.
- Staff review and rescheduling use versioned commands against the authoritative record.
- Reminder and calendar workers reconcile external outcomes without changing confirmation state implicitly.
Acceptance and failure-path checks
- Two concurrent confirmations cannot create overlapping accepted reservations under the agreed rule.
- Repeated rescheduling requests retain a stable outcome and history.
- Reminder or calendar failures are visible without losing the appointment.
- Authorisation tests cover clients requesting records that belong to another person.
The tradeoff
Use strong consistency for reservation acceptance and eventual consistency for secondary calendar projections. A cached calendar is a useful view, not the reservation authority.
Architecture references: ASP.NET Core documentation and PostgreSQL constraints. These describe engineering patterns, rather than certify this project’s implementation.