Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Minogar28/DIRECTORIO_UDC/llms.txt

Use this file to discover all available pages before exploring further.

This page documents the REST endpoints that the Directorio UDC backend is planned to expose. When implemented, these endpoints will power the advisory-space locator and faculty directory features in the React frontend, enabling students to find available consultation rooms and locate the advisors assigned to them across the UDC campus. All endpoints will be prefixed under http://localhost:3000 in development (see the Overview for base URL and CORS details).
The backend is in early development — no server implementation has been committed to the repository yet. The endpoints below represent the intended API design based on the application’s advisory-space locator requirements. Treat all endpoint descriptions as planned behaviour until implementation is complete.

Health Check

GET /health

Returns the current server status. Use this endpoint to verify that the backend is running and reachable before making data requests, or as a liveness probe in a deployment environment.
curl http://localhost:3000/health
Response:
{ "status": "ok" }

Advisory Spaces

These endpoints will manage the list of campus locations where advisors are available. Each space record will describe a physical room or area along with its current occupancy and availability state.

GET /api/spaces

Returns an array of all advisory spaces. Supports optional query parameters to narrow results by building or current availability. Query Parameters
building
string
Filter results to spaces located in the specified building name, e.g. Bloque A.
available
boolean
When true, return only spaces that are currently available for use.
Response Fields
id
string
Unique identifier for the advisory space.
name
string
Human-readable room or area name, e.g. "Room 304-B".
building
string
Building where the space is located, e.g. "Bloque A".
floor
number
Floor number on which the space is situated.
available
boolean
Whether the space is currently available for student consultations.
advisor
string | null
Full name of the advisor currently assigned to the space, or null if unassigned.
Example Request
curl http://localhost:3000/api/spaces
Example Response
{
  "success": true,
  "data": [
    {
      "id": "space-001",
      "name": "Room 304-B",
      "building": "Bloque A",
      "floor": 3,
      "available": true,
      "advisor": "Dr. Maria García"
    }
  ]
}

GET /api/spaces/:id

Returns a single advisory space identified by its unique ID. The response object will have the same shape as an individual item from the GET /api/spaces list. Path Parameters
id
string
required
The unique identifier of the advisory space to retrieve.
Notes
  • Returns HTTP 200 with the space object on success.
  • Returns HTTP 404 with { "success": false, "error": "Resource not found" } if no space matches the given ID.

Faculty

These endpoints will expose the faculty directory, allowing students to browse advisors and find the one they need. Each faculty record will include contact information, office hours, and a link to their assigned advisory space when applicable.

GET /api/faculty

Returns an array of all faculty members. Supports optional query parameters to filter by department or current availability. Query Parameters
department
string
Filter results to faculty members belonging to the specified department, e.g. Ingeniería de Sistemas.
available
boolean
When true, return only faculty members who are currently available for student consultations.
Response Fields
id
string
Unique identifier for the faculty member.
name
string
Full name of the faculty member.
department
string
Department to which the faculty member belongs.
email
string
University email address, e.g. [email protected].
officeHours
array of strings
List of weekly schedule slots during which the advisor is available, e.g. ["Mon 10:00-12:00", "Wed 14:00-16:00"].
spaceId
string | null
ID of the advisory space currently assigned to this faculty member, or null if no space is assigned. Use this value with GET /api/spaces/:id to fetch full space details.
Example Request
curl "http://localhost:3000/api/faculty?department=Ingeniería"
Example Response
{
  "success": true,
  "data": [
    {
      "id": "fac-042",
      "name": "Dr. Carlos Mendoza",
      "department": "Ingeniería de Sistemas",
      "email": "[email protected]",
      "officeHours": ["Lun 09:00-11:00", "Mié 14:00-16:00"],
      "spaceId": "space-001"
    }
  ]
}

GET /api/faculty/:id

Returns a single faculty member identified by their unique ID. The response object will have the same shape as an individual item from the GET /api/faculty list. Path Parameters
id
string
required
The unique identifier of the faculty member to retrieve.
Notes
  • Returns HTTP 200 with the faculty object on success.
  • Returns HTTP 404 with { "success": false, "error": "Resource not found" } if no faculty member matches the given ID.

Build docs developers (and LLMs) love