04 — Information Architecture (Rooms Module)
- 1. Placement in the app
- 2. Screen tree
- 3. Domain model (exact from schema)
- 4. Information hierarchy
- 5. Navigation rules
- 6. Related modules
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
| Screen | Route | Parent | Permission (client gate) |
|---|---|---|---|
| Room List | /rooms | Admin workspace | rooms.read (permissions.constants.ts:50) |
| Room Detail | /rooms/:id | Room List | rooms.read |
| Room Editor — create | /rooms/new | Room List (FAB) | rooms.create (permissions.constants.ts:51) |
| Room Editor — edit | /rooms/:id/edit | Room Detail | rooms.update (permissions.constants.ts:52) |
| Delete dialog | modal on Detail/List | Room Detail | rooms.delete (permissions.constants.ts:53) |
| Filter sheet | modal on List | Room List | rooms.read |
Server-side RBAC guard is not implemented (only JwtAuthGuard — rooms.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.
6. Related modules
| Module | Relationship | Status |
|---|---|---|
| Timetable | venue reference for class entries | (planned) — IMPLEMENTATION_PLAN.md:227 |
| Bookings | availability + reservations per room | (planned) — see 01 §9 |
| Exams (seating) | exam room assignment | (planned) — IMPLEMENTATION_PLAN.md:213-220 |
| RBAC | rooms.* permissions | declared (permissions.constants.ts:50-53), enforcement (planned) |
| Organizations | tenant root every room belongs to | implemented |
| Settings | building/floor dictionaries (proposed) | not in code |