Description
This issue aims to address the implementation of Concurrency-Safe Appointment Booking API with Slot Reservation.
The core objective is to: Design booking endpoints that prevent double-booking under concurrent requests via database-level locking and atomic slot reservation.
By completing this feature, we will ensure that the GuildWorkman protocol maintains its high standards for security, usability, and decentralized logic. This issue requires careful attention to the Backend architecture and adherence to the existing project conventions.
When picking up this issue, please ensure you document any new dependencies or architectural decisions made during development.
Component
Backend (Spring Boot / Java 17)
Difficulty
🔴 Hard
Tasks
Acceptance Criteria
Frontend context (from guildworkman-web #34)
The booking calendar in guildworkman-web#34 (which closed guildworkman-web#28) shipped client-side only slot locking (localStorage + BroadcastChannel, 5-min TTL). That stops a single visitor double-booking themselves across tabs, but cannot stop two different visitors racing for the same slot — which is exactly what this issue closes at the authoritative layer.
Two things this issue must account for so that frontend context isn't lost:
- The per-worker availability read endpoint above is the missing counterpart to
viewAllAppointment — without it the calendar can't see a worker's taken/held slots.
- Once this API lands, guildworkman-web should retire its client-only lock in
src/lib/slotLock.ts and treat the server as the source of truth for availability (frontend follow-up depends on this).
Estimated Time
2-3 days
Description
This issue aims to address the implementation of Concurrency-Safe Appointment Booking API with Slot Reservation.
The core objective is to: Design booking endpoints that prevent double-booking under concurrent requests via database-level locking and atomic slot reservation.
By completing this feature, we will ensure that the GuildWorkman protocol maintains its high standards for security, usability, and decentralized logic. This issue requires careful attention to the Backend architecture and adherence to the existing project conventions.
When picking up this issue, please ensure you document any new dependencies or architectural decisions made during development.
Component
Backend (Spring Boot / Java 17)
Difficulty
🔴 Hard
Tasks
backend-api/src/main/javaviewAllAppointmentcurrently returns only the logged-in client's own bookings, so a booking UI has no way to see a worker's taken slots./mvnw verifyand./mvnw testto validate build and coverageAcceptance Criteria
Frontend context (from guildworkman-web #34)
The booking calendar in guildworkman-web#34 (which closed guildworkman-web#28) shipped client-side only slot locking (localStorage + BroadcastChannel, 5-min TTL). That stops a single visitor double-booking themselves across tabs, but cannot stop two different visitors racing for the same slot — which is exactly what this issue closes at the authoritative layer.
Two things this issue must account for so that frontend context isn't lost:
viewAllAppointment— without it the calendar can't see a worker's taken/held slots.src/lib/slotLock.tsand treat the server as the source of truth for availability (frontend follow-up depends on this).Estimated Time
2-3 days