# ZKT-RT — Biometric Hardware Sync & Shift Intelligence System

Canonical page: https://taharafi.com/work/zkt-shift-engine/
Author: Taha Rafi

Socket-level hardware sync connecting ZKTeco terminals with overnight cross-midnight shift algorithm.

## Overview
Production hardware integration system connecting directly to physical ZKTeco biometric terminals over local UDP sockets, resolving complex cross-midnight employee shifts, and generating executive multi-sheet Excel reports.

## Technologies
PHP 8.0+, UDP Socket Programming, Python 3.10+, OpenPyXL, JavaScript AJAX

## Engineering
- Direct Hardware Socket Sync: Communicates with biometric clocks over raw UDP sockets (`port 4370`), patched for PHP 8 compatibility.
- Overnight Shift Resolver: Algorithmic engine that pairs evening check-in punches with early morning check-out punches crossing midnight.
- 20-Minute Leniency Grace Window: Implements daily working duration grace calculations rather than penalizing initial arrival times.
- Automated OpenPyXL Reports: Python generator producing executive multi-sheet workbooks styled with corporate palettes and monthly grids.

## Deliverables
- UDP Hardware Sync Script
- Overnight Shift Resolver Engine
- Executive Python Excel Reporter
- Live AJAX Dashboard UI

## Sources
Contact: connect@taharafi.com
