Rukon
HR Project Overview
Web Apps / Software NDA-Safe Overview Case Study Ready
RPOMS AI

RPOMS AI

RPOMS AI: router cosmetic inspection where the AI observes and rules decide

Core Value Proposition

Turns a client's photo-based cosmetic criteria into a traceable inspection decision, with an AI that observes and never decides.

An AI-assisted visual inspection system for refurbished routers, built for the same ERTH × Maxis programme as RPOMS but kept fully separate from it. A photo of a router casing passes a quality gate, a self-hosted vision model (Qwen2.5-VL 7B on Ollama) reports only what it sees, and a versioned, deterministic rule engine applies the programme's written cosmetic criteria to answer Acceptable, Not acceptable or Unclear. A qualification gate stops it issuing any verdict it has not proved on the reference set. Next.js 16 and PostgreSQL on Supabase, 247 automated tests. The public checker is deployed; no model is active in production yet, and it has not been used on real line photos.

Role
Sole Developer

Architecture, Vision Pipeline, Rule Engine, Evaluation, Self-hosted Inference & Deployment

Context / Client
Blue Bee Technologies × ERTH × Maxis programme (Cyberjaya, Malaysia)
Timeline / Period
September 2026 (deployed; model not yet active)
Category
Web Apps / Software

Key Highlights & Practical Impact

Executive Scan
  • Vision model output has no verdict field: it reports kind, count, extent and visibility, and a pure, versioned rule engine decides
  • Qualification gate: a model may only issue the verdicts it proved on the thirteen reference photos, and everything else is Unclear
  • Quality gate rejects blurred, dark, over-exposed, glare-filled or off-frame photos before any model is called
  • Free, self-hosted inference: Ollama behind a token-checked gateway and a tunnel, reached from a Vercel deployment
  • Evaluated honestly: under the gate, 2 correct and 0 wrong verdicts on the references, with the other 11 left Unclear
  • 247 automated tests with Vitest and in-process PostgreSQL (PGlite)
Technologies Used
Next.js 16React 19TypeScriptPostgreSQLSupabaseOllamaQwen2.5-VLZodVitest
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

Production Broke and Nothing Had Changed: A Paused Free-Tier Database

Admin sign-in returned 503 and nothing was being saved, with no deploy and no config change. One credential-free request that tells a database outage from wrong credentials.

What Moving Self-Hosted Inference to a Server Will and Won't Fix

A migration plan, not a result: why moving RPOMS AI's model from a laptop to a dedicated server would improve availability but not accuracy, and the gates it must pass first.

Vercel or a Self-Hosted Ubuntu Box? How I Chose Hosting App by App

Eight deployed apps, three hosting shapes: Vercel for pages and serverless APIs, a self-hosted Ubuntu box for a stateful API, and a hybrid for a model Vercel can't run.

Two Ways I Use Supabase Row Level Security: Deny-All Behind a Server, or Per-Owner Policies

Across five projects, RLS does one of two jobs: close the Data API while a trusted server does the work, or let Postgres enforce who owns each row. When to pick which.

Testing Without Paid APIs or Hardware, and the Places Fakes Lied

Fake LLM providers, a simulated label printer and an in-process Postgres keep my test suites free and offline. What each proved, and three places a fake fell short.

Storing Uploaded Photos in Postgres bytea, Served Only to Admins

Why RPOMS AI keeps inspection photos in a PostgreSQL bytea column instead of a bucket, how they are served only through an admin-guarded route, and when this stops being a good idea.

Shadow-Testing a Replacement Model With Next.js after(), Without the User Waiting

How RPOMS AI is built to run a candidate model on real requests after the response is sent, record whether it agreed, and never show it. The lifecycle around it, and its limits.

Baseline Security Headers in Next.js, and Why the CSP Waited

Adding five response headers to a Next.js site that served none, why the Content-Security-Policy was deliberately deferred, and a nonce-free CSP on another app.

Running Qwen2.5-VL 7B on an Intel Iris Xe With Ollama and Vulkan: 119 s to 41 s

Setting up a 7B vision model on a Windows laptop with no discrete GPU: enabling the Iris Xe under Ollama, where the time actually goes, and what the GPU profile showed.

Rate Limiting a Public Endpoint on Serverless, Keyed by an HMAC of the Address

Two layers for an anonymous upload endpoint on Vercel: an honest in-memory burst limiter, and a durable hourly count in Postgres keyed by an HMAC so the address is never stored.

A Qualification Gate: Computing What a Model Is Allowed to Decide From Its Own Results

Instead of trusting a model or not, RPOMS AI computes per verdict and per criterion what the model has earned the right to say, from a reference run. The policy, the code and the trade-off.

Two Windows Bugs in a Node Launcher: "C:\Program" and a PATH That Hadn't Updated

A one-command launcher for Ollama, a gateway and cloudflared broke on Windows twice: shell: true split the node path at its space, and a fresh install was not on the open terminal's PATH.

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.

Reference Data Nobody Can Edit: Postgres Triggers, Hash Pinning and Append-Only History

Protecting the examples an AI system is measured against: a trigger that refuses UPDATE and DELETE, SHA-256 hashes checked by tests, append-only history, and what these do not stop.

Hardening a Public Photo Upload: Magic Bytes, Header Dimensions and Stripping EXIF Twice

An anonymous endpoint that decodes images is easy to abuse. How RPOMS AI re-encodes photos in the browser, trusts none of it on the server, and never stores the uploaded bytes.

"Unclear" Is Not One Answer: Five Decision States for an AI Inspection

An AI check that cannot decide can fail for four very different reasons. How RPOMS AI records which one, maps it to what the public sees, and makes a missing mapping a type error.

Exposing a Local Ollama to a Vercel App: A 90-Line Token Gateway and a Cloudflare Quick Tunnel

Ollama has no authentication, so its port must never face the internet. The small Node gateway RPOMS AI puts in front of it, the tunnel, and how each hop is diagnosed.

Evaluating a Vision Model When You Only Have Thirteen Examples

Thirteen labelled photos are not a test set, but they can still be an honest evaluation. Separating what is known from what is assumed, removing leaked annotations, and controls built on purpose.

Enforcing Architecture Boundaries in a Next.js App With One Test File

A Vitest file that reads the source tree and fails when a client component imports server code, an admin route skips its auth guard, or a minifier hazard creeps back in.

Encoding Vague Acceptance Criteria Without Inventing Thresholds

Criteria that said long, multiple and small with no numbers: how a pure rule engine applies vague words as categories, orders checks for safety and answers UNCLEAR.

Why Every Real Photo Timed Out: Capping Vision Input at 896 px to Fit a 60-Second Function

Full-size phone photos never got an answer from RPOMS AI's vision model. Encoding cost grew faster than pixel count; capping at the evaluated scale took 114 s down to 38 s.

The 21-Second Benchmark That Was Wrong: Ollama Reuses an Encoded Image

A vision-model latency figure that was half the real cost, because the benchmark sent the same image twice. How it was caught, corrected, and what a fair benchmark needs.

A Photo Quality Gate That Runs Before the Vision Model: Blur, Exposure and Glare From Raw Pixels

How RPOMS AI rejects blurred, dark, over-exposed and glare-filled photos with plain pixel arithmetic before any model is called, and how the thresholds were calibrated.

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".