# jcuramingdev/grp1_verity architecture

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

- Interactive diagram: https://gitdiagram.com/jcuramingdev/grp1_verity
- Repository: https://github.com/jcuramingdev/grp1_verity

## Overview

Verity is a supervisor-facing anti-buddy-punching system. A supervisor uses the web interface to authorize access and submit a manual attendance scan; the API validates the employee, compares scan time with shift start, records the scan, and, for late scans, updates strikes and the vacant-time queue. The interface also presents dashboard metrics, master logs, queue and payroll views, and navigation for compliance reports. The excerpts show the UI/API and API/database calls; report behavior and the schema’s details are not shown.

Main entry points: [`Source Code/index.php`](https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/index.php) (Web Interface), [`Source Code/api.php`](https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/api.php) (HTTP API), [`Source Code/db.php`](https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/db.php) (PDO Connection), [`Database/schema.sql`](https://github.com/jcuramingdev/grp1_verity/blob/main/Database/schema.sql) (MySQL Database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Supervisor Interface"]
  node_web_ui["Web Interface<br/>[index.php]"]
  node_dashboard["Dashboard Analytics<br/>[index.php]"]
  node_queue_view["Vacant Time Queue<br/>[index.php]"]
  node_payroll_view["Strikes &amp; Payroll<br/>[index.php]"]
  node_logs_view["Master Logs<br/>[index.php]"]
  node_reports_view["Compliance Reports<br/>[index.php]"]
end

subgraph group_service["Attendance API"]
  node_api["HTTP API<br/>[api.php]"]
  node_authorization["Supervisor Authorization<br/>[api.php]"]
  node_scan_processing["Scan Processing<br/>[api.php]"]
  node_late_handling["Late Scan Handling<br/>[api.php]"]
  node_data_summary["Dashboard Data<br/>[api.php]"]
end

subgraph group_storage["Persistence"]
  node_db_connection["PDO Connection<br/>[db.php]"]
  node_verity_db[("MySQL Database<br/>[schema.sql]")]
end

node_supervisor(("Supervisor"))
node_mysql_service[("MySQL Server")]

node_supervisor -->|"uses"| node_web_ui
node_web_ui -->|"fetches"| node_api
node_api -->|"loads"| node_db_connection
node_db_connection -->|"connects"| node_mysql_service
node_api -->|"queries"| node_verity_db
node_web_ui -->|"renders"| node_dashboard
node_web_ui -->|"renders"| node_queue_view
node_web_ui -->|"renders"| node_payroll_view
node_web_ui -->|"renders"| node_logs_view
node_web_ui -->|"navigates to"| node_reports_view
node_api -->|"validates"| node_authorization
node_api -->|"processes"| node_scan_processing
node_scan_processing -->|"branches to"| node_late_handling
node_api -->|"aggregates"| node_data_summary

click node_web_ui "https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/index.php"
click node_dashboard "https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/index.php"
click node_queue_view "https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/index.php"
click node_payroll_view "https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/index.php"
click node_logs_view "https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/index.php"
click node_reports_view "https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/index.php"
click node_api "https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/api.php"
click node_authorization "https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/api.php"
click node_scan_processing "https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/api.php"
click node_late_handling "https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/api.php"
click node_data_summary "https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/api.php"
click node_db_connection "https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/db.php"
click node_verity_db "https://github.com/jcuramingdev/grp1_verity/blob/main/Database/schema.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_web_ui,node_dashboard,node_queue_view,node_payroll_view,node_logs_view,node_reports_view toneBlue
class node_api,node_authorization,node_scan_processing,node_late_handling,node_data_summary,node_mysql_service toneAmber
class node_db_connection,node_verity_db toneMint
class node_supervisor toneIndigo
```

## Components

### Supervisor Interface

- [Web Interface](https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/index.php): `Source Code/index.php`
- [Dashboard Analytics](https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/index.php): `Source Code/index.php`
- [Vacant Time Queue](https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/index.php): `Source Code/index.php`
- [Strikes & Payroll](https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/index.php): `Source Code/index.php`
- [Master Logs](https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/index.php): `Source Code/index.php`
- [Compliance Reports](https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/index.php): `Source Code/index.php`

### Attendance API

- [HTTP API](https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/api.php): `Source Code/api.php`
- [Supervisor Authorization](https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/api.php): `Source Code/api.php`
- [Scan Processing](https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/api.php): `Source Code/api.php`
- [Late Scan Handling](https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/api.php): `Source Code/api.php`
- [Dashboard Data](https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/api.php): `Source Code/api.php`

### Persistence

- [PDO Connection](https://github.com/jcuramingdev/grp1_verity/blob/main/Source%20Code/db.php): `Source Code/db.php`
- [MySQL Database](https://github.com/jcuramingdev/grp1_verity/blob/main/Database/schema.sql): `Database/schema.sql`

### Other components

- **Supervisor**
- **MySQL Server**

## Connections

- Supervisor → Web Interface: uses (evidence: `Source Code/index.php`)
- Web Interface → HTTP API: fetches (evidence: `Source Code/index.php`)
- HTTP API → PDO Connection: loads (evidence: `Source Code/api.php`)
- PDO Connection → MySQL Server: connects (evidence: `Source Code/db.php`)
- HTTP API → MySQL Database: queries (evidence: `Source Code/api.php`)
- Web Interface → Dashboard Analytics: renders (evidence: `Source Code/index.php`)
- Web Interface → Vacant Time Queue: renders (evidence: `Source Code/index.php`)
- Web Interface → Strikes & Payroll: renders (evidence: `Source Code/index.php`)
- Web Interface → Master Logs: renders (evidence: `Source Code/index.php`)
- Web Interface → Compliance Reports: navigates to (evidence: `Source Code/index.php`)
- HTTP API → Supervisor Authorization: validates (evidence: `Source Code/api.php`)
- HTTP API → Scan Processing: processes (evidence: `Source Code/api.php`)
- Scan Processing → Late Scan Handling: branches to (evidence: `Source Code/api.php`)
- HTTP API → Dashboard Data: aggregates (evidence: `Source Code/api.php`)
