Skip to main content

Documentation 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.

Events are the core objects in UniEvents. Each event belongs to a faculty tenant, occupies a physical space for a defined duration, and can be made public or restricted to direct-link access. Both tenant_admin and event_manager roles can create events, but their default status and publication flow differ. This guide walks through the full creation process, status lifecycle, and advanced options available from the faculty admin portal.

Creating an Event

1

Navigate to the new event form

Go to /faculty-admin/events/new. The form will automatically detect your faculty’s tenantId from the active session — you do not need to enter it manually.
2

Fill in the core event details

Complete the following required fields:
FieldTypeNotes
titlestringThe event’s display name.
descriptionstring (optional)Full description shown on the event page.
datedatetimeStart date and time. Cannot be set in the past.
durationinteger (minutes)Event length. Must be between 1 and 1440 minutes (24 hours).
spaceIdselectPhysical venue from your faculty’s registered spaces. Required.
capacityinteger (optional)Override the space’s physical capacity with an event-specific limit. When set, this value completely replaces the space’s capacity for registration enforcement.
3

Set event visibility

Choose one of two visibility options from the Visibilidad dropdown:
  • publico — the event appears in the public discovery feed and on the university’s home page carousel (if featured).
  • privado — the event is accessible only via a direct link; it does not appear in public listings.
4

Configure pricing

Enter the admission price in the Precio de Entrada field. Use 0 or check the Es Gratis toggle to mark the event as free.If the event is paid, you must also fill in the mobile payment details:
FieldDescription
paymentPhoneThe mobile payment phone number (e.g. 0414-1234567).
paymentIdThe national ID or tax ID (cédula/RIF) associated with the payment account.
paymentBankThe receiving bank, selected from the Venezuelan banking system list.
Attendees will use these details to submit their payment reference and screenshot when registering for a paid event.
5

Assign an event manager

Select a Encargado del Evento (event manager) from the managerId dropdown. This must be a user with the event_manager role within your faculty. The field is required.
6

Upload an event image (optional)

Upload a banner or cover image for the event. Accepted formats: JPG, PNG, WebP. Maximum file size: 5 MB.
Uploaded images are automatically processed using the sharp library — resized to 1200×800 pixels (cover fit, without upscaling) and converted to WebP at quality 80 before being stored in Supabase storage. The stored URL is saved to imageUrl on the event record.
7

Submit the form

Click Publicar Evento. The resulting event status depends on the role of the creating user:
  • event_manager → event is created with status pendiente (awaiting approval from a tenant_admin).
  • tenant_admin → event is created directly with status aprobado (immediately published).

Event Status

Every event has a status field that controls its visibility and availability:
StatusMeaning
pendienteThe event has been proposed by an event_manager and is awaiting review by a tenant_admin.
aprobadoThe event is published and visible to attendees (if public). Attendee management is unlocked.
rechazadoThe event has been rejected. It remains in the system but is not published.
A tenant_admin can approve a pendiente event directly from the /faculty-admin/events table by clicking the checkmark (✓) action button beside the event row. This calls a server action that updates status to aprobado and revalidates the events page.

Space Conflict Detection

UniEvents prevents double-booking of physical spaces. When submitting a new event (or editing an existing one), the EventsService.checkSpaceConflict method checks whether the selected space is already occupied during the event’s time window. The conflict window is calculated as:
newStart = eventDate (ms timestamp)
newEnd   = eventDate + (durationMinutes × 60 × 1000)
A conflict exists if newStart < existingEnd && existingStart < newEnd — the standard interval overlap condition. If a conflict is detected, the API returns:
HTTP/1.1 409 Conflict

{
  "error": "CONF_001: El espacio ya está reservado para esa fecha y hora."
}
Error code CONF_001 is the canonical identifier for a space scheduling conflict. The form will display this message inline so the admin can choose a different space or time slot. tenant_admin users can set the isFeatured boolean flag on any aprobado event. Featured events appear in the home page carousel for the university’s public discovery experience. isFeatured can be toggled via PUT /api/events/[id] with { "isFeatured": true }.

IP Protection

Enabling the Requiere Protección Intelectual (IP) checkbox sets requiresIpProtection: true on the event. This flag is intended to restrict display of sensitive event details and is respected by the front-end rendering layer to conditionally hide content.

API Reference — Creating an Event

Events are submitted as multipart/form-data to allow image uploads alongside the event metadata.
curl -X POST https://your-domain.com/api/events \
  -H "Cookie: session=<your-jwt-cookie>" \
  -F "title=Workshop de Diseño UX" \
  -F "date=2025-09-15T10:00:00" \
  -F "duration=120" \
  -F "price=5.00" \
  -F "paymentPhone=0414-1234567" \
  -F "paymentId=V-12345678" \
  -F "paymentBank=0134 - Banesco" \
  -F "spaceId=<space-uuid>" \
  -F "managerId=<manager-uuid>" \
  -F "tenantId=<tenant-uuid>" \
  -F "visibility=publico" \
  -F "capacity=80" \
  -F "description=Aprende los fundamentos del diseño centrado en el usuario." \
  -F "image=@/path/to/banner.jpg"
Success response (201 Created):
{
  "id": "evt-uuid",
  "title": "Workshop de Diseño UX",
  "slug": "workshop-de-diseno-ux",
  "date": "2025-09-15T10:00:00.000Z",
  "duration": 120,
  "price": "5.00",
  "status": "aprobado",
  "imageUrl": "https://storage.supabase.co/...",
  "spaceId": "<space-uuid>",
  "tenantId": "<tenant-uuid>",
  "managerId": "<manager-uuid>",
  "visibility": "publico",
  "isFeatured": false,
  "requiresIpProtection": false,
  "createdAt": "2025-08-01T14:30:00.000Z"
}

Build docs developers (and LLMs) love