UniSierra Eats is a full-stack web application built for Universidad de la Sierra that gives students a digital window into their campus cafeteria — browse the menu, read and write reviews, explore products by category, and manage their own profile, all from a single platform running on a lightweight Node.js server.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.
Architecture Overview
UniSierra Eats follows a monolithic, single-server architecture where the Express backend and the vanilla HTML/CSS/JS frontend are served from the same Node.js process on port 3000.| Layer | Technology | Role |
|---|---|---|
| Runtime | Node.js (v18+) | JavaScript execution environment |
| Web framework | Express ^5.2.1 | HTTP routing and middleware |
| Database | SQLite via sqlite3 ^6.0.1 | Persistent data storage in a local .db file |
| Frontend | Vanilla HTML, CSS, JavaScript | UI served as static files from __dirname |
app.use(express.static(__dirname)) to serve the entire project directory as static files, so every HTML page in public/ and admin/ is accessible directly through the browser without a separate build step or static file host.
User Roles
The platform has two roles stored in theRoles table and referenced by rol_id on each user record:
| Role | rol_id | Access |
|---|---|---|
| Administrator | 1 | Admin panel — inventory management, review moderation, usage reports |
| Student | 2 | Student-facing pages — menu, product search, reviews, profile, settings |
index.html, a short JavaScript snippet reads localStorage and redirects them to the correct interface based on their role.
Main Application Areas
Student-facing pages (served frompublic/)
index.html— landing page and login/registrationmenu.html— full cafeteria menu with category filteringbusqueda.html— product searchdetalle_producto.html— product detail with ratings and reviewsescribir_resena.html— review submission formperfil.html— user profile and review historyconfiguracion.html— account settings (update name, password, delete account)
admin/)
panel_admin.html— product inventory (create, edit, delete)moderacion.html— review moderation queue for reported reviewsreportes.html— platform usage reports
Session Management
UniSierra Eats stores session state entirely in the browser usinglocalStorage. After a successful login, the server returns a user object that the frontend persists under the key unisierra_sesion.
index.html reads this key and redirects accordingly:
id values in API requests.
Institutional Email Restriction
Registration — both student and admin — is restricted to @unisierra.edu.mx institutional email addresses. Any attempt to register with a personal or external email returns a
400 error: "Solo se permite el registro con correos institucionales (@unisierra.edu.mx)." This check is enforced server-side in the /api/registro and /api/admin/registro routes.Explore the Docs
Quickstart
Clone the repo, initialize the database, and run the server locally in five minutes.
Authentication
How login, registration, and role-based redirection work end-to-end.
Product Catalog
Browse, filter, and manage cafeteria products and their average ratings.
API Overview
Full reference for the REST endpoints covering products, users, and reviews.