TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Renzo717/Aula-Virtual-Universidad-Radiolocucion/llms.txt
Use this file to discover all available pages before exploring further.
admin role is the highest-privilege account in NuestraVoz. Administrators are responsible for the full operational lifecycle of the platform: creating and managing user accounts across all four roles, building the academic catalogue of careers and subjects, assigning students to programmes, approving incoming teacher registrations, and monitoring platform health through the dashboard and audit log. Admin accounts can only be created by another admin — they are never self-registered.
User Management
Admins have exclusive access to all routes under/api/users (except the search endpoint, which is also available to preceptors).
Listing and searching users
nombre, apellido, email, and dni, and by rol. The response includes total, page, and limit for pagination.
Creating a user
createUserSchema. The admin can assign any of the four roles, and all accounts created this way are immediately set to status: 'activo'. DNI uniqueness is enforced — attempting to reuse a DNI returns 400 Ya existe un usuario registrado con ese DNI.
Editing a user
updateUserSchema are optional. Passing "password" updates the Supabase Auth credential as well as the profile row. Changing "email" simultaneously updates Supabase Auth.
Approving or rejecting a docente
When a teacher self-registers, their account lands withstatus: 'pendiente'. To approve:
DELETE endpoint performs a soft-delete — it sets status: 'inactivo' rather than removing the row, and logs an alerta-state audit entry.
User statistics
Career and Subject Management
Admins are the only role that can create, update, and soft-delete careers and subjects. Preceptors sharePATCH /api/carreras/materias/:id but cannot create or delete.
Career CRUD
tipo accepts "grado" or "posgrado". anio is an integer between 1 and 3. A PATCH /api/carreras/:id updates any subset of these fields. DELETE /api/carreras/:id cascades: all child subjects are also soft-deleted (activa: false).
Subject CRUD
horarios is an array of HorarioCursado objects. The API auto-generates a human-readable horario display string via formatHorarios. Deleting a single subject:
Deletion is a soft-delete:
activa is set to false. The subject and its data remain in the database for audit and grade-history purposes.Enrolment Management
Admins can create enrolments for any student via the sharedinscripciones routes (also accessible to preceptors). See the Preceptor role page for the full API reference since the endpoints are identical.
Dashboard
The admin dashboard is powered by two endpoints consumed byDashboardPage.tsx:
Platform statistics
DashboardStats object:
Recent activity (audit log)
AuditoriaLog entries across all modules. Each entry includes the acting user’s name, the accion string, the modulo, and an AuditoriaEstado:
completado, blue for procesado, yellow for revision, and red for alerta.
Final Grades
Admins can view and update final grades for any subject using the same endpoints available to docentes and preceptors. TheassertDocenteMateria helper in apps/api/src/lib/finales.ts grants access when req.user.rol is 'admin', bypassing the docente-assignment check entirely.
Grade Bulletins
An admin can download the grade bulletin PDF for any student:BoletinAlumnoResumen) and one row per enrolled subject (BoletinMateriaFila) with nota, nota_recuperatorio, libre, and regular flags.
Summary of Admin-Only Endpoints
| Method | Endpoint | Action |
|---|---|---|
GET | /api/users | List all users (paginated, filterable) |
GET | /api/users/stats | User count statistics |
POST | /api/users | Create a user with any role |
PATCH | /api/users/:id | Update user fields, role, status, or password |
DELETE | /api/users/:id | Deactivate a user (soft-delete) |
POST | /api/carreras | Create a career |
PATCH | /api/carreras/:id | Update career metadata |
DELETE | /api/carreras/:id | Deactivate career and all its subjects |
POST | /api/carreras/materias | Create a subject |
DELETE | /api/carreras/materias/:id | Deactivate a subject |
GET | /api/dashboard/stats | Platform-wide statistics |
GET | /api/dashboard/actividad | Last 10 audit log entries |