The Administrator role in LYNX provides unrestricted access to system data and reporting. Administrators can list all passengers and drivers, inspect every trip across the waiting queue, active trips, and history, search for passengers by DNI, run sorting algorithms across any data set, view platform-wide statistics, and audit password records stored in binary format. All admin actions are available from the Administrator Panel, which is accessible from the main menu under “Administracion”.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/yeremyacuna/LYNX/llms.txt
Use this file to discover all available pages before exploring further.
Admin Credentials
Admin accounts are stored across two files:assets/admins.txt— plain-text file holding one record per line in the formatADM-XXX|username|password(3-digit zero-padded numeric suffix). For example:ADM-001|Yeremy|admin777.assets/passwords.bin— binary file that stores a separate password snapshot. This binary store is written byAuthManager::savePasswordsBinary()and read back byAuthManager::readPasswordsBinary().
AuthManager::loginAdminValid(username, password), which looks up the admin by username and validates the plain-text password against the stored record.
Administrator Panel
The panel presents 12 numbered actions navigated with the arrow keys. Pressing Enter on the highlighted option executes the corresponding function.| # | Menu Item | Function Called |
|---|---|---|
| 1 | List all passengers | AdministratorMenu::listarUsuarios() |
| 2 | List all drivers | AdministratorMenu::listarConductores() |
| 3 | List all trips | AdministratorMenu::listarViajes() |
| 4 | Search passenger by DNI | AdministratorMenu::buscarUsuario() |
| 5 | Sort drivers by rating | AdministratorMenu::ordenarConductores() |
| 6 | Top drivers (rating ≥ 4.0) | AdministratorMenu::topConductores() |
| 7 | General statistics | AdministratorMenu::estadisticas() |
| 8 | Sort passengers by total spending | AdministratorMenu::ordenarPasajeros() |
| 9 | Sort passengers by ID | AdministratorMenu::ordenarPasajerosPorId() |
| 10 | Sort drivers by ID | AdministratorMenu::ordenarConductoresPorId() |
| 11 | Sort active trips by price | AdministratorMenu::ordenarViajesActivos() |
| 12 | View passwords in binary | AdministratorMenu::verPasswordsBinarias() |
List all passengers (1)
Iterates the passengerLinkedList with forEach and prints each record using Passenger::toString().
List all drivers (2)
Iterates the driverLinkedList with forEach and prints each record using Driver::toString().
List all trips (3)
CallsTripManager::viewWaitingDetailed(), TripManager::viewActive(), and TripManager::viewHistory() to display trips across all three containers (waiting queue, active list, and history stack). Also shows the platform’s cumulative 20 % commission earnings via TripManager::getTotalPlatformEarnings().
Search passenger by DNI (4)
UsesLinkedList::findFirst to locate the passenger whose dni matches the input. If found, also retrieves that passenger’s most recent trip via TripManager::getLastTripByPassenger(dni) and displays it alongside the passenger record.
Sort drivers by rating (5)
Applies ShellSort (descending) viaAuthManager::sortDriversByRating() and prints the driver list before and after to show the effect of the sort.
Top drivers — rating ≥ 4.0 (6)
Scans the driver list with a lambda filter and displays only drivers whose rating is 4.0 or higher.General statistics (7)
Aggregates system-wide metrics and displays them in a single screen. The output is produced byAdministratorMenu::estadisticas():
authMgr->contarConductoresDisponibles(0) is a recursive method that walks the driver list counting available drivers. tripMgr->getTotalPlatformEarnings() applies the 20 % commission to all completed trip fares.
Sort passengers by total spending (8)
Applies Insertion Sort (descending) viaAuthManager::sortUsersBySpent() and prints passenger names and totals before and after the sort.
Sort passengers by ID (9)
AppliesAuthManager::sortPassengersById() and lists each passenger’s PAS-XXXX code, name, and DNI in the resulting order.
Sort drivers by ID (10)
AppliesAuthManager::sortDriversById() and lists each driver’s DRV-XXXX code, name, and DNI in the resulting order.
Sort active trips by price (11)
Applies a sort on the activeDoublyLinkedList<Trip> via TripManager::sortActiveTripsByPrice() and shows each trip’s ID and price before and after.
View passwords in binary (12)
CallsAuthManager::savePasswordsBinary() to write the current snapshot to assets/passwords.bin, then reads it back with AuthManager::readPasswordsBinary() and displays each entry’s type, ID, DNI, and binary-encoded password string on screen.
Security Note
Creating an Admin Account
New administrator accounts are created programmatically viaAuthManager::registerAdmin(username, password). The method generates a sequential ADM-XXX identifier (e.g. ADM-116) using FileManager::generarIdAdmin(contador), which zero-pads the counter to 3 digits with setw(3). The record is appended to assets/admins.txt in the pipe-delimited format:
Key Admin Capabilities
User Visibility
List and search all registered passengers and drivers. Sort passenger lists by ID or total spending, and driver lists by rating or ID, for quick reporting.
Trip Overview
Inspect all trips across the waiting queue, active trips list, and history stack in a single view, including the platform’s cumulative commission earnings.
Sorting and Reports
Run on-demand sort algorithms — ShellSort on drivers, Insertion Sort on passengers, price sort on active trips — and view live platform statistics.
Security Audit
Trigger a binary password snapshot at any time and review each account’s binary-encoded credential directly from the administrator panel.