Enterprise HRIS
130+ module HR with message bus
Problem
Large Indonesian enterprises with 500+ employees need:
- A single HR platform covering the entire employee lifecycle
- Real-time notifications across web and mobile (not polling)
- Distributed processing for heavy workloads (bulk payroll, mass notifications)
- Multi-database strategy for structured HR data and semi-structured logs/chat
- GDPR-compliant data handling with proper access control
Solution
An enterprise HRIS platform with message-driven architecture:
- Backend Admin (80+ modules) — Payroll, KPI, Performance Appraisal, Layoff, Recruitment, Severance, Notice Letters, Attendance, Leave
- Backend API (50+ modules) — RESTful API layer for mobile apps and third-party integrations
- Message Bus — RabbitMQ for async task processing (bulk payroll calculation, mass email/SMS)
- Real-time Layer — MQTT pub-sub for live notifications, chat, and presence
- Dual Database — PostgreSQL for relational HR data, MongoDB for chat messages, logs, and documents
Architecture
┌────────────────────┐
│ Mobile App │
└────────┬───────────┘
│ MQTT (live) / REST API
┌────────▼───────────┐
│ Backend API │
│ 50+ modules │
└────────┬───────────┘
│
┌────────────────┼────────────────┐
│ │ │
┌──────▼──────┐ ┌──────▼──────┐ ┌──────▼──────┐
│ RabbitMQ │ │ PostgreSQL │ │ MongoDB │
│ (async) │ │ (HR data) │ │ (chat/logs) │
└──────┬──────┘ └─────────────┘ └─────────────┘
│
┌──────▼──────────────────────────┐
│ Backend Admin (80+ modules) │
│ Payroll · KPI · Appraisal · … │
└─────────────────────────────────┘
Key Tech Decisions
RabbitMQ over Redis queues
Redis queues are simpler but lack durability guarantees. RabbitMQ with persistent
queues ensures payroll calculations survive server restarts. Exchange-based
routing enables targeted delivery — e.g., payroll.processing exchange routes
differently than notification.bulk.
MQTT for real-time chat
MQTT (via php-mqtt client) was chosen over WebSocket because mobile apps already
use MQTT for push notifications. Reusing the same protocol for chat avoids
maintaining two real-time infrastructure stacks. The broker handles
topic-based pub-sub: chat/{user_id}, notification/{user_id}.
MongoDB for polymorphic documents
Employee documents (contracts, certificates, ID scans) are semi-structured — each document type has different metadata fields. MongoDB’s flexible schema accommodates this without the overhead of EAV (Entity-Attribute-Value) patterns in PostgreSQL.
GIS with phpgeo
Attendance tracking uses phpgeo for geofence calculations — determining if an employee’s GPS coordinates fall within the office polygon. The library provides Haversine distance, bounding box queries, and polygon containment checks.
Metrics
| Metric | Value |
|---|---|
| Total Modules | 130+ (80 Admin + 50 API) |
| Message Broker | RabbitMQ |
| Real-time Protocol | MQTT |
| Databases | PostgreSQL + MongoDB |
| Export Engines | PhpSpreadsheet + PhpWord + DomPDF |