La Comanda splits every order into two parallel preparation streams. The kitchen handles food items, while the barista handles café and beverage items. Each station has its own dedicated screen and API endpoints, so staff only ever see the items relevant to their role. Both queues are updated in real time as waiters submit orders and staff progress items through preparation.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.
Routing
Item routing is determined entirely by the category slug of each product. The database viewvw_detalle_preparacion pre-calculates an area_preparacion field for every order line so that each station’s API can filter with a simple WHERE clause:
area_preparacion | Condition | Station |
|---|---|---|
barista | categoria.slug IN ('cafes', 'bebidas') | Barista screen |
cocina | Any other slug (except mesas) | Kitchen screen |
ignorar | categoria.slug = 'mesas' | Not shown anywhere |
cafes or bebidas category automatically routes it to the barista; everything else goes to the kitchen.
Kitchen Workflow
View incoming orders
Kitchen staff open The response lists all non-barista orders that contain at least one item not yet marked The screen refreshes automatically so new orders appear without a manual reload.
views/cocina.php, which polls:entregado:Start preparation
When a cook begins working on an order, they click En preparación. This calls:with the body:All kitchen items in that order move from
pendiente → en_preparacion.Mark ready
When the food is plated and ready for collection, the cook clicks Listo:All kitchen items in that order advance to
listo. The waiter’s screen reflects the change so they know the food is ready to carry out.Barista Workflow
View barista panel
Barista staff open The response separates orders into two lists for easy scanning:
views/barista.php, which calls:pendientes contains orders not yet started or in preparation; listas contains orders ready for pickup.Start preparation
The barista clicks En preparación to begin making the drinks:Only items currently in
pendiente state are moved to en_preparacion — items already further along the queue are unaffected.State Transitions
Item states follow a strict progression. The table below shows the permitted transitions and the action that triggers each one:| From | To | Triggered by |
|---|---|---|
pendiente | en_preparacion | accion=preparacion |
en_preparacion | listo | accion=lista |
listo | entregado | entregarOrden.php or marcarEntrega.php |
accion=preparacionmoves onlypendienteitems toen_preparacion.accion=listamoves bothpendienteanden_preparacionitems directly tolisto.
Roles
Access to each station’s action endpoints is restricted by role (rol_id):
| Station | Permitted roles |
|---|---|
Kitchen (cocinaAccion.php, marcarEntrega.php) | rol_id IN (1, 3) — Admin and Kitchen staff |
Barista (baristaAccion.php) | rol_id IN (1, 4) — Admin and Barista staff |
Admins can also use
POST /public/api/adminCambiarEstadoOrden.php to override the status of any order, bypassing the normal state machine.