Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

03 — User Journeys (Rooms Module)

End-to-end journeys through the Rooms module, each step mapped to the implemented API (src/modules/rooms/**). Markings: (planned) = not in code yet, (forward-looking) = future surface, (proposed) = client-side contract.


1. Journey: Create a room (Org Admin)

#StepScreenAPI / source
1Admin opens Room List (/rooms), taps FAB "New room"Room Editor (create)
2Fills name, code, capacity, type, building, facilitiesRoom EditorCreateRoomDto fields (create-room.dto.ts:11-38)
3Client validates: required name/code, capacity ≥ 1 (proposed)Room Editorserver: @IsString/@IsNumber only (OQ-7)
4Submits → POST /api/v1/roomsRoom Editor (loading)rooms.controller.ts:24-28
5a201 → navigates to Room Detail, snackbar "Room created"Room Detailrooms.service.ts:18-23
5b409 duplicate code → inline error under code field, form keptRoom Editorrooms.service.ts:19-21
5c400 → field errors mapped from envelope details[]Room Editor00-shared/07

2. Journey: Find a room for timetable planning (Coordinator)

#StepScreenAPI / source
1Opens /roomsRoom ListGET /api/v1/rooms?page=1&limit=20 (rooms.controller.ts:30-34)
2Filters by type/building/capacity — client-side only today (proposed); server filter (planned) (OQ-3)Room List (filter chips)no query params in code
3Scans cards for capacity badge; scrolls → hasNextpage+1Room List (infinite scroll)pagination-query.dto.ts:32-39
4Taps room → detail with facilities listRoom DetailGET /api/v1/rooms/:id (rooms.controller.ts:36-40)
5Adds room to timetable entryTimetable module (planned)IMPLEMENTATION_PLAN.md:227

3. Journey: Edit a room — code conflict (Admin)

#StepScreenAPI / source
1Opens /:id/edit, changes code to one that existsRoom Editor (edit)PATCH rooms.controller.ts:42-46
2Gap: no 409 — $set runs, unique index raises E11000 → 500 (OQ-1)Room Editor (error)rooms.service.ts:42-46; room.schema.ts:38
3Server fix (planned): pre-check code → 409 "already exists", inline field errorRoom Editor
4Client today (proposed): block submit on duplicate-code async check, show inline hintRoom Editor
5Success → snackbar + detail refreshed (version incremented, base.repository.ts:57-66)Room Detail

4. Journey: Delete a room (Admin)

#StepScreenAPI / source
1Room Detail → menu → "Delete room"Confirm dialog
2Typed/confirm → DELETE /api/v1/rooms/:iddialog (loading)rooms.controller.ts:48-52
3a200 → row removed locally, snackbar "Room deleted" (soft delete)Room Listrooms.service.ts:48-51; base.repository.ts:68-74
3b404 → snackbar "Room not found" (already deleted)Room Listrooms.service.ts:50
4Gap: no in-use guard — deleting a room referenced by timetable/bookings succeeds silently (OQ-4); warning (planned)rooms.service.ts:48-51
5Audit: deletedAt/deletedBy recordedbase.schema.ts:23-27

5. Journey: Book a room (planned) — forward-looking

#StepScreenAPI / source
1Room Detail → "Book" (button (planned))Booking sheetbookings module (planned)
2Pick date/time slot; availability from booking moduleBooking sheet(planned)
3Attendee scans QR at venue door → room info + sessionQR screen (forward-looking)(forward-looking)
4Analytics (proposed): utilization per room → insightsAnalytics (proposed)(proposed)

6. Journey: Offline / error handling (all)

  • Reads: last-good cache + offline banner; writes blocked with "You're offline" (no module offline queue) — per 00-shared/06 §3.6.
  • 401 → refresh → replay → session expiry.
  • 403 (future server RBAC) → hide route/redirect to 403 screen (client already gates by rooms.* perms — OQ-2).