How moralesruizbrayan-create/avantiforms works
Purpose and Entry Points
AvantiForms manages IT equipment handover records (“Actas de Entrega”) and related employee/inventory data. The browser entry points are index.html, login.html, dashboard.html, gestion-actas.html, inventario.html, and admin-empleados.html. Shared client behavior is concentrated in app.js with presentation in styles.css.
Frontend Application Shell
The HTML pages represent distinct operational views rather than a single documented SPA:
• Authentication starts at login.html.
• Operational navigation and summary likely begin at dashboard.html.
• Equipment delivery record creation/management is handled by gestion-actas.html.
• Asset and employee administration are exposed through inventario.html and admin-empleados.html.
• app.js is the primary browser-side integration boundary to the API.
Authentication Boundary
api/auth.js provides the backend authentication endpoint consumed by the login flow. It is a distinct security boundary between unauthenticated UI (login.html) and the administration/operations pages (dashboard.html, admin-empleados.html).
Employee and Equipment Domains
The API separates people and assigned assets:
• Employee CRUD/query behavior is represented by api/empleados.js.
• Equipment lookup or assignment retrieval is represented by api/obtener-equipo.js.
• Employee administration is surfaced in admin-empleados.html; inventory operations in inventario.html.
This separation supports assembling a handover record from an employee identity plus one or more equipment details.
Handover-Record Workflow
The core business transaction is persisting an equipment-delivery certificate through api/guardar-acta.js, with gestion-actas.html as its corresponding UI. The expected flow is: user selects or supplies employee data, resolves equipment through api/obtener-equipo.js, submits the completed acta to api/guardar-acta.js, and returns to dashboard-level operational views.
Dashboard and Metrics Flow
dashboard.html presents aggregated operational information obtained through api/obtener-metricas.js. This endpoint is a reporting/read-model boundary, keeping metrics retrieval separate from transactional acta creation in api/guardar-acta.js.
Record Removal and Runtime
api/eliminar-registro.js provides destructive record-management capability and should be treated as an authorization-sensitive endpoint alongside api/auth.js. The repository uses JavaScript/HTML/CSS for the client and API handlers under api/; package.json indicates a Node.js runtime/dependency boundary, while requirements.txt indicates an additional Python-based runtime or service dependency. No database or third-party service is identified in the provided files.
Main entry points: app.js Client integration · dashboard.html Dashboard · guardar-acta.js Persist acta · login.html Login
Components 16
Browser application
- Landing page
index.html - Login
login.html - Dashboard
dashboard.html - Acta management
gestion-actas.html - Inventory
inventario.html - Employee administration
admin-empleados.html - Client integration · Primary browser-side API boundary.
app.js - Shared styles
styles.css
Node API handlers
- Authentication
api/auth.js - Employees
api/empleados.js - Equipment lookup
api/obtener-equipo.js - Persist acta · Creates equipment-delivery records.
api/guardar-acta.js - Operational metrics · Read-model boundary for dashboard aggregates.
api/obtener-metricas.js - Remove record · Authorization-sensitive record removal.
api/eliminar-registro.js
Runtime boundaries
- Node.js dependencies
package.json - Python dependencies · Indicates an additional Python runtime or service dependency.
requirements.txt
Connections 19
- Landing page → Login: starts authentication
- Login → Client integration: uses
- Client integration → Authentication: authenticates
- Authentication → Dashboard: grants access to
- Dashboard → Client integration: uses
- Acta management → Client integration: uses
- Inventory → Client integration: uses
- Employee administration → Client integration: uses
- Client integration → Operational metrics: loads metrics
- Client integration → Employees: manages employees
- Client integration → Equipment lookup: resolves equipment
- Client integration → Persist acta: submits acta
- Client integration → Remove record: removes records
- Employees → Persist acta: supplies employee identity
- Equipment lookup → Persist acta: supplies equipment details
- Persist acta → Dashboard: returns to operations
- Node.js dependencies → Authentication: hosts handlers
- Shared styles → Login: styles
- Shared styles → Dashboard: styles