Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/DragonesMagicos/ferromax_v0.8/llms.txt

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

The EMPLEADO role is designed for store floor staff. Employees process in-store sales via the POS terminal, receive merchandise arriving from suppliers, and create delivery note (remito) receipts — all without ever seeing sensitive cost pricing or supplier data. Speed is the top priority in the employee workflow: the POS terminal is optimized for barcode-scanner-driven checkout, and every endpoint an employee uses is scoped to only the data their job requires.

Default Credentials

The DataInitializer seeds the following employee account on first boot if no users exist in the database:
FieldValue
Email[email protected]
Passwordempleado123
RoleEMPLEADO
Change the default employee password before deploying to production. These credentials are seeded publicly and should be treated as temporary.

Accessible Modules

POS Terminal

The primary employee interface at /pos. Processes in-store sales by scanning barcodes or entering SKUs. Each completed sale is recorded with OrigenVentaEnum.POS and linked to the employee’s user ID as the cashier.

Product Lookup (No Cost Price)

Employees query products through the /productos/empleado/** endpoints, which return ProductoEmpleadoDTO — a filtered DTO that deliberately omits precioCompra (purchase price) and nombreProveedor (supplier name). Supports lookup by full list, SKU, and barcode.

Goods Receipt (Recepción)

Post individual item receipts via POST /recepcion when stock arrives outside the remito workflow. This increments the product’s stockActual immediately.

Remito Creation

Create supplier delivery note records via POST /recepciones-remito. The remito is created with a PENDIENTE status and queued for admin approval before stock is committed. Employees can view their own submitted remitos via GET /recepciones-remito/mis-recepciones.

Today's Sales

GET /ventas/mis-ventas-hoy returns all POS sales processed by the currently authenticated employee today (scoped to their cajeroId). Employees cannot see sales from other cashiers or from previous days.

Supplier List (Read-Only)

GET /proveedores is available to employees for reference during goods receipt. All other supplier management endpoints (POST, PUT, DELETE) are restricted to ADMIN.

Employee-Only API Endpoints

The following endpoints are restricted to EMPLEADO (or shared between ADMIN and EMPLEADO, noted where applicable):
MethodPathAccessDescription
GET/productos/empleadoEMPLEADO onlyFull product list — omits cost price and supplier
GET/productos/empleado/sku/{sku}EMPLEADO onlyProduct lookup by SKU — omits cost price and supplier
GET/productos/empleado/barcode/{codigo}EMPLEADO onlyProduct lookup by barcode — omits cost price and supplier
GET/ventas/mis-ventas-hoyEMPLEADO onlyAuthenticated employee’s sales for today
POST/ventasADMIN, EMPLEADO, CLIENTERegister a new sale (POS origin for EMPLEADO)
GET/ventas/{id}ADMIN, EMPLEADORetrieve a single sale by ID
GET/ventas/{id}/detalleADMIN, EMPLEADOFull line-item detail for a sale
POST/recepcionADMIN, EMPLEADOPost a single-item stock receipt
POST/recepciones-remitoADMIN, EMPLEADOCreate a new remito receipt header
GET/recepciones-remito/mis-recepcionesADMIN, EMPLEADOList remitos created by the authenticated user
GET/recepciones-remito/{id}ADMIN, EMPLEADODetail of a specific remito
GET/proveedoresADMIN, EMPLEADORead-only supplier list (all write operations on /proveedores/** are ADMIN-only)

Restrictions

Understanding what employees cannot do is just as important as knowing what they can:
  • No cost prices or supplier names. The /productos/empleado endpoints return ProductoEmpleadoDTO, which is a projection that strips precioCompra and nombreProveedor. Calling the full admin product endpoints (GET /productos, GET /productos/sku/{sku}, GET /productos/barcode/{codigo}) returns 403 Forbidden for employees.
  • Cannot approve remitos. Employees create remito records (POST /recepciones-remito) but cannot confirm them. Approval — which triggers the actual stock commit — is gated behind PATCH /recepciones-remito/{id}/confirmar, which is ADMIN-only.
  • No dashboard access. All /dashboard/** endpoints are ADMIN-only. The React app redirects employees directly to /pos after login.
  • No stock adjustments. Manual stock corrections (POST /ajustes-stock, GET /ajustes-stock) are ADMIN-only.
  • No invoice OCR. The /facturas/** endpoints are ADMIN-only.
  • Cannot void sales. PUT /ventas/{id}/anular is ADMIN-only.

Frontend Routes (Empleado)

The React app (App.jsx) uses <ProtectedRoute requiereEmpleado> to grant employees access to these routes (which are also accessible to admins):
RouteComponentDescription
/posPOSBarcode-scanner POS terminal — default post-login page for employees
/recepcionRecepcionPageSingle-item stock receipt form
/productosProductosProduct browser (displays employee-safe data)
/ventasVentasSales list (employees see their own; admins see all)
Barcode scanner workflow: During a POS sale, employees typically use GET /productos/empleado/barcode/{codigo} to look up a product by scanning its barcode. The endpoint returns the product name, precioVenta, current stock level, and category — everything needed to complete the sale without exposing margin data. In the POS terminal (/pos), this lookup happens automatically on each scan before adding the item to the cart.

Build docs developers (and LLMs) love