Spaces represent the physical venues that faculty events take place in. Every event in UniEvents must be assigned to a space, which establishes the physical location and contributes to the automatic conflict detection that prevents double-booking. Faculty admins manage their spaces from theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Edfermachado/proyectoSistemas/llms.txt
Use this file to discover all available pages before exploring further.
/faculty-admin/spaces page, with full CRUD access available to tenant_admin and event_manager roles.
What is a Space?
A space is a physical venue owned and managed by a faculty tenant. It can be a classroom, an auditorium, a sports field, a lab, or any bookable location within the faculty. Thespaces table in the database has three core fields:
| Field | Type | Description |
|---|---|---|
name | varchar(255) | The display name of the venue (e.g. “Auditorio Principal”, “Aula 204”). |
capacity | integer | The maximum number of people the venue can physically hold. |
tenantId | uuid | The faculty tenant this space belongs to. Spaces are always tenant-scoped. |
spaceId foreign key on the events table. A single space can be used by many events — but never by two events at the same time.
Creating a Space
Navigate to/faculty-admin/spaces/new. Enter the space name and its physical capacity, then submit the form. The space will be scoped to your faculty’s tenantId automatically.
Example — creating a space via the API:
201 Created):
Editing a Space
Navigate to/faculty-admin/spaces/[id]/edit to update a space’s name or capacity. You can update either field independently — both are optional in the PUT request body.
Space Availability and Conflict Detection
Once a space is assigned to an event, it is blocked for the entire duration of that event. The blocked window runs from the event’sdate through date + (duration × 60 seconds).
The EventsService.checkSpaceConflict method uses interval overlap logic to determine whether a new booking collides with an existing one:
HTTP 409 with error code CONF_001, and the creation or update is aborted.
When editing an existing event, the conflict check automatically excludes the event being edited from the overlap scan — so changing an event’s duration without changing its space or start time will not conflict with itself.
Capacity vs. Event Capacity
Spaces define a physical capacity — the maximum number of people that can fit in the venue. Events can optionally define their own event capacity (thecapacity field on the events table), which completely overrides the space’s physical capacity for registration enforcement purposes. The event capacity may be set higher or lower than the space’s capacity.
The AttendeesService.registerAttendee method enforces the effective capacity at registration time:
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /api/spaces?tenantId={id} | List all spaces for a faculty tenant. |
POST | /api/spaces | Create a new space. Body: { name, capacity, tenantId }. |
GET | /api/spaces/{id} | Retrieve a single space by ID. |
PUT | /api/spaces/{id} | Update a space’s name and/or capacity. |
DELETE | /api/spaces/{id} | Delete a space permanently. |