Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ytabeloved/ordervista/llms.txt

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

The Administrator is the highest-privilege role in Ordervista. Accounts with id_rol: 1 have unrestricted access to every management surface in the application: they can create, edit, and delete users, build out the entire product catalog through category and product management, monitor the live state of all orders, and consult rich analytics reports filtered by date range. The Administrator is typically a restaurant manager or system owner who is responsible for configuring the platform and reviewing business performance.

Accessible Frontend Routes

After logging in, an Administrator is presented with the full admin layout. The following frontend routes are available exclusively to this role.
RoutePagePurpose
/DashboardOverview of key metrics and recent order activity.
/usuariosUsersCreate, edit, filter, and delete system users.
/categoriasCategoriesManage product categories and their availability.
/productosProductsManage menu items, pricing, stock, and images.
/reportesReportsConsult estimated sales reports with date filters.

API Endpoints Accessible

All routes below require a valid JWT (Authorization: Bearer <token>) with id_rol: 1. Routes that also accept id_rol: 2 are noted separately in the Operator role documentation.

Users — authorizeRoles(1)

MethodEndpointAction
GET/api/usersList all users.
GET/api/users/:idGet a single user by ID.
POST/api/usersCreate a new user.
PUT/api/users/:idUpdate an existing user.
DELETE/api/users/:idDelete a user.

Categories — authorizeRoles(1)

MethodEndpointAction
GET/api/categoriesList all categories.
GET/api/categories/:idGet a single category by ID.
POST/api/categoriesCreate a new category.
PUT/api/categories/:idUpdate an existing category.
DELETE/api/categories/:idDelete a category.

Products — authorizeRoles(1)

MethodEndpointAction
GET/api/productsList all products.
GET/api/products/:idGet a single product by ID.
POST/api/productsCreate a new product.
PUT/api/products/:idUpdate an existing product.
DELETE/api/products/:idDelete a product.

Orders (managed view) — authorizeRoles(1, 2)

MethodEndpointAction
GET/api/orders/manageList all orders (managed view).
GET/api/orders/manage/:idGet full detail of any order.
PATCH/api/orders/manage/:id/statusUpdate an order’s status.
POST/api/orders/in-personCreate an in-person order.

Commands — authorizeRoles(1, 2)

MethodEndpointAction
GET/api/commandsList all kitchen commands.
GET/api/commands/:idGet a single command by ID.

Reports — authorizeRoles(1)

MethodEndpointAction
GET/api/reports/dashboardRetrieve dashboard analytics data.

Workflow

1

Log in

Navigate to /login and authenticate with an Administrator account. The backend validates the credentials, issues a JWT containing id_rol: 1, and the frontend stores it in localStorage.
2

Manage users

Go to /usuarios to review all registered users. Create new Operator or Customer accounts, edit existing profiles, filter the list by role, or remove accounts that are no longer needed.
3

Manage categories

Go to /categorias to structure the menu taxonomy. Create new categories, update names and descriptions, and activate or deactivate categories to control their visibility in the customer-facing menu.
4

Manage products

Go to /productos to maintain the full product catalog. Add new menu items with name, description, category, price, stock level, image, and availability status. Edit or remove existing products as the menu changes.
5

Review the dashboard

Return to / to get a real-time snapshot of restaurant performance. The dashboard aggregates key metrics across all orders so the administrator can spot trends at a glance.
6

Consult reports with date filters

Go to /reportes to query in-depth analytics. Apply start and end date filters to narrow the data to any time range, then review the full breakdown of sales, order volume, and product performance.

Dashboard & Reports

The Administrator dashboard and reports surface consolidate operational data from the PEDIDOS and DETALLE_PEDIDO tables into a single view. The following metrics and visualisations are available.
Metric / ChartDescription
Total ordersCount of all orders within the selected period.
Estimated salesSum of order totals, representing estimated revenue.
Average ticketEstimated sales divided by the number of orders.
Customers servedCount of distinct customers who placed at least one order.
Sales by day chartLine or bar chart showing estimated sales broken down by calendar day.
Top productsRanking of the most-ordered products by total units sold.
Sales by categoryBreakdown of estimated revenue grouped by product category.
Recent ordersChronological list of the latest orders with status, total, and customer information.
Date range filters are available on the /reportes page, allowing the administrator to scope all metrics to a specific period — useful for weekly reviews, monthly closes, or ad-hoc performance checks.

Build docs developers (and LLMs) love