Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JAQA20/LaComanda/llms.txt
Use this file to discover all available pages before exploring further.
Categories in La Comanda do more than organise the product menu — they are the foundation of the order routing system. Every product belongs to a category, and it is the category’s slug that determines whether a preparation item is sent to the kitchen queue, the barista queue, or ignored entirely. Getting categories right is therefore critical to correct operational flow, and slug values for routing categories must be treated as infrastructure rather than cosmetic labels.
Category Fields
| Field | Type | Description |
|---|
nombre | string (max 60) | Required, unique. The display name shown in the waiter’s product interface and in the admin panel. |
slug | string (max 100) | Required, unique. A URL-safe identifier used internally for routing logic. Auto-generated from nombre if left blank. This field drives kitchen/barista routing and should not be changed for routing categories. |
icono | string | FontAwesome icon class displayed with the category (e.g. fa-coffee, fa-hamburger). Defaults to fa-tags if left blank. |
orden | integer | Default 1. Controls the display order of categories in the waiter’s product selection interface. Lower values appear first. |
activo | boolean | Default 1. Inactive categories and all products within them are hidden from the order-taking interface. |
Routing Rules
The slug field on each category is the single source of truth for where preparation items appear. The routing logic is hard-coded in the vw_detalle_preparacion database view and in the Barista model’s queryBase() method:
| Slug Value(s) | Destination Queue |
|---|
cafes, bebidas | Barista — items appear in the barista’s preparation interface |
mesas | Ignored — items are excluded from all preparation queues |
| Any other active slug | Kitchen — items appear in the kitchen’s preparation interface |
Changing a category’s slug after orders have been placed will immediately re-route all open items for that category’s products.
Creating a Category
New categories are created by submitting to:
POST /public/api/nuevaCategoria.php
| Parameter | Required | Description |
|---|
nombre | Yes | Unique display name |
slug | No | Auto-generated from nombre if omitted; must be unique if provided |
icono | No | FontAwesome icon class |
orden | No | Integer display order (default 1) |
activo | No | 1 or 0 (default 1) |
Duplicate nombre values and duplicate slug values are both rejected with a validation error.
Editing a Category
Existing categories are updated by submitting to:
POST /public/api/editarCategoria.php
All fields can be updated. However, changing the slug of a routing category (cafes or bebidas) will break barista routing — items that should appear in the barista queue will instead be routed to the kitchen.
Deleting a Category
To permanently remove a category, submit:
POST /public/api/eliminarCategoria.php
| Parameter | Description |
|---|
id | The ID of the category to delete |
A category cannot be deleted if it has products associated with it. Reassign or delete all products in the category before attempting to remove it.
Default Categories
La Comanda seeds 6 categories out of the box:
| Name | Slug | Icon | Queue |
|---|
| Mesas | mesas | fa-table | Ignored |
| Cafés | cafes | fa-coffee | Barista |
| Comidas | comidas | fa-hamburger | Kitchen |
| Especialidades | especialidades | fa-star | Kitchen |
| Postres | postres | fa-cake | Kitchen |
| Bebidas Frías | bebidas | fa-glass-water | Barista |
Do not change the slug of the cafes or bebidas categories. These slug values are hard-coded in the routing logic. Renaming them will cause barista items to route to the kitchen instead, breaking the preparation workflow for all drink orders.