This guide walks you from a fresh clone to a fully operational SS Restaurant instance — backend API, MySQL database, sample data, and Vue 3 frontend — in a single terminal session. By the end you will have the API running, the database seeded with sample menu items, tables, and customers, and the frontend ready to log in once you create your first admin user.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/FloresJesus/SS_RESTAURANT/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure the following are available on your machine:- Node.js 18+ (the frontend
enginesfield requires^20.19.0 || >=22.12.0for full compatibility) - MySQL 8+ running locally or accessible over the network
- npm (bundled with Node.js)
- A terminal with access to the cloned repository root
Steps
Create the backend environment file
Create a file named The three
.env inside the Backend/ directory. This file is read by dotenv at startup and must exist before you run the server.IMAGEKIT_* variables are only required if you want to upload menu item images. The rest of the application works without them.Create the MySQL database
Connect to your MySQL server and create the database that matches the SS Restaurant expects the tables to already exist. Run your schema migration script (if provided) or let the application’s first requests surface any missing-table errors so you can apply them manually.
DB_NAME value in your .env:Install backend dependencies and start the API server
http://localhost:3000.Seed the database with sample data
While still inside the Expected output:The seeder inserts:
The seeder clears any existing rows in
Backend/ directory, run the seed script to populate the database with a realistic starting dataset:| Table | Records inserted |
|---|---|
categoria_producto | 4 categories: Entradas, Platos Principales, Bebidas, Postres |
producto | 7 products: Ceviche, Empanadas, Lomo Saltado, Pollo a la Brasa, Chicha Morada, Limonada, Suspiro Limeño |
mesa | 5 tables (capacities 2, 4, 4, 6, 8 — all libre) |
cliente | 2 customers: Juan Perez and Maria Lopez |
detalle_pedido, pedido, reserva, cliente, producto, categoria_producto, and mesa before inserting, so it is safe to re-run to reset your local data.Install frontend dependencies
Open a new terminal tab, navigate to the
Frontend/ directory, and install packages:Start the Vue 3 dev server
/api requests to http://localhost:3000, so the frontend communicates with your local Express API automatically.Create your first admin user
The seed script does not create any user accounts — it only populates menu categories, products, tables, and customers. Before you can log in you must insert an initial admin user directly in MySQL with a bcrypt-hashed password.Connect to MySQL and run:To generate a proper bcrypt hash for your chosen password, run this one-liner from the Copy the printed hash and use it as the
Backend/ directory:password_hash value in the INSERT statement above.Once the user row exists, open your browser, go to http://localhost:5173/login, and sign in with the email and password you chose. After a successful login the API returns a JWT valid for 8 hours, which the frontend stores in localStorage and attaches to every subsequent request via the Authorization: Bearer header.Alternatively, if you already have a logged-in admin session, subsequent staff accounts can be created through the application UI or by calling POST /api/users (admin role required).