The Directorio UDC backend is a Node.js REST API planned on Express 5 (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.
^5.2.1). When implemented, it will serve JSON data to the React 19 + Vite frontend and act as the authoritative source for advisor listings and advisory space availability information across the UDC campus. All communication between the frontend and backend is designed to occur over HTTP using a standard JSON envelope, making it straightforward to integrate additional clients in the future.
The backend server entry point (
index.js) is not yet committed to the
repository. The API surface described here represents the intended design for
the advisory space locator feature. Endpoint behaviour and response shapes may
evolve as implementation progresses.Base URL
When implemented, the server entry point will beindex.js (as declared in the backend package.json) and should listen on a configurable port. Use the following base URLs depending on your environment:
| Environment | Base URL |
|---|---|
| Development | http://localhost:3000 |
| Production | Configured via the PORT environment variable |
Authentication
The planned implementation does not require authentication. Directorio UDC is designed as an internal university intranet tool, so all endpoints will be publicly accessible within the campus network. Future versions may introduce session-based authentication to support role-based access control — for example, distinguishing between student users (read-only) and faculty/admin users who can update availability and space assignments.CORS Policy
The backend declares thecors npm package (^2.8.6) as a dependency. When you implement the server, cross-origin resource sharing should be configured at the Express application level using the cors middleware.
- Development: allow all origins to simplify local development with the Vite dev server (which runs on a different port).
- Production: restrict the
originoption to the exact URL of the deployed frontend to prevent unauthorized cross-origin requests.
Response Format
All planned API endpoints should return JSON. Successful responses will carry an HTTP2xx status code and wrap their payload in a consistent envelope so client code can handle responses uniformly.
Success response:
success flag lets consumers branch on a single boolean rather than inspecting the HTTP status code in every handler, while the error string provides a human-readable description suitable for display or logging.
Error Codes
The API should follow standard HTTP semantics. The table below lists the status codes you are most likely to encounter:| Status | Meaning |
|---|---|
| 200 | OK — Request succeeded |
| 201 | Created — Resource was created |
| 400 | Bad Request — Invalid or missing parameters |
| 404 | Not Found — Resource does not exist |
| 500 | Internal Server Error — Unexpected server-side error |
API Endpoints
Browse all planned endpoints with request/response details.