When a user registers for an event in UniEvents, the system creates an attendee record that serves triple duty: it is the registration entry, the payment ledger item, and the ticket all at once. Each record carries a uniqueDocumentation 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.
ticketToken (a UUID) that is encoded into a QR code displayed in the user’s profile. At the event door, an access_control or tenant_admin user scans that QR code through the built-in scanner, which marks the ticket as used and writes an immutable audit entry to the scan_logs table.
Attendee Registration
Theattendees table is the heart of the ticketing system. Every registration — whether self-service by a student or manually entered by an admin — produces one row here.
| Field | Type | Notes |
|---|---|---|
id | uuid | Primary key, auto-generated |
eventId | uuid | FK → events.id (non-nullable) |
name | varchar(255) | Attendee’s full name |
email | varchar(255) | Attendee’s email |
phone | varchar(50) | Attendee’s phone number |
status | enum | registrado, confirmado, or pago_pendiente |
attendeeType | enum | estudiante (default) or foraneo |
userId | uuid | FK → users.id (nullable for admin-entered records) |
ticketToken | uuid | Unique token for the QR code, auto-generated |
scannedAt | timestamp | Set when the QR is scanned; null = not yet used |
paymentReference | varchar(50) | Bank transfer or mobile payment reference number |
paymentScreenshotUrl | varchar(500) | URL of the uploaded payment proof image |
paymentVerifiedBy | uuid | FK → users.id — the admin who verified payment |
paymentVerifiedAt | timestamp | When the payment was verified |
createdAt | timestamp | Auto-set on creation |
Registration Status Flow
Thestatus field drives the entire registration lifecycle. The path a registration takes depends on whether the event is free or paid.
Free events — status is set to 'confirmado' automatically at the moment of registration:
'pago_pendiente' and waits for admin review:
AttendeesService.registerAttendee:
Admins can also register attendees manually via
manualRegisterByAdmin. In that flow, the admin explicitly chooses the initial status — typically setting it to 'confirmado' immediately to skip the payment step for comped or VIP entries.QR Ticket
Every attendee record is assigned aticketToken — a randomly generated UUID that is unique across the entire attendees table. This token is the sole credential needed to gain entry to an event.
The token is displayed as a QR code in the authenticated user’s profile page. At the event door, staff use the scanner interface at /faculty-admin/scanner to scan it.
The scan endpoint performs three checks before granting access:
Token lookup
The system looks up the
attendees record by ticketToken. A 404 response means the token does not exist.Already-used check
If
scannedAt is already set, the ticket has been used. The endpoint returns a 409 Conflict with the original scan timestamp — preventing re-entry with the same QR code.Payment Workflow
For paid events, users submit their payment evidence through the registration form or from their profile page.User submits payment proof
The user provides a
paymentReference (bank or mobile transfer reference number) and optionally uploads a screenshot of the transaction. The POST /api/payments endpoint saves both to the attendee record. Status remains 'pago_pendiente'.Screenshot upload
The screenshot is first uploaded to Supabase Storage via
uploadPaymentScreenshot. If Supabase is unavailable, the file falls back to local disk storage under public/uploads/payments/, resized and converted to WebP via sharp for storage efficiency.tenant_admin reviews and verifies
The faculty admin sees the pending payment in the
/faculty-admin attendee list. They call POST /api/payments/verify with the attendee’s id and an action of either 'approve' or 'reject'.Only
tenant_admin users can call POST /api/payments/verify. The endpoint also verifies that the attendee’s event belongs to the caller’s tenantId, preventing cross-tenant payment approvals.Scan Logs
Every successful QR scan is recorded in thescan_logs table. This creates a permanent, tamper-evident audit trail of who was admitted to an event, when, and by which staff member.
| Field | Description |
|---|---|
eventId | Which event the scan happened at |
attendeeId | Which attendee was admitted |
scannedBy | The staff member (userId) who performed the scan |
scannedAt | The exact timestamp of admission |