The Administrator is the highest-privilege role in Ordervista. Accounts withDocumentation 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.
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.| Route | Page | Purpose |
|---|---|---|
/ | Dashboard | Overview of key metrics and recent order activity. |
/usuarios | Users | Create, edit, filter, and delete system users. |
/categorias | Categories | Manage product categories and their availability. |
/productos | Products | Manage menu items, pricing, stock, and images. |
/reportes | Reports | Consult 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)
| Method | Endpoint | Action |
|---|---|---|
GET | /api/users | List all users. |
GET | /api/users/:id | Get a single user by ID. |
POST | /api/users | Create a new user. |
PUT | /api/users/:id | Update an existing user. |
DELETE | /api/users/:id | Delete a user. |
Categories — authorizeRoles(1)
| Method | Endpoint | Action |
|---|---|---|
GET | /api/categories | List all categories. |
GET | /api/categories/:id | Get a single category by ID. |
POST | /api/categories | Create a new category. |
PUT | /api/categories/:id | Update an existing category. |
DELETE | /api/categories/:id | Delete a category. |
Products — authorizeRoles(1)
| Method | Endpoint | Action |
|---|---|---|
GET | /api/products | List all products. |
GET | /api/products/:id | Get a single product by ID. |
POST | /api/products | Create a new product. |
PUT | /api/products/:id | Update an existing product. |
DELETE | /api/products/:id | Delete a product. |
Orders (managed view) — authorizeRoles(1, 2)
| Method | Endpoint | Action |
|---|---|---|
GET | /api/orders/manage | List all orders (managed view). |
GET | /api/orders/manage/:id | Get full detail of any order. |
PATCH | /api/orders/manage/:id/status | Update an order’s status. |
POST | /api/orders/in-person | Create an in-person order. |
Commands — authorizeRoles(1, 2)
| Method | Endpoint | Action |
|---|---|---|
GET | /api/commands | List all kitchen commands. |
GET | /api/commands/:id | Get a single command by ID. |
Reports — authorizeRoles(1)
| Method | Endpoint | Action |
|---|---|---|
GET | /api/reports/dashboard | Retrieve dashboard analytics data. |
Workflow
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.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.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.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.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.Dashboard & Reports
The Administrator dashboard and reports surface consolidate operational data from thePEDIDOS and DETALLE_PEDIDO tables into a single view. The following metrics and visualisations are available.
| Metric / Chart | Description |
|---|---|
| Total orders | Count of all orders within the selected period. |
| Estimated sales | Sum of order totals, representing estimated revenue. |
| Average ticket | Estimated sales divided by the number of orders. |
| Customers served | Count of distinct customers who placed at least one order. |
| Sales by day chart | Line or bar chart showing estimated sales broken down by calendar day. |
| Top products | Ranking of the most-ordered products by total units sold. |
| Sales by category | Breakdown of estimated revenue grouped by product category. |
| Recent orders | Chronological list of the latest orders with status, total, and customer information. |
/reportes page, allowing the administrator to scope all metrics to a specific period — useful for weekly reviews, monthly closes, or ad-hoc performance checks.