Road Transport Department, Pahang · Deep Dive Case Study

Nine Systems, One Secure Core: Engineering a State Road Transport Department's Digital Backbone From Scratch

I conceived, researched and built this ecosystem from nothing — field observation, structured consultation with every future user, then full-stack ownership of nine systems sharing one secure core database across 8 branches and 11 enforcement stations.

8
Branches
11
Enforcement Stations
9
Integrated Systems
1
Identity Core

The Business Challenge

None of these nine systems began as a department directive or a vendor-delivered project. Each one originated from my own direct observation of how the department actually worked, validated through field research and structured consultation with the officers, counter staff and programme coordinators who would eventually use it, then built and refined module by module as the operational need for it emerged — starting with a basic staff database in 2020 and growing from there into reporting, prosecution case tracking, certification, disaster coordination and public safety programmes. None of it was planned as one master system from day one. As adoption grew across branches and enforcement stations, the gaps between separately-built systems started to show: the same officer needed separate logins for different applications, granting or revoking access after a staff transfer meant repeating the same change in multiple places, and there was no single source of truth for who currently had access to what across the department's software.

System Overview: One Shared Core, Nine Applications

Rather than merging nine already-working systems into one fragile rebuild, I connected them around a shared core — Admin, the staff management system that already held the department's authoritative staff and organizational records. Today all nine applications read and write against that same central database in real time, with Admin also acting as the ecosystem's central identity and access authority:

Admin
Shared Core Database & Identity
Dakwa
same core database
Batching
same core database
eLapor
same core + WebAuthn login
eSijil
same core, public self-service
Banjir
same core database
Helmet
same core, real-time stock
Advokasi
same core, feeds Helmet
Kehadiran
same core, hosted apart (public)
  • Access to every application is gated through Admin's central login: automatic time-out on idle sessions, an account lock after five failed attempts, and automatic access deactivation the instant a staff transfer is recorded, removing the manual offboarding step entirely.
  • eLapor is the one exception that authenticates with biometric WebAuthn (fingerprint/Face ID) instead of a password, since officers using it are filing reports from the field.
  • Because every system shares one database, changes in one place show up everywhere else instantly — a participant registering through Advokasi automatically updates quota and stock records in Helmet, with no re-entry by staff.
  • Public-facing forms that don't require a login — on eSijil, Advokasi and Kehadiran — sit behind Cloudflare Turnstile bot protection, since they're reachable without going through Admin's access controls.
  • Kehadiran is deliberately hosted apart from Admin and Batching, specifically so its public QR-code check-in traffic never has to cross into the intranet-only access policy enforced on those two systems.

None of this was unified by accident: every record — staff, activity, programme, quota — is tied back to the same core database and the same state-scoped access rules, so a staff member's profile is one single source of truth across all nine systems rather than nine separate copies that can drift out of sync.

Security & Data Protection by Design

Because this system holds real staff personal data, security wasn't treated as an afterthought:

  • AES-256-GCM encryption on every sensitive field — IC number, home address, phone number, e-mail — before it's written to the database. GCM mode also authenticates the data, so the system can detect if an encrypted value has been tampered with, not just decrypt it.
  • Decryption keys are isolated outside the web root, so even a server misconfiguration or a local file inclusion bug can't reach them directly over HTTP.
  • Two separate key sets: one for encrypting personal data, a completely different one for system credentials like API keys and third-party auth tokens — so a leak on one side doesn't expose the other.
  • SQL injection is designed out, not filtered out: every database query goes through PDO prepared statements, with no dynamic query string concatenation anywhere in the codebase.
  • Self-hosted front-end assets — no public CDN dependency — so the system keeps working fully on a restricted government intranet with no outbound internet access.
  • Role-based access control scoped by both role and state/branch, so a user only ever sees the data relevant to their own division.
  • State-level data segregation was designed into the core architecture from the start, not patched on later — which means the same platform is already structurally ready to extend to any other state's Road Transport Department office with minimal extra engineering, not just Pahang.

The Nine Systems

Each system below wasn't designed as a piece of one master plan — it was built to solve one division's specific, immediate problem. What each one grew into afterward follows a similar pattern: once a system is already capturing data as a side effect of doing its job, that data becomes the foundation for something more.

Penguatkuasaan · Enforcement

eLapor

The Problem

Enforcement officers needed a way to file reports from the field — but every report came out however the officer happened to format it, making them inconsistent and hard to file, compare or search afterward.

The Solution

eLapor was originally built to solve exactly that: a system that generates every enforcement report in one standardized format (PDF/JPG), with photo evidence attached, regardless of who's filing it or from which enforcement station.

What Came Next

Since the system was already capturing every report's data as a side effect of standardizing its output, that data became the foundation for genuine enforcement analytics. What started as a report generator grew into a centralized operational intelligence platform — transforming fragmented, spreadsheet-based reporting into a real-time analytics and decision-support ecosystem that consolidates operational, performance, logistics, geographic and environmental data into a single source of truth, using AI-powered analysis and forecasting to support strategic planning and resource optimization.

Operational Scale
19
Operational Locations
8 Branches + 11 Enforcement Stations
30+
Daily Active Users
100+
Daily Operational Records
Real-Time
Performance Visibility
Solution Delivered
  • Standardized enforcement report generation (PDF/JPG) with photo evidence
  • Automated KPI monitoring for individuals, teams, branches and operational units
  • Performance analytics dashboard with drill-down reporting
  • Geospatial intelligence and black-spot mapping
  • Vehicle readiness, maintenance and logistics monitoring
  • Operational trend analysis and benchmarking
  • AI-assisted root-cause analysis for performance changes
  • Environmental factor correlation analysis
  • Resource planning and forecasting models
  • Six-month predictive performance projections
Advanced Analytics Capabilities
Performance Intelligence

Tracks operational KPIs at individual, team, branch and regional levels while identifying top-performing units and emerging trends.

AI Root Cause Analysis

Uses historical and contextual data to explain why operational performance rises or declines, considering weather, seasonal trends, traffic conditions, public holidays and resource availability.

Predictive Forecasting

Generates six-month projections and strategic recommendations to support operational planning, manpower allocation and logistics preparation.

Business Outcomes & Impact
Faster Reporting
Replaced fragmented spreadsheet workflows with centralized daily reporting and near real-time dashboard visibility.
Improved Accuracy
Increased consistency and reliability of operational data through structured validation and standardized reporting.
Predictive Insights
Enabled management to anticipate performance fluctuations, resource shortages and operational risks before they occur.
Better Decisions
Empowered leadership with evidence-based recommendations, forecasting and root-cause analysis rather than relying solely on historical reports.
PHP PDO MySQL Bootstrap JavaScript AJAX REST API Google Maps API Data Analytics Predictive Analytics Forecasting Models AI-Assisted Analysis Business Intelligence
Pendakwaan · Prosecution

Dakwa (Prosecution System)

The Problem

The Prosecution Division (Bahagian Pendakwaan) could have a large number of Accused Persons present at court at the same time during trial sessions, with no structured way to manage who's next, what stage a case was at, or how to find a specific person's case quickly at the counter.

The Solution

Dakwa was built as a queue-management platform: the Accused is registered for a hearing (sebutan kes), given a queue number and a QR code, and counter staff can pull up their case status instantly on a later visit instead of searching manually — a meaningful difference when one session can involve a large flow of Accused Persons through the same court.

What Came Next

Once the queue system was in place and generating records of its own, that data became the basis for AI-assisted pattern analysis — surfacing trends in case volume, court load and processing time that the division couldn't see when the process was still manual.

  • Court queue-number management for Accused Persons during trial sessions
  • QR-code case lookup at the counter
  • Multi-court hearing scheduling & case status tracking
  • AI-assisted pattern analysis on queue & case records
  • PDPA-aware database backup & restore, hardened after real production incidents on the department's server
Pengurusan & Pentadbiran · Administration

Admin (Staff Management System)

The Problem

Every application built for the department — enforcement, prosecution, records — needed to be accessed by the same pool of Road Transport Department staff, but with no shared way to manage who could log into what.

The Solution

Admin started as an access-control system — one place to manage which staff member could access which application, closing that gap first before it became the shared core the rest of the ecosystem is now built around.

What Came Next

Since the staff data needed for access control already lived there, Admin grew into a full staff hub — the foundational workforce management and identity governance platform now powering a growing ecosystem of interconnected business applications: the central source of employee data, authentication, authorization, workforce analytics, training management and certification governance, enabling secure Single Sign-On (SSO) access across multiple independent systems.

Platform Scope
SSO
Central Authentication
RBAC
Role-Based Access Control
Master
Workforce Data Repository
Multi-App
Cross-System Integration
Solution Delivered
  • Centralized workforce master data management
  • Single Sign-On (SSO) authentication across multiple applications
  • Role-based access governance and permission management
  • Employee lifecycle and service history tracking
  • Branch, station and organizational workforce analytics
  • Position, grade and vacancy monitoring
  • Training management and compliance tracking
  • QR-based attendance validation workflows
  • Certificate verification and automated generation
  • Centralized integration layer for future applications
Core Platform Capabilities
Identity & Access Governance

Centralized authentication and authorization ensuring employees only access systems and modules relevant to their roles and responsibilities.

Workforce Intelligence

Provides real-time visibility into workforce demographics, staffing distribution, vacancies, grade composition, service history and organizational trends.

Training & Certification Governance

Manages course administration, attendance validation, certificate approval workflows and annual training KPI compliance monitoring.

Business Outcomes & Impact
Stronger Security
Centralized access governance significantly reduced permission inconsistencies and improved overall security management.
Faster Onboarding
New employees can be provisioned once and immediately receive access to authorized systems through centralized identity management.
Unified Ecosystem
Established a single source of truth that supports multiple independently developed applications without duplicating workforce data.
Better Visibility
Management gained real-time workforce intelligence, staffing insights and training compliance visibility across the organization.
PHP PDO MySQL Bootstrap JavaScript AJAX REST API Single Sign-On (SSO) RBAC Identity Governance Workforce Analytics Training Management Certificate Automation
Dokumentasi · Records

Batching (Records System)

The Problem

The department handled a large volume of physical forms and case documents with no consistent way to search for a specific one later, and no record of where a document had been or who had handled it.

The Solution

Batching was built to generate a batch number for every document at intake, purpose-built so staff could search for any document quickly and so every movement it made afterward left a traceable record.

  • Batch-number generation & search at intake
  • Inter-department movement logging with full audit trail
  • Shelf/rack storage assignment & lookup
  • Scheduled disposal workflow with division-head approval routing
  • Role-based access centrally administered from Admin
Sijil Digital · Certification

eSijil (Digital Certificate System)

The Problem

After every course or programme, staff had to manually process, sort and hand out a certificate to every participant — slow, repetitive work for the team running the programme.

The Solution

eSijil lets a participant look up and download their own certificate self-service, by IC number and programme name, generated in the exact field format the civil service's HRMIS system requires so it can be uploaded straight in without reformatting. Public lookup is protected by Cloudflare Turnstile.

What Came Next

Certificate completion now syncs in real time with the training-hours compliance tracking inside Admin, so a staff member's annual training-hour total is one consistent number instead of two separately-maintained ones.

  • Self-service certificate lookup & download
  • HRMIS-compliant certificate format, ready for direct upload
  • Cloudflare Turnstile protection on public lookup forms
  • Real-time sync with training-hour compliance tracking in Admin
Pengurusan Bencana · Disaster Coordination

Banjir (Disaster Coordination System)

The Problem

During a flood or other disaster — a recurring risk for Pahang specifically — the department needed a fast way to coordinate aid and volunteers instead of relying on ad hoc calls and messages.

The Solution

Banjir coordinates disaster reports, aid and volunteer registration in one place, so the department's response can be faster, more accurate and better coordinated in an emergency.

What Came Next

Banjir shares the same core database as the other eight systems, so a disaster report filed here is visible across the ecosystem immediately, rather than sitting in a system of its own.

  • Disaster report logging & coordination
  • Volunteer (sukarelawan) registration
  • Rapid aid coordination during active flood/disaster events
  • Role-based access centrally administered from Admin
Keselamatan Jalan Raya · Road Safety Outreach

Helmet (Free Helmet Exchange Programme)

The Problem

A free public helmet-distribution programme requires real-time quota and stock control across the entire state to prevent duplicate claims by the same individual, together with a transparent, auditable trail to account for the use of public funds.

The Solution

Helmet controls quota and stock in real time across the whole state, blocks double-claiming, and keeps a transparent, auditable distribution record, including automated interstate stock transfers.

What Came Next

Registrations from the Advokasi programme now flow directly into Helmet's quota and stock records in real time, eliminating duplicate data entry between the two systems.

  • Real-time statewide quota & stock control
  • Double-claiming prevention
  • Auditable distribution statistics for public-fund accountability
  • Automated interstate stock transfer & reorder records
  • Direct integration with Advokasi registrations
Advokasi & UKJRK · Road Safety Advocacy

Advokasi (Road Safety Advocacy Programme)

The Problem

Road-safety awareness programmes needed a digital way to register participants and measure whether the programme was actually having an impact, for the department's own KPI reporting.

The Solution

Advokasi handles digital participant registration by QR code, and automatically collects feedback and impact statistics for KPI reporting.

What Came Next

Advokasi is now integrated directly with Helmet's stock and quota system, so a participant registering for a programme that includes a helmet giveaway is not required to register separately for both.

  • QR-code digital participant registration
  • Automatic feedback collection
  • Impact statistics for departmental KPI reporting
  • Direct integration with Helmet stock/quota
Akses Awam · Public Access

Kehadiran (Course Attendance Registration)

The Problem

Courses and activities open to the public needed digital attendance tracking — but Admin and Batching are deliberately locked to the department's intranet, and public traffic couldn't be allowed to cross that boundary.

The Solution

Kehadiran is hosted as its own public-facing system specifically so it can carry QR-code attendance check-in without ever touching the intranet-only policy protecting Admin and Batching. A digital course-evaluation form activates automatically 30 minutes before a session ends, with questions pulled dynamically from a central bank formatted to the national Road Transport Academy's standard.

What Came Next

Attendance now auto-confirms the moment a participant submits the evaluation, and their certificate becomes available immediately through eSijil, without requiring manual processing by a programme coordinator.

  • QR-code digital attendance check-in, hosted apart from intranet-only systems
  • Digital course evaluation, auto-activated near session end
  • Centrally-managed, standards-formatted question bank
  • Auto-confirmed attendance tied directly to eSijil certificate issuance

An Unplanned, Comprehensive Architecture

None of these nine systems were built as part of one master plan — each solved one division's own tactical problem, on its own timeline, starting with a basic staff database in 2020. But every one of them ended up capturing structured data as a side effect of doing its job: queue and case records from Dakwa, standardized enforcement reports from eLapor, staff and disciplinary records from Admin, document movement trails from Batching, certificate records from eSijil, disaster response logs from Banjir, distribution records from Helmet, participation data from Advokasi, and attendance records from Kehadiran.

Put together, that wasn't nine separate data sets — it was one comprehensive picture of the department's operations. Compiled into statistics, performance evaluation, and forward-looking projections and forecasts, that data is interrelated in a way that can inform how senior management sees the organization's overall performance and sets its direction: where enforcement resources are falling short, how the Prosecution Division's court load is trending, and where the department should be investing next — none of which was visible when each system's data stayed siloed inside its own division.

Outcomes & Impact

Single Identity
One login and one access-control matrix across enforcement, prosecution, administration, records and five public-facing programmes — instead of nine separate account systems.
Faster Access Changes
Granting or revoking a staff member's access across the whole ecosystem is now a change made in one place, not nine.
Centralized Governance
Every application's access is granted explicitly through Admin's central access control, not by copying credentials between systems.
A Foundation to Build On
The shared core is the foundation the department can now build deeper cross-system automation on top of, without re-touching every application's login system.

My Role & Technology

I conceived, researched and built this entire ecosystem from nothing. Before writing a single line of code for any of these nine systems, I carried out direct field observation of how each division actually operated, and conducted structured consultation with the prospective users across the department — the officers, counter staff and programme coordinators who would use each system day to day — to validate the underlying problem and workflow before designing a solution around it. From there, I owned the full stack end to end: the business process and SOP design, the database and application architecture, the shared core and central identity layer, the user-facing application for every one of the nine systems, and the security architecture that protects it — AES-256-GCM encryption, isolated and layered key management, PDO-based SQL injection prevention, and state-scoped RBAC. The ecosystem has been in continuous operation since its first module went live in 2020, and is now being migrated onto the department's own official government domain, moving off third-party commercial hosting entirely.

PHPPDO / MySQLCross-Database SSOREST API IntegrationAES-256-GCM EncryptionQR Code ScanningBootstrapJavaScript / AJAXGitHub Actions CI/CDcPanel Deployment