Problem
Every booking on ManageHub is a one-off. There is no way for a member to set up a recurring booking (e.g. "book this hot desk every Monday for the next month"). Members are forced to manually re-book the same workspace repeatedly, which is a significant UX gap compared to competing platforms like Nexudus and Cobot.
Proposed Solution
Extend the existing bookings module at backend/src/bookings/ without breaking existing functionality.
Changes to booking.entity.ts:
- Add
isRecurring (boolean, default false)
- Add
recurringGroupId (UUID, nullable — links all instances of one recurring series)
New Entity: RecurringRule at backend/src/bookings/entities/recurring-rule.entity.ts
id (UUID)
frequency (enum: daily | weekly | monthly)
interval (integer — e.g. 1 = every week, 2 = every 2 weeks)
daysOfWeek (integer array 0–6, for weekly recurrence — e.g. [1, 3] = Monday and Wednesday)
endDate (date, nullable)
maxOccurrences (integer, nullable)
parentBookingId (UUID FK → bookings — the first generated instance)
New Endpoint: POST /bookings/recurring
Accepts the standard CreateBookingDto plus a recurringRule object. The service generates and saves all booking instances up to endDate or maxOccurrences (cap at 52 to prevent abuse). Availability is checked for each instance before saving.
New Endpoint: DELETE /bookings/recurring/:groupId
Cancels all future (not past) bookings that share the given recurringGroupId.
Acceptance Criteria
Problem
Every booking on ManageHub is a one-off. There is no way for a member to set up a recurring booking (e.g. "book this hot desk every Monday for the next month"). Members are forced to manually re-book the same workspace repeatedly, which is a significant UX gap compared to competing platforms like Nexudus and Cobot.
Proposed Solution
Extend the existing bookings module at
backend/src/bookings/without breaking existing functionality.Changes to
booking.entity.ts:isRecurring(boolean, defaultfalse)recurringGroupId(UUID, nullable — links all instances of one recurring series)New Entity:
RecurringRuleatbackend/src/bookings/entities/recurring-rule.entity.tsid(UUID)frequency(enum:daily|weekly|monthly)interval(integer — e.g.1= every week,2= every 2 weeks)daysOfWeek(integer array 0–6, for weekly recurrence — e.g.[1, 3]= Monday and Wednesday)endDate(date, nullable)maxOccurrences(integer, nullable)parentBookingId(UUID FK → bookings — the first generated instance)New Endpoint:
POST /bookings/recurringAccepts the standard
CreateBookingDtoplus arecurringRuleobject. The service generates and saves all booking instances up toendDateormaxOccurrences(cap at 52 to prevent abuse). Availability is checked for each instance before saving.New Endpoint:
DELETE /bookings/recurring/:groupIdCancels all future (not past) bookings that share the given
recurringGroupId.Acceptance Criteria
RecurringRuleentity created and migration generatedPOST /bookings/recurringgenerates all booking instances and saves them with the samerecurringGroupIdDELETE /bookings/recurring/:groupIdcancels only future instances (wherestartDate > now)POST /bookingsflow is not changed and still works as before