The Sentidos Café backend relies on a single MySQL database namedDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Jimmy13anhelo/paginaweb2.github.io/llms.txt
Use this file to discover all available pages before exploring further.
sentidos_cafe_db to persist all operational data. Three tables power the core features of the site: pedidos tracks delivery and takeaway orders placed through the menu, reservas stores dine-in table reservations, and usuarios holds admin login credentials that protect the management panel. Running script.sql once creates the entire schema and seeds the default administrator account.
Database Overview
| Table | Purpose |
|---|---|
pedidos | Customer orders — name, phone, delivery address, products, total in PEN, timestamp |
reservas | Table reservations — guest info, date/time, party size, preferred seating zone |
usuarios | Admin accounts — username and password for the login panel |
Full Schema: script.sql
The completescript.sql file shipped with the project contains every CREATE TABLE statement and the default admin seed row:
Table Descriptions
pedidos — Customer Orders
Captures every order submitted through the café’s online menu. Theproducto column stores a comma-separated list of items (e.g. "2x Café Espresso, 1x Waffles") built by guardar_pedidos.php. The total column is a DECIMAL(10,2) representing the amount in Peruvian Sol (S/). The direccion field holds either the customer’s delivery address or the literal string "Recojo en Tienda" for in-store pickup.
| Column | Type | Notes |
|---|---|---|
id | INT AUTO_INCREMENT | Primary key |
cliente | VARCHAR(100) | Customer full name |
telefono | VARCHAR(50) | WhatsApp-compatible phone number |
direccion | VARCHAR(255) | Delivery address or “Recojo en Tienda” |
producto | TEXT | Comma-separated product list with quantities |
total | DECIMAL(10,2) | Order total in S/ (Peruvian Sol) |
fecha | DATETIME | Order timestamp |
reservas — Table Reservations
Stores dine-in reservation requests.zona_preferida maps to the three seating zones available in the reservation form: Terraza / Aire Libre, Salón Principal, and Zona VIP / Privada. fecha_registro is automatically set to CURRENT_TIMESTAMP and is not provided by the guest.
| Column | Type | Notes |
|---|---|---|
id_reserva | INT AUTO_INCREMENT | Primary key |
nombres | VARCHAR(100) | Guest first name |
apellidos | VARCHAR(100) | Guest last name |
telefono | VARCHAR(50) | Contact phone number |
fecha_reserva | DATE | Requested reservation date |
hora_reserva | TIME | Requested reservation time |
cantidad_personas | INT | Party size |
zona_preferida | VARCHAR(100) | Preferred seating zone |
fecha_registro | DATETIME | Auto-set row creation timestamp |
usuarios — Admin Accounts
Used exclusively byLogin/login.php to authenticate administrators. The user column maps to the usuario POST field and pass maps to password. The ON DUPLICATE KEY UPDATE clause in the seed INSERT ensures re-running the script does not create duplicate admin rows.
| Column | Type | Notes |
|---|---|---|
id_usuario | INT AUTO_INCREMENT | Primary key |
user | VARCHAR(50) | Login username |
pass | VARCHAR(255) | Password (should be hashed with password_hash()) |
Setup Steps
Open phpMyAdmin
Navigate to http://localhost/phpmyadmin in your browser. Log in with your MySQL root credentials. On a default XAMPP or WAMP installation the password is blank.
Create the database
Click New in the left sidebar. Enter
sentidos_cafe_db as the database name and select utf8_general_ci as the collation. Click Create. Using UTF-8 collation ensures Spanish characters (tildes, ñ) are stored and sorted correctly.Run the SQL script
With
sentidos_cafe_db selected in the left panel, click the SQL tab at the top. Paste the entire contents of script.sql into the query box and click Go. MySQL will create all three tables and insert the default admin row in a single pass.