The UniSierra Eats admin panel is a restricted interface available exclusively to users withDocumentation 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.
rol_id = 1. It is split across three dedicated HTML pages — inventory management, review moderation, and platform analytics — each powered by a shared admin.js file that routes logic based on the current URL path.
Role-Based Access
UniSierra Eats uses a two-role system stored in theUsuarios table:
| Role | rol_id | Description |
|---|---|---|
| Administrator | 1 | Full access to admin panel |
| Student | 2 | Standard cafeteria user |
public/index.html, the app reads localStorage.getItem('unisierra_sesion') after login and checks the rol_id field in the stored session object. If rol_id === 1, the user is automatically redirected to admin/panel_admin.html. Additionally, any student-facing page shows a Panel Admin button in the navbar when rol_id === 1, providing a direct shortcut to the admin panel from anywhere in the app.
Default Admin Account
A seed administrator account is created byinit_db.js when the database is first initialized:
| Field | Value |
|---|---|
admin@unisierra.edu.mx | |
| Password | admin123 |
Creating a New Admin Account
New admin accounts can be created at any time directly from the inventory panel (admin/panel_admin.html). Clicking the Nuevo Admin button (#btn-nuevo-admin) in the top navbar opens the #admin-modal overlay, which contains a form for the new administrator’s details.
On submission, the form sends a POST request to /api/admin/registro:
correo ends with @unisierra.edu.mx and inserts the new user with rol_id = 1. If the email is already registered, the server returns a 400 error.
The new admin form is only available on
panel_admin.html. It does not appear on the moderation or reports pages.Panel Sections
Inventory
Create, edit, filter, and delete products in the cafeteria catalog. All changes are written immediately to the SQLite database via the REST API.
Moderation
Review student-flagged content. Restore reported reviews to public view or permanently remove them from the database.
Reports
View platform-wide analytics including total reviews, weighted average rating, the most-reviewed product, and top and lowest-rated product rankings.