# martinezaus/conectbiosys_web architecture

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

- Interactive diagram: https://gitdiagram.com/martinezaus/conectbiosys_web
- Repository: https://github.com/martinezaus/conectbiosys_web

## Overview

ConectBioSys_Web is a local-network web application for collecting biometric time-clock records, reviewing attendance, and synchronizing records with an external employee/attendance database. Its central workflow is web request → long-running clock operation → normalized readings → local history, with a separate configured export path to the external system. The README contains only the product name, so broader product capabilities and route details cannot be verified; the graph follows the sampled code and source index.

Main entry points: [`webapp.py`](https://github.com/martinezaus/conectbiosys_web/blob/main/webapp.py) (Web routes), [`resources/config_path.py`](https://github.com/martinezaus/conectbiosys_web/blob/main/resources/config_path.py) (Runtime configuration), [`app/api/asistencias.py`](https://github.com/martinezaus/conectbiosys_web/blob/main/app/api/asistencias.py) (Attendance export), [`app/operaciones.py`](https://github.com/martinezaus/conectbiosys_web/blob/main/app/operaciones.py) (Clock operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_webapp["Web routes<br/>[webapp.py]"]
end

subgraph group_clocks["Clock integration"]
  node_clock_ops["Clock operations<br/>[operaciones.py]"]
  node_hikvision["Hikvision adapter<br/>[hikvision.py]"]
  node_zkteco["ZKTeco adapter<br/>[zkteco.py]"]
  node_adapter_base["Adapter contract<br/>[base.py]"]
  node_clock_reading["Normalized reading<br/>[modelos.py]"]
end

subgraph group_attendance["Attendance data"]
  node_local_db[("Local history<br/>[database.py]")]
  node_local_file[("History database file<br/>[marcaciones.db]")]
  node_attendance_api["Attendance export<br/>[asistencias.py]"]
  node_employees_api["Employee lookup<br/>[empleados.py]"]
  node_organizations_api["Organization scope<br/>[organizaciones.py]"]
end

subgraph group_configuration["Integration configuration"]
  node_clock_registry["Adapter registry<br/>[marcas_relojes.py]"]
  node_clock_config_api["Clock settings"]
  node_runtime_config["Runtime configuration<br/>[config_path.py]"]
  node_db_engines["Database engines<br/>[db_engines.py]"]
end

node_operator(("Operator"))
node_external_db[("Configured SQL database")]

node_operator -->|"uses"| node_webapp
node_webapp -->|"invokes"| node_clock_ops
node_webapp -->|"queries"| node_local_db
node_webapp -->|"routes to"| node_attendance_api
node_webapp -->|"routes to"| node_organizations_api
node_webapp -->|"routes to"| node_clock_config_api
node_clock_ops -->|"creates adapters"| node_runtime_config
node_runtime_config -->|"loads"| node_clock_registry
node_clock_registry -->|"registers"| node_hikvision
node_clock_registry -->|"registers"| node_zkteco
node_hikvision -->|"implements"| node_adapter_base
node_zkteco -->|"implements"| node_adapter_base
node_hikvision -->|"returns readings"| node_clock_reading
node_zkteco -->|"returns readings"| node_clock_reading
node_clock_ops -->|"writes records"| node_local_file
node_local_db -->|"stores records"| node_local_file
node_attendance_api -->|"resolves employees"| node_employees_api
node_attendance_api -->|"loads export settings"| node_runtime_config
node_employees_api -->|"uses organization scope"| node_organizations_api
node_attendance_api -->|"inserts attendance"| node_external_db
node_organizations_api -->|"creates SQL engine"| node_runtime_config
node_runtime_config -->|"selects engine"| node_db_engines

click node_webapp "https://github.com/martinezaus/conectbiosys_web/blob/main/webapp.py"
click node_clock_ops "https://github.com/martinezaus/conectbiosys_web/blob/main/app/operaciones.py"
click node_hikvision "https://github.com/martinezaus/conectbiosys_web/blob/main/app/api/hikvision.py"
click node_zkteco "https://github.com/martinezaus/conectbiosys_web/blob/main/app/api/zkteco.py"
click node_adapter_base "https://github.com/martinezaus/conectbiosys_web/blob/main/app/api/base.py"
click node_clock_reading "https://github.com/martinezaus/conectbiosys_web/blob/main/app/api/modelos.py"
click node_clock_registry "https://github.com/martinezaus/conectbiosys_web/blob/main/resources/marcas_relojes.py"
click node_local_db "https://github.com/martinezaus/conectbiosys_web/blob/main/app/database/database.py"
click node_local_file "https://github.com/martinezaus/conectbiosys_web/blob/main/data/marcaciones.db"
click node_attendance_api "https://github.com/martinezaus/conectbiosys_web/blob/main/app/api/asistencias.py"
click node_employees_api "https://github.com/martinezaus/conectbiosys_web/blob/main/app/api/empleados.py"
click node_organizations_api "https://github.com/martinezaus/conectbiosys_web/blob/main/app/api/organizaciones.py"
click node_clock_config_api "https://github.com/martinezaus/conectbiosys_web/blob/main/app/api/configuracion_relojes.py"
click node_runtime_config "https://github.com/martinezaus/conectbiosys_web/blob/main/resources/config_path.py"
click node_db_engines "https://github.com/martinezaus/conectbiosys_web/blob/main/resources/db_engines.py"

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_webapp toneBlue
class node_clock_ops,node_hikvision,node_zkteco,node_adapter_base,node_clock_reading,node_external_db toneAmber
class node_local_db,node_local_file,node_attendance_api,node_employees_api,node_organizations_api toneMint
class node_clock_registry,node_clock_config_api,node_runtime_config,node_db_engines toneRose
class node_operator toneIndigo
```

## Components

### Web application

- [Web routes](https://github.com/martinezaus/conectbiosys_web/blob/main/webapp.py): `webapp.py`

### Clock integration

- [Clock operations](https://github.com/martinezaus/conectbiosys_web/blob/main/app/operaciones.py): `app/operaciones.py`
- [Hikvision adapter](https://github.com/martinezaus/conectbiosys_web/blob/main/app/api/hikvision.py): `app/api/hikvision.py`
- [ZKTeco adapter](https://github.com/martinezaus/conectbiosys_web/blob/main/app/api/zkteco.py): `app/api/zkteco.py`
- [Adapter contract](https://github.com/martinezaus/conectbiosys_web/blob/main/app/api/base.py): `app/api/base.py`
- [Normalized reading](https://github.com/martinezaus/conectbiosys_web/blob/main/app/api/modelos.py): `app/api/modelos.py`

### Attendance data

- [Local history](https://github.com/martinezaus/conectbiosys_web/blob/main/app/database/database.py): `app/database/database.py`
- [History database file](https://github.com/martinezaus/conectbiosys_web/blob/main/data/marcaciones.db): `data/marcaciones.db`
- [Attendance export](https://github.com/martinezaus/conectbiosys_web/blob/main/app/api/asistencias.py): `app/api/asistencias.py`
- [Employee lookup](https://github.com/martinezaus/conectbiosys_web/blob/main/app/api/empleados.py): `app/api/empleados.py`
- [Organization scope](https://github.com/martinezaus/conectbiosys_web/blob/main/app/api/organizaciones.py): `app/api/organizaciones.py`

### Integration configuration

- [Adapter registry](https://github.com/martinezaus/conectbiosys_web/blob/main/resources/marcas_relojes.py): `resources/marcas_relojes.py`
- [Clock settings](https://github.com/martinezaus/conectbiosys_web/blob/main/app/api/configuracion_relojes.py): `app/api/configuracion_relojes.py`
- [Runtime configuration](https://github.com/martinezaus/conectbiosys_web/blob/main/resources/config_path.py): `resources/config_path.py`
- [Database engines](https://github.com/martinezaus/conectbiosys_web/blob/main/resources/db_engines.py): `resources/db_engines.py`

### Other components

- **Operator**
- **Configured SQL database**

## Connections

- Operator → Web routes: uses
- Web routes → Clock operations: invokes (evidence: `webapp.py`)
- Web routes → Local history: queries (evidence: `webapp.py`)
- Web routes → Attendance export: routes to (evidence: `webapp.py`)
- Web routes → Organization scope: routes to (evidence: `webapp.py`)
- Web routes → Clock settings: routes to (evidence: `webapp.py`)
- Clock operations → Runtime configuration: creates adapters (evidence: `app/operaciones.py`)
- Runtime configuration → Adapter registry: loads (evidence: `resources/config_path.py`)
- Adapter registry → Hikvision adapter: registers (evidence: `resources/marcas_relojes.py`)
- Adapter registry → ZKTeco adapter: registers (evidence: `resources/marcas_relojes.py`)
- Hikvision adapter → Adapter contract: implements (evidence: `app/api/hikvision.py`)
- ZKTeco adapter → Adapter contract: implements (evidence: `app/api/zkteco.py`)
- Hikvision adapter → Normalized reading: returns readings (evidence: `app/api/hikvision.py`)
- ZKTeco adapter → Normalized reading: returns readings (evidence: `app/api/zkteco.py`)
- Clock operations → History database file: writes records (evidence: `app/operaciones.py`)
- Local history → History database file: stores records (evidence: `app/database/database.py`)
- Attendance export → Employee lookup: resolves employees (evidence: `app/api/asistencias.py`)
- Attendance export → Runtime configuration: loads export settings (evidence: `app/api/asistencias.py`)
- Employee lookup → Organization scope: uses organization scope (evidence: `app/api/empleados.py`)
- Attendance export → Configured SQL database: inserts attendance (evidence: `app/api/asistencias.py`)
- Organization scope → Runtime configuration: creates SQL engine (evidence: `app/api/organizaciones.py`)
- Runtime configuration → Database engines: selects engine (evidence: `resources/config_path.py`)
