Back to Case Studies
Next.js 16 + React 19Express + BullMQIoT Network Integration

Hotel Payroll & HRM.

A workforce management platform built for the hospitality sector. It replaces biometric machines with zero-touch, real-time attendance using employees' own devices and MikroTik network integration.

Project Type

Enterprise SaaS

Role

Full-Stack Architect

Timeline

2026

Highlight

MikroTik Router Integration

Hotel HRM and payroll admin dashboard overview

Project Overview

Managing hotel staff is complex. Hospitality runs 24/7 across multiple departments — housekeeping, security, food & beverage, and front office — each on rotating shifts. Traditional HR systems struggle with this flexibility, and legacy biometric attendance machines are often slow, prone to spoofing, or cause bottlenecks during shift changes.

To solve this, I architected a specialised HRM and payroll platform. Its defining feature is its zero-touch attendance mechanism. Instead of physical punch cards or thumbprints, the platform integrates directly with the hotel's enterprise networking hardware (MikroTik routers). When an employee's registered smartphone connects to the designated staff Wi-Fi, the system automatically clocks them in.

Coupled with dynamic shift rostering, automated full and final (F&F) settlements, and a one-click payroll engine that factors in statutory compliance (such as LWP and deductions), the platform greatly reduces administrative overhead and payroll disputes.

The Core Challenge: MikroTik Integration

Real-Time MAC Address Binding

The hardest technical challenge was engineering a reliable, real-time presence detection system using the hotel's existing networking hardware. The goal was to eliminate buddy-punching and physical hardware queues.

  • The Protocol: I used the routeros-client library in Node.js to establish an ongoing API connection with the hotel's MikroTik routers, listening for active wireless registrations and DHCP leases.
  • Device Spoofing Prevention: MAC addresses can be spoofed. To counter this, the backend doesn't just bind a MAC address to an employee; it monitors connection patterns, session durations, and AP transitions, maintaining a state machine via Redis to filter out unstable connections or passing devices.
  • Scalability & Queues: Polling a router with 200+ active leases every few seconds creates significant load. I implemented BullMQ (Redis-backed message queues) to handle connection events asynchronously. When a device drops off the network for a short period (e.g., walking out of range), the system buffers the event to prevent accidental "clock-outs," ensuring the attendance logs remain clean and accurate.
  • Offline Resilience & Local Sync: A critical requirement was ensuring attendance still works during ISP outages. Because the MikroTik router and backend edge node operate on the local area network (LAN), the device binding and presence detection continue functioning completely offline. Once internet connectivity is restored, the edge node securely syncs the queued attendance logs back to the main cloud database without dropping a single punch.

Core Modules & Implementation

Workforce Directory & Management

Employee directory management screen

A centralised hub for all active personnel. It supports detailed access profiles, role-based permissions, and fast querying. This module forms the foundation for mapping departments and organizational hierarchies.

Dynamic Shift Rostering

Employee shift rostering screen

Hospitality relies on rotating 24/7 schedules. This visual interface allows managers to bulk-assign morning, evening, and night shifts, handle weekly offs, and ensure cross-department coverage.

Device Management for Wi-Fi Attendance

Wi-Fi attendance device management screen

The admin interface where managers approve, reset, and bind employee MAC addresses to specific Wi-Fi networks for secure, location-based attendance tracking.

Comprehensive Attendance Reports

Employee attendance history reports

Once devices are bound, the system generates detailed attendance matrices capturing presence, absence, missed punches, and leave types in real time.

One-Click Payroll Engine

Payroll engine salary and compliance processing screen

The core financial processor. It aggregates attendance data, calculates LWP (Leave Without Pay) deductions, applies statutory compliance rules, processes fixed and overtime pay, and generates batch PDF payslips via PDFKit.

Employee Self-Service Portal

Employee self-service portal dashboard

A consumer-grade portal where staff can view shift schedules, check attendance logs, apply for leave, download payslips, and punch in manually (if enabled), directly from their mobile phones.

Tech Stack

Next.js 16React 19Tailwind CSSZustandExpress 5Prisma ORMPostgreSQLRedisBullMQMikroTik RouterOS APIPDFKitFramer Motion

Outcomes

Zero-Friction Attendance: By using existing networking hardware, the hotel achieved 100% compliance in attendance logging without staff ever needing to queue at a terminal.

Faster Payroll Processing: Automating the bridge between attendance matrices and statutory compliance calculations reduced the monthly payroll cycle from 4 days of manual data entry to a 10-minute automated review process.

Greater Transparency: The employee portal significantly reduced HR queries by giving staff instant access to their shift schedules, leave balances, and digital payslips.

What comes next

Ready to build?

If the work above is the standard you want, share what you are launching. We will align on scope, timeline, and a fixed quote before a single line of code is written.