# codenebula-dev/fingerprint-scanner-in-out-system architecture

> Architecture diagram of the GitHub repository codenebula-dev/fingerprint-scanner-in-out-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/codenebula-dev/fingerprint-scanner-in-out-system
- Repository: https://github.com/codenebula-dev/fingerprint-scanner-in-out-system

## Overview

Campus biometric entry management combines gate-side identification and movement tracking with student records, daily logs, home-leave handling, curfew oversight, and an administrative panel. The sampled C++ CLI shows orchestration of gate-log and home-record operations; the README describes broader Python workflows and the hardware-to-software design. The tree contains several engine variants, so this graph uses the sampled v2 CLI and treats the Windows bridge, GUI, and Pico implementation as distinct subsystems. Python-to-engine GUI wiring and some unsampled subsystem internals are not established by the excerpts.

Main entry points: [`cpp_engine_v2/src/main.cpp`](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/cpp_engine_v2/src/main.cpp) (Gate controller), [`GUI-Application/main.py`](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/GUI-Application/main.py) (Admin interface), [`bridge_new/bindings/bind_database.cpp`](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/bridge_new/bindings/bind_database.cpp) (Python engine bindings), [`pico_engine/main_pico.cpp`](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/pico_engine/main_pico.cpp) (Pico gate firmware)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gate["Gate workflows"]
  node_gate_cli["Gate controller<br/>[main.cpp]"]
  node_state_logic["Direction and status<br/>[main.cpp]"]
  node_curfew["Curfew audit<br/>[main.cpp]"]
end

subgraph group_engine["C++ engine"]
  node_biometric["Fingerprint matching<br/>[fingerprint.cpp]"]
  node_student_records[("Student profiles<br/>[master_db.cpp]")]
  node_daily_logs[("Daily gate logs<br/>[daily_log.cpp]")]
  node_home_records[("Home-leave records<br/>[home_db.cpp]")]
  node_rejections[("Rejected scans<br/>[daily_log.cpp]")]
  node_cpp_bindings["Python engine bindings<br/>[bind_database.cpp]"]
end

subgraph group_admin["Admin panel"]
  node_admin_panel["Admin interface<br/>[main.py]"]
  node_log_view["Log view<br/>[log_view.py]"]
  node_out_view["Outside-student view<br/>[out_view.py]"]
  node_requests_view["Requests view<br/>[requests_view.py]"]
  node_users_admin["Student management<br/>[users_win.py]"]
  node_gui_database["GUI database access<br/>[database_win.py]"]
end

subgraph group_embedded["Pico terminal"]
  node_pico_firmware["Pico gate firmware<br/>[main_pico.cpp]"]
  node_pico_matcher["Pico biometric matcher<br/>[pico_matcher.cpp]"]
  node_pico_state["Pico gate state<br/>[pico_fsm.cpp]"]
  node_hardware_bridge["Hardware database bridge<br/>[pico_db_bridge.py]"]
end

node_gate_staff(("Gate staff"))
node_fingerprint_scanner["Fingerprint scanner"]
node_admin(("Administrators"))

node_gate_staff -->|"operates"| node_gate_cli
node_fingerprint_scanner -.->|"provides scan"| node_gate_cli
node_gate_cli -->|"reads profiles"| node_student_records
node_gate_cli -->|"reads and writes"| node_daily_logs
node_gate_cli -->|"reads and writes"| node_home_records
node_gate_cli -->|"records failures"| node_rejections
node_gate_cli -->|"derives status"| node_state_logic
node_gate_cli -->|"runs audit"| node_curfew
node_admin -->|"uses"| node_admin_panel
node_admin_panel -->|"shows logs"| node_log_view
node_admin_panel -->|"shows outside list"| node_out_view
node_admin_panel -->|"handles requests"| node_requests_view
node_admin_panel -->|"manages students"| node_users_admin
node_admin_panel -->|"uses access layer"| node_gui_database
node_cpp_bindings -->|"exposes CRUD"| node_student_records
node_cpp_bindings -->|"exposes log API"| node_daily_logs
node_cpp_bindings -->|"exposes leave API"| node_home_records
node_pico_firmware -->|"uses matcher"| node_pico_matcher
node_pico_firmware -->|"uses state machine"| node_pico_state
node_hardware_bridge -.->|"bridges hardware"| node_pico_firmware

click node_gate_cli "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/cpp_engine_v2/src/main.cpp"
click node_biometric "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/cpp_engine_v2/src/fingerprint.cpp"
click node_state_logic "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/cpp_engine_v2/src/main.cpp"
click node_student_records "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/cpp_engine_v2/src/master_db.cpp"
click node_daily_logs "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/cpp_engine_v2/src/daily_log.cpp"
click node_home_records "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/cpp_engine_v2/src/home_db.cpp"
click node_curfew "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/cpp_engine_v2/src/main.cpp"
click node_rejections "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/cpp_engine_v2/src/daily_log.cpp"
click node_admin_panel "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/GUI-Application/main.py"
click node_log_view "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/GUI-Application/log_view.py"
click node_out_view "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/GUI-Application/out_view.py"
click node_requests_view "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/GUI-Application/requests_view.py"
click node_users_admin "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/GUI-Application/users_win.py"
click node_gui_database "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/GUI-Application/database_win.py"
click node_cpp_bindings "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/bridge_new/bindings/bind_database.cpp"
click node_pico_firmware "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/pico_engine/main_pico.cpp"
click node_pico_matcher "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/pico_engine/pico_matcher.cpp"
click node_pico_state "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/pico_engine/pico_fsm.cpp"
click node_hardware_bridge "https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/hardware/pico_db_bridge.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_gate_cli,node_state_logic,node_curfew toneBlue
class node_biometric,node_student_records,node_daily_logs,node_home_records,node_rejections,node_cpp_bindings toneAmber
class node_admin_panel,node_log_view,node_out_view,node_requests_view,node_users_admin,node_gui_database toneMint
class node_pico_firmware,node_pico_matcher,node_pico_state,node_hardware_bridge toneRose
class node_gate_staff,node_fingerprint_scanner,node_admin toneIndigo
```

## Components

### Gate workflows

- [Gate controller](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/cpp_engine_v2/src/main.cpp): `cpp_engine_v2/src/main.cpp`
- [Direction and status](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/cpp_engine_v2/src/main.cpp): `cpp_engine_v2/src/main.cpp`
- [Curfew audit](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/cpp_engine_v2/src/main.cpp): `cpp_engine_v2/src/main.cpp`

### C++ engine

- [Fingerprint matching](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/cpp_engine_v2/src/fingerprint.cpp): `cpp_engine_v2/src/fingerprint.cpp`
- [Student profiles](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/cpp_engine_v2/src/master_db.cpp): `cpp_engine_v2/src/master_db.cpp`
- [Daily gate logs](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/cpp_engine_v2/src/daily_log.cpp): `cpp_engine_v2/src/daily_log.cpp`
- [Home-leave records](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/cpp_engine_v2/src/home_db.cpp): `cpp_engine_v2/src/home_db.cpp`
- [Rejected scans](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/cpp_engine_v2/src/daily_log.cpp): `cpp_engine_v2/src/daily_log.cpp`
- [Python engine bindings](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/bridge_new/bindings/bind_database.cpp): `bridge_new/bindings/bind_database.cpp`

### Admin panel

- [Admin interface](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/GUI-Application/main.py): `GUI-Application/main.py`
- [Log view](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/GUI-Application/log_view.py): `GUI-Application/log_view.py`
- [Outside-student view](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/GUI-Application/out_view.py): `GUI-Application/out_view.py`
- [Requests view](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/GUI-Application/requests_view.py): `GUI-Application/requests_view.py`
- [Student management](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/GUI-Application/users_win.py): `GUI-Application/users_win.py`
- [GUI database access](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/GUI-Application/database_win.py): `GUI-Application/database_win.py`

### Pico terminal

- [Pico gate firmware](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/pico_engine/main_pico.cpp): `pico_engine/main_pico.cpp`
- [Pico biometric matcher](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/pico_engine/pico_matcher.cpp): `pico_engine/pico_matcher.cpp`
- [Pico gate state](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/pico_engine/pico_fsm.cpp): `pico_engine/pico_fsm.cpp`
- [Hardware database bridge](https://github.com/codenebula-dev/fingerprint-scanner-in-out-system/blob/main/hardware/pico_db_bridge.py): `hardware/pico_db_bridge.py`

### Other components

- **Gate staff**
- **Fingerprint scanner**
- **Administrators**

## Connections

- Gate staff → Gate controller: operates
- Fingerprint scanner → Gate controller: provides scan
- Gate controller → Student profiles: reads profiles
- Gate controller → Daily gate logs: reads and writes
- Gate controller → Home-leave records: reads and writes
- Gate controller → Rejected scans: records failures
- Gate controller → Direction and status: derives status
- Gate controller → Curfew audit: runs audit
- Administrators → Admin interface: uses
- Admin interface → Log view: shows logs
- Admin interface → Outside-student view: shows outside list
- Admin interface → Requests view: handles requests
- Admin interface → Student management: manages students
- Admin interface → GUI database access: uses access layer
- Python engine bindings → Student profiles: exposes CRUD
- Python engine bindings → Daily gate logs: exposes log API
- Python engine bindings → Home-leave records: exposes leave API
- Pico gate firmware → Pico biometric matcher: uses matcher
- Pico gate firmware → Pico gate state: uses state machine
- Hardware database bridge → Pico gate firmware: bridges hardware
