# samuni0809-netizen/smart_access architecture

> Architecture diagram of the GitHub repository samuni0809-netizen/smart_access, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/samuni0809-netizen/smart_access
- Repository: https://github.com/samuni0809-netizen/smart_access

## Overview

Smart Access is a web interface for managing entry and exit at SENA facilities. Its visible product areas cover administrator management and auditing, guard-side entry registration and QR scanning, and user profiles, registered assets, and access history; the SQL file indicates a database component. The sampled JavaScript confirms login/register tab behavior, menu toggling, and navigation-template loading. With no README and most HTML and SQL unopened, connections among the domain screens and database are left unverified rather than inferred.

Main entry points: [`pages/admin/dashboard.html`](https://github.com/samuni0809-netizen/smart_access/blob/master/pages/admin/dashboard.html) (Admin dashboard), [`js/nav.js`](https://github.com/samuni0809-netizen/smart_access/blob/master/js/nav.js) (Navigation loader), [`js/barra.js`](https://github.com/samuni0809-netizen/smart_access/blob/master/js/barra.js) (Admin menu toggle), [`js/login.js`](https://github.com/samuni0809-netizen/smart_access/blob/master/js/login.js) (Login and registration tabs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access control"]
  node_login_ui["Login and registration tabs<br/>[login.js]"]
  node_nav_loader["Navigation loader<br/>[nav.js]"]
  node_shared_nav["Shared navigation templates"]
  node_access_db[("Access database<br/>[Smart_Access.sql]")]
end

subgraph group_admin["Administration"]
  node_admin_dashboard["Admin dashboard<br/>[dashboard.html]"]
  node_admin_records["User and asset management"]
  node_admin_audit["Audit and entry history<br/>[auditoria.html]"]
  node_admin_menu["Admin menu toggle<br/>[barra.js]"]
end

subgraph group_guard["Guard operations"]
  node_guard_scan["QR scanning<br/>[escanear_qr.html]"]
  node_guard_entries["Guard entry registration<br/>[ingresos.html]"]
  node_guard_records["Guard user and asset registration"]
  node_guard_profile["Guard profile"]
end

subgraph group_user["User self-service"]
  node_user_access["My access history<br/>[mis _accesos.html]"]
  node_user_assets["My computer and vehicle"]
  node_user_profile["User profile"]
end

node_visitor(("Site visitor"))

node_visitor -.->|"opens interface"| node_login_ui
node_nav_loader -->|"fetches templates"| node_shared_nav
node_visitor -.->|"uses admin screens"| node_admin_dashboard
node_visitor -.->|"uses guard screens"| node_guard_scan
node_visitor -.->|"checks access"| node_user_access
node_admin_menu -.->|"toggles menu"| node_admin_dashboard

click node_login_ui "https://github.com/samuni0809-netizen/smart_access/blob/master/js/login.js"
click node_nav_loader "https://github.com/samuni0809-netizen/smart_access/blob/master/js/nav.js"
click node_shared_nav "https://github.com/samuni0809-netizen/smart_access/tree/master/pages/components"
click node_admin_dashboard "https://github.com/samuni0809-netizen/smart_access/blob/master/pages/admin/dashboard.html"
click node_admin_records "https://github.com/samuni0809-netizen/smart_access/tree/master/pages/admin"
click node_admin_audit "https://github.com/samuni0809-netizen/smart_access/blob/master/pages/admin/auditoria.html"
click node_admin_menu "https://github.com/samuni0809-netizen/smart_access/blob/master/js/barra.js"
click node_guard_scan "https://github.com/samuni0809-netizen/smart_access/blob/master/pages/vigilante/escanear_qr.html"
click node_guard_entries "https://github.com/samuni0809-netizen/smart_access/blob/master/pages/vigilante/ingresos.html"
click node_guard_records "https://github.com/samuni0809-netizen/smart_access/tree/master/pages/vigilante"
click node_guard_profile "https://github.com/samuni0809-netizen/smart_access/blob/master/pages/vigilante/perfil_vigilante.html"
click node_user_access "https://github.com/samuni0809-netizen/smart_access/blob/master/pages/usuario/mis%20_accesos.html"
click node_user_assets "https://github.com/samuni0809-netizen/smart_access/tree/master/pages/usuario"
click node_user_profile "https://github.com/samuni0809-netizen/smart_access/blob/master/pages/usuario/perfil_usuario.html"
click node_access_db "https://github.com/samuni0809-netizen/smart_access/blob/master/Smart_Access.sql"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_login_ui,node_nav_loader,node_shared_nav,node_access_db toneBlue
class node_admin_dashboard,node_admin_records,node_admin_audit,node_admin_menu toneAmber
class node_guard_scan,node_guard_entries,node_guard_records,node_guard_profile toneMint
class node_user_access,node_user_assets,node_user_profile toneRose
class node_visitor toneIndigo
```

## Components

### Access control

- [Login and registration tabs](https://github.com/samuni0809-netizen/smart_access/blob/master/js/login.js): `js/login.js`
- [Navigation loader](https://github.com/samuni0809-netizen/smart_access/blob/master/js/nav.js): `js/nav.js`
- [Shared navigation templates](https://github.com/samuni0809-netizen/smart_access/tree/master/pages/components): `pages/components`
- [Access database](https://github.com/samuni0809-netizen/smart_access/blob/master/Smart_Access.sql): `Smart_Access.sql`

### Administration

- [Admin dashboard](https://github.com/samuni0809-netizen/smart_access/blob/master/pages/admin/dashboard.html): `pages/admin/dashboard.html`
- [User and asset management](https://github.com/samuni0809-netizen/smart_access/tree/master/pages/admin): `pages/admin`
- [Audit and entry history](https://github.com/samuni0809-netizen/smart_access/blob/master/pages/admin/auditoria.html): `pages/admin/auditoria.html`
- [Admin menu toggle](https://github.com/samuni0809-netizen/smart_access/blob/master/js/barra.js): `js/barra.js`

### Guard operations

- [QR scanning](https://github.com/samuni0809-netizen/smart_access/blob/master/pages/vigilante/escanear_qr.html): `pages/vigilante/escanear_qr.html`
- [Guard entry registration](https://github.com/samuni0809-netizen/smart_access/blob/master/pages/vigilante/ingresos.html): `pages/vigilante/ingresos.html`
- [Guard user and asset registration](https://github.com/samuni0809-netizen/smart_access/tree/master/pages/vigilante): `pages/vigilante`
- [Guard profile](https://github.com/samuni0809-netizen/smart_access/blob/master/pages/vigilante/perfil_vigilante.html): `pages/vigilante/perfil_vigilante.html`

### User self-service

- [My access history](https://github.com/samuni0809-netizen/smart_access/blob/master/pages/usuario/mis%20_accesos.html): `pages/usuario/mis _accesos.html`
- [My computer and vehicle](https://github.com/samuni0809-netizen/smart_access/tree/master/pages/usuario): `pages/usuario`
- [User profile](https://github.com/samuni0809-netizen/smart_access/blob/master/pages/usuario/perfil_usuario.html): `pages/usuario/perfil_usuario.html`

### Other components

- **Site visitor**

## Connections

- Site visitor → Login and registration tabs: opens interface
- Navigation loader → Shared navigation templates: fetches templates (evidence: `js/nav.js`)
- Site visitor → Admin dashboard: uses admin screens
- Site visitor → QR scanning: uses guard screens
- Site visitor → My access history: checks access
- Admin menu toggle → Admin dashboard: toggles menu
