Rukon
HR Project Overview
Systems / ERP / WMS NDA-Safe Overview Case Study Ready
RPOMS wordmarkRPOMS wordmark

RPOMS

Router Production Operations Management System

Core Value Proposition

One system for a live router-refurbishment line: the day's production entered once, stock that follows from it, and every router traceable by serial from acceptance to delivery.

The operations system that replaced the spreadsheets running a router-refurbishment line: a daily production report that deducts stock as it saves, serial-level tracking from acceptance into numbered boxes and out on deliveries, delivery paperwork generated from the office's own template, workforce output, and a stock-request portal for the Ecommerce team. Designed, built, deployed and maintained by me alone as a Next.js, TypeScript and PostgreSQL (Supabase) application: about 61,400 lines of TypeScript, 16 pages, 41 API route files and 1,637 automated tests.

The RPOMS dashboard: accepted, retired, cleaned and packaged today with the change from yesterday, batch progress at 92 percent, and each worker's output against a per-person target.
The dashboard, running locally on synthetic demo data. Every name and figure is fictional.
Role
IT Systems & Operations Lead

IT Systems Architecture, Full-Stack Engineering, Production Line Operations & Deployment

Context / Client
Blue Bee Technologies × ERTH × Maxis programme (Cyberjaya, Malaysia)
Timeline / Period
July 2026 – present
Category
Systems / ERP / WMS

Key Highlights & Practical Impact

Executive Scan
  • Replaced manual spreadsheets with one unified operational platform covering stock intake, technical acceptance, box packing, delivery, and daily reporting
  • Stock of routers, chargers, LAN cables, and boxes derived deterministically from the daily report ledger, never hand-edited
  • Serial-level traceability from acceptance barcode scan to numbered box, delivery dispatch, and automated Delivery Order documentation
  • October 2026 releases: multi-box delivery batching (PR #6) and paginated inventory history (PR #4) on 12 October; the Refining and Printing workstation, Google sign-in with per-service access and Registry hardening for 250,000 routers on 20 October
  • Incident response to connection-pool exhaustion (INC-2026-10-11-01): recovered in 15 minutes with zero operational data loss across 382 routers
  • Dashboard with comparisons and trends in English and Arabic (RTL), supporting light and dark themes
  • Four roles, signed sessions, a production write lock, and a guard preventing preview deployments from mutating live data
  • 958 automated tests, including real SQL against in-process PostgreSQL (PGlite), run in CI on every push
Technologies Used
Next.js 15React 19TypeScriptPostgreSQLSupabaseTailwind CSS v4ZodVitestPGlite
LEVEL 2 — DEEP TECHNICAL PROOF

Ready to explore the build?

A detailed look at the end-to-end architecture, process workflows, key engineering decisions, live production capabilities, challenges, and results.

This system is proprietary commercial software. Information presented here is scoped for public review without disclosing internal credentials or customer records.

Writing from this work

Google Sign-In Without a Client Library: Server-Side PKCE and Grants Read on Every Request

RPOMS added Google sign-in through its Supabase project's provider with no client library in the browser bundle. Google proves who someone is and grants nothing; a Super Admin grants access per service and capability, and revocation takes effect on the next request.

Sorting on the Column the Index Serves: 160 ms to Under 1 ms at 250,000 Routers

The RPOMS Registry page sorted on a text copy of the timestamp it selected, so the index on the real column was never used. Measured on an isolated 250,000-row copy, the fix is one ORDER BY and a read deadline that keeps the page honest when a query is slow anyway.

One Live Record per Router per Session: Partial Unique Indexes Instead of Per-Scan Locks

A barcode scanner can fire the same serial twice in a few milliseconds, and two workstations can scan the same router at once. RPOMS's Refining workstation catches both with one partial unique index, and decides whether to print from what the save recorded.

Refusing Runtime DDL on Production: Schema Stamps, a Gate, and Schema-Only Migrations

RPOMS used to build its own tables on a cold start. On a shared production database that is a race and a risk, so the application now refuses to alter production schema, and a release ships as ordered, schema-only migration files with rollback blocks.

Sending Labels From One Web App to Another Tab: BroadcastChannel, COOP and window.opener

How RPOMS sends a router label to the Print Engine tab that holds the Bluetooth printer: why a hidden iframe could never work across sites, why one header had to be removed from one path, and what a lost answer must say.

Connection-Pool Exhaustion Under Serverless Scale: Investigating Supavisor and Vercel in Production

A postmortem of production incident INC-2026-10-11-01: why Vercel serverless functions saturated Supavisor transaction pool connections during a warehouse shift change while CPU was under 5%, and how we recovered with zero data loss.

Theme-Specific Logos Without a Flash: Let CSS Pick, Not useTheme()

A logo with an opaque white background became a white block on the dark theme. Swapping it in CSS on data-theme, not with useTheme(), fixed it on the first frame.

Testing Real PostgreSQL SQL in Vitest With PGlite and the Real Driver

No Postgres server, no Docker, and production off limits. PGlite behind a loopback socket let the real postgres.js driver run real SQL in Vitest and in CI.

The Test That Calls Every Next.js API Route With No Session

Five API reads in RPOMS typechecked and linted cleanly and were open to anyone. They were found by probing the built app, and now one test globs every route.ts and expects a refusal.

Backing Up a Database on a Plan With No Backups, and a One-Way Staging Refresh

The procedure and scripts I designed for a production Supabase database on the Free plan: a read-only JSON export, a restore that only targets staging, and an anonymising refresh.

Stopping Vercel Preview Deployments From Touching the Production Database

Every preview of RPOMS carried the production connection string. A guard in code now refuses the pairing, answers 503 with the reason, and can be checked from outside.

A Stock Request Portal With a State Machine and an Event Log

The lifecycle behind the RPOMS Ecommerce portal: a transition table, terminal states, a void that reverses, version-checked edits and an event per step.

Out-of-Order Responses on Filter Changes: Only the Newest Request May Write

Filters that apply on change put several fetches in flight, and the slow broad one often lands last. A ticket per request in a React ref keeps the screen answering the current question.

Detecting a Device Model From Its Serial Number With Prefix Rules

How RPOMS and its print engine tell a router's model from its serial: prefix and length rules stored as data, longest prefix first, unknowns flagged.

Schema Setup on Cold Start: One Statement, One Winner, and a Building Sentinel

Serverless instances that create tables on first use race each other and hold exclusive locks. How RPOMS claims the schema build with one SQL statement, and the bug in the first version.

Adding Arabic (RTL) to a Next.js Dashboard Without Translating the Whole App

Publishing the RPOMS dashboard in Arabic: a typed dictionary that fails the build, dir on one wrapper not <html>, an LTR chart, and Latin digits.

Working Through a 44-Finding Code Audit, Six of Them P0, Without Losing Data

How I worked through a forensic audit of a live operations system: the four root causes behind 44 findings, a second pass that caught my own regressions, and what I chose not to change.

Promise.race Timeouts Don't Cancel Queries, and That Emptied My Connection Pool

A read deadline built on Promise.race walks away from a query that keeps running and keeps its pooled connection. How that fed on itself on Vercel, and the bounds that fixed it.

A Production Write Lock That Fails Safe: Only Named Modules May Write

How RPOMS keeps finished modules from writing in production until sign-off: a middleware lock that is on by default in production and an allowlist matched by path segment.

postgres.js Dropped the Microseconds From My timestamptz Parameter

A revision check refused every save because a bound timestamptz went through a JavaScript Date and lost its microseconds. One extra ::text cast fixed it.

postgres.js Stored My JSON Arrays as Strings in a jsonb Column

Writing JSON.stringify(x)::jsonb through postgres.js encodes the value twice, so a jsonb column holds a string, not an array. The symptom, the sql.json() fix, and handling rows already stored.

Bulk Inserts Past PostgreSQL's 65,535 Bind-Parameter Limit: unnest and Chunks

A multi-row VALUES insert with six parameters per row failed outright above 10,922 rows. Replacing it with unnest over array parameters, chunked, and why the import is not one transaction.

Preview and Commit From the Same Plan: Stock Transfers You Can Reverse Exactly

In RPOMS one pure function plans a stock transfer: the preview shows it, the commit re-runs it, and a void inverts the frozen executed plan exactly.

An Error Boundary That Retried Into the Outage: Backoff With Jitter

A Next.js error.tsx that retries on its own is right for a wall display, and wrong if every open screen retries in lockstep. Longer waits, jitter and a slow interval that never stops.

Why My App No Longer Creates Indexes When It Deploys

A plain CREATE INDEX in a cold-start schema build locks a busy table as a side effect of shipping code. Moving indexes to CONCURRENTLY migrations, and what the app still does.

Implemented, Available, Not Connected: Writing Honest Status Into Project Docs

"It exists in the repository" and "it runs in production" are different claims. The three-state status model I use across my projects, with real rows from each.

From a Constant Per-Role Cookie to HMAC-Signed, Expiring Sessions

RPOMS's session cookie was the same bytes for every admin, forever. Replacing it with a signed payload carrying issue time and session id, plus a login throttle that needs no Redis.

Monthly Request Numbers That Never Skip: Counters, Voids and Retries in PostgreSQL

How RPOMS issues monthly request numbers with no gaps: a locked counter row, number and row in one transaction, voids given back, retries made safe.

Configuration Health You Compute, Not Store: One Model Record Across Three Modules

How RPOMS merged three definitions of a router model into one record, and flags broken configuration with a pure function instead of an issue table.

Designing a Delivery Module: Scan Boxes, Never Type Serials, Freeze What Left

How the RPOMS delivery module works: scanned boxes instead of typed serials, a load that must match its quantity, and a snapshot of what actually left.

Proving a Release Deleted Nothing: Row-Count Gates and a Whole-Database Preservation Test

How RPOMS checks that a release or migration lost no business data: a row-count gate that fails on any decrease, read-only scripts, and a test that compares every row of every table.

CSV Formula Injection in Exports: The One-Apostrophe Fix

A name typed as =HYPERLINK(...) runs when someone opens a CSV export in a spreadsheet. The small cell guard RPOMS uses on both client and server exports, and what it leaves alone.

When Two Days Fill One Box: Counting Shared Consumables Without Double-Counting

A packaging box filled across two days must be charged once. How RPOMS derives each day's big-box usage from a running total, and how the rule evolved.

Yesterday Is Not Enough: Choosing Comparison Baselines for an Operations Dashboard

The five baselines the RPOMS dashboard compares today against, how each is computed, why one rising metric is red, and why missing data shows N/A.

Blank Is Not Zero: Small Input Decisions That Decide Whether a Report Is Right

Three bugs from RPOMS's daily report: a target of 0 read as unset, a running output collapsed into one number, and one worker split by capitalisation.

Building a Web Screen Around a Barcode Scanner: Enter Keys, Excel Pastes and a Beep That Froze the Page

How RPOMS's scan screens handle a barcode scanner: Enter-terminated scans, pasted Excel columns, one batched lookup, and a beep that no longer blocks.

An Append-Only Audit Log That Keeps What Was Deleted

RPOMS's audit log records who acted, from the signed session, and a snapshot of what each destructive action removed, which turns irreversible deletes into recoverable ones.

When the Supabase Session Pooler Ran Out: An EMAXCONNSESSION Postmortem

Admin pages on a Next.js app on Vercel showed a generic error for about six minutes. The cause was Supabase's session-mode pooler hitting its 15-client limit, not the code.

Optimistic Concurrency for a Postgres Upsert, Using the Row's Own updated_at

Two admins saving the same day meant the second silently replaced the first. One guarded INSERT ... ON CONFLICT statement and a 409 fixed it, and two bugs followed.

Filling a Word Template in Node.js When Word Splits Your Placeholders

How RPOMS fills the office's own Delivery Order .docx with JSZip: placeholders split across Word runs, a two-pass replace, and an Excel tracker beside it.

Stock You Never Store: Deriving Inventory From a Ledger and the Day's Report

Why RPOMS never stores a stock balance: remaining is worked out at read time from a ledger and the daily report, so edits need no reversal and a figure can be traced.

Building Software in Cyberjaya: The Development Environment Behind the Work

What a production operations system, a client website, an AI research assistant and a vision inspector actually get built on, from a laptop in Cyberjaya: the machine, the stack, where things are hosted, and the local details that shaped the code.

A Vision Model That Only Observes: Building RPOMS AI Without Letting the Model Decide

A router surface inspector where the vision model reports what it sees and a deterministic rule engine decides. Why the split, what a 7B open model actually scored, the blank-image control that changed the prompt, and a safety gate that turns most answers into "check manually".

Printing Labels From the Browser Over Web Bluetooth: The RPOMS Print Engine

A scan-to-label workflow that drives a NIIMBOT B1 Pro directly from Chrome, with no vendor app and no backend. What the protocol work looked like, how 116 tests run without a printer, and what the first real print taught.

The Business Day Is Not the Server Day: Time Zones in a Malaysian Operations System

A deployed server keeps UTC. A warehouse floor in Malaysia keeps UTC+8. Until eight in the morning, the two disagree about what day it is, which is long enough for a morning delivery to file itself under yesterday.

Staged CSV Import: Validating Operational Data Before It Is Written

The office already keeps its records in a workbook. Importing that sheet into a production system means matching its headers loosely, reading its dates the way it wrote them, surfacing duplicates before anything is saved, and never letting the client tell the server what a file contains.

One Storage Interface, Three Backends: How RPOMS Picks Its Database

PostgreSQL on Vercel, MySQL on cPanel, or a folder of JSON files on a laptop, chosen by which environment variables exist. What that bought, what it cost, and the production lessons about pooled connections and reads that never came back.

Reporting From Operational Data

What makes operational reporting actually useful for decisions, instead of just being a record of what happened.

Why Internal Software Needs Good UX

Internal tools get less design attention than public products, even though the people using them have no choice but to use them.

Replacing Repetitive Manual Work With Software

How to tell whether a repetitive manual task is actually worth automating, and what to check before building anything.

Why System Maintenance Matters After Deployment

Shipping an operational system is the start of the work, not the end. What ongoing maintenance actually involves.

Why Software Developers Should Understand the Physical Process

Building software for a real operation goes better when the developer understands the physical process it supports, not just the data model.

From Manual Workflow to Digital Workflow

What actually changes when a manual, paper-or-spreadsheet process becomes software, and what shouldn't change.

How Admin Panels Help Manage Operational Data

What a well-designed admin panel actually needs to do for a production or operations system, beyond CRUD screens.

Common Problems in Manual Production Tracking With Spreadsheets

The specific ways spreadsheet-based production tracking breaks down in practice, the tell that says it is time to move, and what a replacement has to remove.

What Is a Production Management System?

A plain explanation of what production management software actually does, and why it's a different problem from a generic business app.