Integration
Biometric attendance sync
A pipeline that pulls punches from ZKTeco biometric terminals into Postgres and serves them to the HR system through an API.
- Role
- Sole developer
- When
- Aug 2026
- Stack
- Python, pytest, TypeScript, Vercel Functions, Supabase, PostgreSQL
Overview
Attendance lived inside the terminal vendor's cloud and had to be exported by hand. This project moves it into a database the company owns and exposes it through an API with per-consumer keys.
It has two halves because of a network rule: the vendor only accepts calls from an approved IP address, so the poller runs on a fixed machine while the API runs on Vercel.
Engineering notes
Two writers, identical rows
A punch can arrive by poll or by callback. Both paths map the event the same way, so the same punch produces the same row whichever one gets there first.
139 tests with no network
The vendor client is tested offline against recorded response shapes, with six more tests that run against the real API only when asked.
Built for whoever runs it next
The command-line tool has documented flags, exit codes and date handling, and writes CSVs that open correctly in Excel.