Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/JuseAR27/Unisierra-eats/llms.txt

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

UniSierra Eats has no cloud dependencies — everything runs from a single Node.js process on your local machine. Follow the steps below to go from zero to a running server in under five minutes.

Prerequisites

Verify your versions before starting:
node --version   # should print v18.x.x or higher
npm --version

Setup Steps

1

Clone the Repository

Clone the project from GitHub and enter the project directory:
git clone https://github.com/JuseAR27/Unisierra-eats.git && cd Unisierra-eats
2

Install Dependencies

Install the two runtime dependencies — Express and the SQLite3 driver:
npm install
This resolves and installs:
PackageVersion
express^5.2.1
sqlite3^6.0.1
No build step or bundler is required. The frontend is plain HTML, CSS, and JavaScript.
3

Initialize the Database

Run the database setup script to create the SQLite file and seed it with sample data:
node init_db.js
The script creates unisierra_eats.db in the project root and sets up four tables:
TableDescription
RolesTwo roles: Administrador (id 1) and Estudiante (id 2)
UsuariosUser accounts with name, email, password, and role
ProductosCafeteria products with price, category, description, and image
ResenasReviews with rating (1–5), comment, status, and timestamp
Expected console output:
Conectado a la base de datos SQLite.
Tablas creadas correctamente.
Datos iniciales insertados.
Configuración de base de datos finalizada con éxito.
Passwords are stored in plaintext in the database. The seed script inserts admin123 as the administrator password. Do not use real or reused passwords when running this project in any environment beyond local development.
4

Start the Server

Launch the Express server:
node server.js
You should see the following confirmation in your terminal:
Servidor conectado a la base de datos SQLite.
Servidor de UniSierra Eats corriendo en http://localhost:3000
The server listens on port 3000 and serves all static files (HTML, CSS, JS) directly from the project directory alongside the REST API.
5

Open the App in Your Browser

Navigate to http://localhost:3000 in any modern browser.The entry-point index.html checks localStorage for an existing session under the key unisierra_sesion. Since no session exists yet, it redirects you to the student-facing login and registration page at public/index.html.To access the admin panel, log in with the seeded administrator account:
FieldValue
Emailadmin@unisierra.edu.mx
Passwordadmin123
After a successful login, the session object is saved to localStorage and the app redirects to admin/panel_admin.html.

Next Steps

Now that your server is running, explore the following sections to understand how the platform works under the hood:
  • Authentication — login flow, session storage, and the institutional email restriction
  • API Overview — full reference for the REST endpoints covering products, users, and reviews

Build docs developers (and LLMs) love