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

Next-Gen Hotel HRM & Payroll

A comprehensive workforce management platform tailored for the hospitality sector. It replaces manual biometric machines with zero-touch, real-time attendance using employee devices and MikroTik network integration.

Project Type

Enterprise SaaS

Role

Full-Stack Architect

Timeline

2026

Highlight

MikroTik Router Integration

Hotel HRM Admin Dashboard Overview

Project Overview

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

To solve this, I architected a specialized HRM and Payroll platform. The most defining feature of this system 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 compliances (like LWP and deductions), this platform drastically reduces administrative overhead and eliminates payroll disputes.

The Ultimate Challenge: MikroTik Integration

Real-Time MAC Address Binding

The hardest technical challenge of this project 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 utilized 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

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

Dynamic Shift Rostering

Shift Rostering

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

Device Management for Wi-Fi Attendance

Device Management
Attendance Reports

The admin interface where managers approve, reset, and bind employee MAC addresses. Once bound, the system generates comprehensive attendance matrices detailing presents, absents, missing punches, and leaves.

One-Click Payroll Engine

Payroll Engine

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

Employee Self-Service Portal

Employee Portal

A consumer-grade portal for staff to view their shift schedules, check attendance logs, apply for leaves, download payslips, and manual punch-ins (if configured) directly from their mobile devices.

Tech Stack

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

Final Outcomes

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

Payroll Processing Time Slashed: 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.

Enhanced Transparency: The Employee Portal significantly reduced HR queries, providing staff with instant access to their shift schedules, leave balances, and digital payslips.

Need an intelligent enterprise solution?

Whether it involves complex IoT integrations, real-time message queuing, or developing comprehensive operational dashboards—I can engineer it.