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

04 — Information Architecture (Rooms Module)

Where Rooms sits in the app, the screen tree, the data model, and how it relates to other modules. Global IA baseline per 00-shared/05; data model derived exactly from src/modules/rooms/schemas/room.schema.ts.


1. Placement in the app

Rooms is a reference-data module inside the admin workspace: Academics → Timetable → Rooms in the long run (timetable (planned)), but today it stands alone under Resources / Infrastructure navigation (per 00-shared/05 §2 admin destinations).

Home / Dashboard
└── Admin workspace
    ├── …other modules…
    └── Rooms (/rooms)                  ← this module
        ├── Room List      /rooms
        ├── Room Detail    /rooms/:id
        └── Room Editor    /rooms/new · /rooms/:id/edit

2. Screen tree

ScreenRouteParentPermission (client gate)
Room List/roomsAdmin workspacerooms.read (permissions.constants.ts:50)
Room Detail/rooms/:idRoom Listrooms.read
Room Editor — create/rooms/newRoom List (FAB)rooms.create (permissions.constants.ts:51)
Room Editor — edit/rooms/:id/editRoom Detailrooms.update (permissions.constants.ts:52)
Delete dialogmodal on Detail/ListRoom Detailrooms.delete (permissions.constants.ts:53)
Filter sheetmodal on ListRoom Listrooms.read

Server-side RBAC guard is not implemented (only JwtAuthGuardrooms.controller.ts:19); the client gates by permission — OQ-2 in 01.

3. Domain model (exact from schema)

Room (collection: rooms — room.schema.ts:16)
├── tenantId        string (required)           ← from JWT, never from body  (base.schema.ts:10-11)
├── name            string (required, trim)     (room.schema.ts:18-19)
├── code            string (required, trim)     unique per tenant (room.schema.ts:21-22,38)
├── capacity        number (optional)           (room.schema.ts:24-25)
├── type            enum RoomType               default 'classroom' (room.schema.ts:27-28)
│                   classroom | lab | library | office | hall | other  (room.schema.ts:7-14)
├── building        string (optional)           (room.schema.ts:30-31)
├── facilities      string[] (optional)         (room.schema.ts:33-34)
├── createdBy/updatedBy  ObjectId (optional)    (base.schema.ts:13-17)
├── isDeleted       bool default false          (base.schema.ts:20-21)
├── deletedAt/deletedBy  (soft delete trail)    (base.schema.ts:23-27)
├── version         number (optimistic lock)    (base.schema.ts:30-31)
└── createdAt/updatedAt   timestamps            (room.schema.ts:16)

Unique index: { tenantId: 1, code: 1 }          (room.schema.ts:38)

Not in the model today (gaps — OQ-5): operational status, floor, equipment (structured), capacity bounds. facilities: string[] is the free-text stand-in.

4. Information hierarchy

  • List card: name (title), code (label), type icon + label, capacity badge, building subtitle, facilities preview (first 2 chips + "+n").
  • Detail: header (name, type icon, code), meta grid (type, capacity, building), facilities section, audit footer (created/updated (proposed)), actions (Edit / Delete — permission-gated).
  • Editor: single section, ordered: name → code → type → capacity → building → facilities.

5. Navigation rules

  • Detail is reachable only from List (no deep-link bookmarks today); deep links studylyon://rooms/:id (forward-looking).
  • Editor pops back to Detail (edit) or List (create).
  • Delete success pops to List and removes the row locally (remove() is void — rooms.service.ts:48).
  • Filter state persists within List session; reset on route pop.
ModuleRelationshipStatus
Timetablevenue reference for class entries(planned)IMPLEMENTATION_PLAN.md:227
Bookingsavailability + reservations per room(planned) — see 01 §9
Exams (seating)exam room assignment(planned)IMPLEMENTATION_PLAN.md:213-220
RBACrooms.* permissionsdeclared (permissions.constants.ts:50-53), enforcement (planned)
Organizationstenant root every room belongs toimplemented
Settingsbuilding/floor dictionaries (proposed)not in code