Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/EduCabrera-k/Menu_Hamburguesas/llms.txt

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

All menu items are defined as a Python list of dictionaries named menu_items in app.py. The list is loaded once when the Flask server starts and passed to every page that renders the menu. To add, remove, or edit items, you modify this list directly and restart the server. Each entry in menu_items is a dictionary with the following fields:
id
integer
required
Unique numeric identifier for the item. Used as the cart key and as the lookup key in inventario_stock. Duplicate IDs break cart behavior and inventory toggling.
nombre
string
required
Display name shown on the menu card and in order summaries.
precio
integer
required
Price in Mexican pesos (MXN). Displayed as-is — no currency conversion is applied.
descripcion
string
required
Short description shown below the item name on the menu card.
categoria
string
required
Category the item belongs to. Controls which section the item appears in and which filter button activates it. Current values in use: "hamburguesas", "bebidas", "desayunos".
imagen
string
required
Image source. Either a full https:// URL or a local filename relative to static/img/. Set to an empty string "" to display a grey placeholder.

Adding a new menu item

Append a new dictionary to menu_items in app.py. Choose an id that is not already used by any existing item.
{"id": 27, "nombre": "Veggie Burger", "precio": 85, "descripcion": "Hamburguesa vegetariana con verduras asadas.", "categoria": "hamburguesas", "imagen": "https://example.com/veggie.jpg"}
Item IDs must be unique integers across the entire menu_items list. Duplicate IDs cause incorrect cart totals and unreliable inventory toggles, because both systems use the id as a lookup key.
After adding or removing menu items, restart the Flask server. The menu_items list is loaded once at startup and is not reloaded during a running session.

How images are resolved

The template in index.html applies the following logic when rendering each item’s image:
1

Check if imagen starts with 'http'

If the value starts with http, it is used directly as the src attribute of the <img> tag. Use this for externally hosted images.
# app.py
{"imagen": "https://example.com/burger.jpg"}
2

Check if imagen is a local filename

If the value is a plain filename (no protocol prefix), the template constructs the path using Flask’s url_for:
url_for('static', filename='img/' + item.imagen)
Place the file in static/img/ before referencing it:
# app.py
{"imagen": "my-burger.jpg"}
# → resolves to /static/img/my-burger.jpg
3

Empty string fallback

If imagen is an empty string "", the template renders a grey placeholder block in place of the image. No broken image icon is shown.
# app.py
{"imagen": ""}

Categories

The menu displays one category at a time. A row of buttons at the top of the page lets users switch between categories. The available buttons are generated from the distinct categoria values found in menu_items.
Adding an item with a new categoria value — for example, "postres" — automatically creates a new filter button and section for that category. No other configuration is required.

Removing a menu item

Delete the dictionary for the item from menu_items and restart the server. Any documents in the inventario_stock MongoDB collection for that item’s id will remain in the database but have no effect, since the item no longer exists in the menu list.

Current menu reference

The table below lists all 26 items currently defined in app.py.
IDNombrePrecioCategoría
1Tradicional$75hamburguesas
2Tradicional Doble$120hamburguesas
3Arrachera$100hamburguesas
4Crunchy$95hamburguesas
5Crunchy Doble$140hamburguesas
6Crunchy BBQ$105hamburguesas
7Crunchy Búfalo$105hamburguesas
8Ranchera$140hamburguesas
9Suprema$130hamburguesas
10Magnum$160hamburguesas
11Orden de Papas$50hamburguesas
12Coca Cola 600ml$20bebidas
13Coca Cola 1 Litro$30bebidas
14Jamaica Avia$20bebidas
15Té Reca$20bebidas
16Horchata Avia$20bebidas
17Limonada Avia$20bebidas
18Naranjada Avia$25bebidas
19Tranca de Pierna$45desayunos
20Orden 3 Hot Cakes$45desayunos
21Hot Dog$20desayunos
22Tranca de Pollo$45desayunos
23Trancas de Tender$45desayunos
24Orden de 3 Burritas$30desayunos
25Orden de 4 Flautas$45desayunos
26Tostadas de Pollo$20desayunos

Build docs developers (and LLMs) love