An enterprise-grade, high-performance biometric attendance synchronization desktop application. Bioryx bridges physical ZKTeco biometric terminals with a cloud-based or local MongoDB cluster, featuring offline-first buffering, local backups, auto-recovery, and real-time punch event streaming.
- Hardware Connectivity: Connects to physical ZKTeco hardware readers via TCP/IP (standard port
4370) using the robustzkteco-jslibrary. - Real-time Streaming: Dynamically listens to real-time log and attendance punch events directly from the terminal socket, instantly propagating them to the user interface.
- Periodic Background Sync: Runs a scheduled periodic background sync (defaulting to every 5 minutes) to pull users and logs, ensuring local archives and databases stay up-to-date with hardware state.
- Dynamic Daily Records: Groups attendance logs by date (
YYYY-MM-DD). Automatically computesinTime(first punch of the day) andoutTime(latest punch of the day) for each user seamlessly, avoiding cluttered log tables. - DNS Override: Automatically overrides DNS servers (
8.8.8.8/8.8.4.4) in the Electron app to guarantee ultra-stable MongoDB Atlas SRV connection resolution on any local area network.
- Resilient Offline Cache: When MongoDB is offline, real-time and device-fetched punches are buffered locally in
local_punch_cache.jsonunder the secure OSappDatapath. - Auto-Sync on Reconnect: Automatically detects database recovery (during manual sync requests or reconnection events), flushing and synchronizing cached punches in strict chronological order to maintain historical accuracy.
- 7-Day Local Backup Archive: Maintains a local fallback file (
device_logs_archive.json) which stores the last 7 days of attendance logs as an offline backup.
- Modern Aesthetics: Built with customized modern typography (Poppins), elegant glassmorphism effects, responsive sidebar navigation, and interactive animations.
- IPC-Driven Event Streams: Operates entirely asynchronously with robust Electron Inter-Process Communication (IPC) handlers to ensure that network operations never freeze the desktop UI.
Bioryx/
├── backend/
│ ├── db/
│ │ └── attendanceDb.ts # MongoDB connection & punch aggregator service
│ └── device/
│ └── zktecoService.ts # ZKTeco biometric device wrapper & TCP socket manager
├── electron/
│ ├── main.ts # Electron Main Process, IPC Handlers, and cache sync logic
│ └── preload.ts # Secure context isolation bridge exposing APIs to renderer
├── renderer/
│ ├── core/ # Global styles, gooey toasts, sidebar logic
│ ├── dashboard/ # Main Dashboard page layout, styling, and controller
│ ├── splash/ # Elegant startup loading splash screen
│ ├── device-manager/ # UI components for connecting & managing ZKTeco terminals
│ └── attendance/ # Modern grid/table view of punch logs
├── tsconfig.json # TypeScript project compilation configurations
├── package.json # Project dependencies, scripts, and details
└── .env # Environmental configuration variables (Not required for production)
Create a .env file in the root directory to customize the application's configuration:
# MongoDB Connection URI (supports SRV cloud clusters)
MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/bioryx
# Biometric Device Settings
DEVICE_IP=192.168.1.201
DEVICE_PORT=4370
# Periodic Sync Interval in milliseconds (e.g., 300000 ms = 5 minutes)
SYNC_INTERVAL=300000- Node.js (v18 or higher recommended)
- npm (v9 or higher)
- A physical or simulated ZKTeco attendance machine reachable via your local network.
- A MongoDB instance (local database or MongoDB Atlas cloud cluster).
-
Clone the repository:
git clone https://github.com/VimukthiPramudantha/Bioryx.git cd Bioryx -
Install project dependencies:
npm install
To compile TypeScript and start the Electron application concurrently:
npm startTo manually compile TypeScript files from the source directories into the dist/ build directory:
- Run a single compilation build:
npm run build
- Run in watch mode (auto-recompiles on save):
npm run watch
Rather than logging hundreds of flat, raw entries in the database, the database layer structures attendance under a daily document format:
{
"_id": "ObjectId",
"date": "2026-05-24",
"records": [
{
"userId": "101",
"name": "Jane Doe",
"inTime": "2026-05-24T08:02:15.000Z",
"outTime": "2026-05-24T17:05:42.000Z"
}
]
}- First punch of the day initializes the daily document and records the
inTime. - Any subsequent punch on the same day checks if the new time is later than the stored
inTimeand sets or updatesoutTimeto the new punch.
- Punches gathered while the MongoDB instance is offline are saved locally to:
%APPDATA%/bioryx/local_punch_cache.json - Once MongoDB connectivity is restored, a chronological batch update is automatically performed to sync all buffered records, ensuring zero data loss and accurate audits.
Distributed under the ISC License. See package.json for details.