Rukon
Blog · Page 4 of 5

Notes from building real systems.

Notes on production and operations systems, full-stack development, AI applications and web development, written from real project work in Cyberjaya rather than from tutorials.

  1. Full-Stack Development

    Contact Form Spam Protection Without a CAPTCHA, and Its Honest Limits

    A honeypot, a minimum fill time, a same-site check, strict validation and a database-backed rate limit on a Next.js contact form. What each layer stops, and which ones a script can walk past.

    4 min read

  2. Building Real Systems

    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.

    4 min read

  3. Full-Stack Development

    Chrome Throttled My Bluetooth Printer: Moving Timers Into a Web Worker

    Labels slowed from about 4 seconds to 13 or more whenever the print tab was in the background. The cause was Chrome's timer throttling; the fix was a tiny Web Worker that owns the waits.

    4 min read

  4. AI & Automation

    Choosing an Embedding Model Under pgvector's 2,000-Dimension Index Limit

    A decision record: how ResearchForge picked an embedding model and dimension around pgvector's index limit, cost and reversibility. The choice was made and wired up; no embedding was ever produced.

    3 min read

  5. AI & Automation

    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.

    4 min read

  6. Full-Stack Development

    Canonicals That Pointed at a Redirect: www vs Apex, Sitemaps and Permanent Redirects in Next.js

    Every canonical, og:url and sitemap entry on this site named a URL that 308-redirected. The fix, plus the sitemap, feed and redirect decisions made around it in Next.js.

    5 min read

  7. Full-Stack Development

    Calling Supabase's PostgREST Directly From FastAPI: The Details a Mock Won't Tell You

    A Python backend talking to Supabase's PostgREST over plain httpx. Embedded ordering, counts in headers, deletes that return 200, reserved characters, and what mock tests can and cannot prove.

    4 min read

  8. AI & Automation

    Caching LLM Analyses by Content Hash Without Recording Who Uploaded What

    A shared cache for expensive LLM analyses, keyed by a hash of the extracted text. How the key is chosen, what is never cached, and why the cache table has no user column.

    5 min read

  9. UI/UX & Product

    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.

    5 min read

  10. AI & Automation

    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.

    3 min read

  11. Building Real Systems

    A Performance Gate That Stopped Crying Wolf: Medians and a Noise Floor

    A baseline-versus-current benchmark flagged regressions on identical code. Medians of three runs and a rule that ignores tiny metrics made it a gate worth trusting.

    4 min read

  12. Full-Stack Development

    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.

    5 min read

  13. Building Real Systems

    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.

    4 min read

  14. AI & Automation

    Structured Receipt Extraction With Apple's Foundation Models and @Generable: A Code Walkthrough

    How DriveKeep's iOS code asks Apple's on-device Foundation Models for typed receipt fields and fuses them with Vision OCR. A walkthrough of unverified code.

    5 min read

  15. Full-Stack Development

    An Append-Only Cloud Backup for a Local-First iOS App

    SpenDrop's optional cloud backup never overwrites: per-user Storage folders, no UPDATE policies, a content hash, and a restore that copies local data first.

    5 min read

  16. Full-Stack Development

    The SwiftData Store I Configured Was Never the One Being Used

    Renaming an iOS app opened an empty database. The App Group store URL I had configured had never worked; SwiftData's fallback had been doing the job.

    4 min read

  17. Full-Stack Development

    Keeping Analytics for 90 Days: Roll Up, Then Delete, With pg_cron

    Detailed analytics events kept for a set period, then summarised into daily totals and deleted by a scheduled PostgreSQL function. The retention setting, the job, and the time-zone trade-offs.

    4 min read

  18. Full-Stack Development

    Adding Label Printing to an Existing Next.js App Without Touching the Printer

    The calling side of a print integration: validating SKUs the way the printer app will, passing them in a URL fragment, detecting blocked pop-ups, and refusing to print unsaved changes.

    5 min read

  19. Building Real Systems

    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.

    6 min read

  20. Full-Stack Development

    From Millimetres to Dots: Rasterising a 50×30 mm Label for a 576-Dot Printhead

    How a label template in millimetres becomes a 1-bit raster for a 300 dpi thermal printhead: geometry, thresholding, whole-dot barcodes and why some designs cost more Bluetooth packets.

    6 min read

  21. AI & Automation

    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.

    6 min read

  22. Full-Stack Development

    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.

    5 min read

  23. Full-Stack Development

    One Person, Referenced Everywhere: A JSON-LD @graph for a Personal Site

    How this site declares its Person and WebSite nodes once and points every article, project page and the homepage at them by @id, and what that forced me to leave out.

    5 min read

  24. Full-Stack Development

    The NIIMBOT B1 Pro Bluetooth Protocol, Packet by Packet

    The frame format, checksum, connect packet, identification reads and the full V4 print sequence I use to drive a NIIMBOT B1 Pro over Web Bluetooth, with what is verified and what is not.

    9 min read

  25. Building Real Systems

    Logging Every Status Change in Excel With VBA to Measure Time per Department

    Formula-driven status changes don't fire Worksheet_Change. How a stock tracker logged them with Worksheet_Calculate, timed each stage, and read the log back with SUMIFS and LOOKUP(2,1/…).

    6 min read

  26. AI & Automation

    Which RM Is the Payment? Classifying Every Amount on a Receipt Screenshot

    A payment screenshot shows fees, balances and advert prices as well as the payment. How SpenDrop labels every RM value, using keywords and screen position.

    6 min read

  27. Building Real Systems

    Generating Barcode and Group SKUs in Excel From Spec Columns

    How an Excel stock tracker built a per-brand serial that rolls past 99, a barcode SKU and a variant group key from spec columns with LET and TEXTJOIN, and where formula IDs break.

    6 min read

  28. Full-Stack Development

    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.

    6 min read

  29. Full-Stack Development

    Running FastAPI and Next.js as Two Services Behind One Vercel Origin

    One Vercel project, a Next.js frontend and a FastAPI backend on the same origin. The routing, the CORS outage it fixed, the image optimizer that vanished, and the Python packaging details.

    5 min read

  30. Building Real Systems

    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.

    5 min read

  31. Malaysia & Cyberjaya

    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.

    6 min read

  32. AI & Automation

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

    7 min read

  33. Full-Stack Development

    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.

    6 min read

  34. Malaysia & Cyberjaya

    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.

    4 min read

  35. Building Real Systems

    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.

    5 min read

  36. Building Real Systems

    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.

    6 min read

  37. Full-Stack Development

    Gating a CV Download Behind a Server-Signed Grant in Next.js

    A public portfolio, a CV with a phone number in it, and a public repository. How this site releases three contact fields and one PDF only after a form, without a database and without trusting the browser.

    4 min read

  38. Full-Stack Development

    A Live GitHub Contribution Heatmap in Next.js, Without a Token in the Browser

    How this site's homepage renders real GitHub contribution data: a server-fetched calendar cached for an hour, a documented API with an undocumented fallback, and one small client island for the tooltip.

    5 min read

  39. Full-Stack Development

    Every Policy Was Correct, and Every Policy Was Inert

    A data-isolation defect that passed the entire test suite, shipped, and behaved perfectly. What it took to find it, and why the fix was to stop asking the application to be careful.

    4 min read

  40. AI & Automation

    When Not to Fall Back to Another AI Provider

    Automatic failover between model vendors is easy to build and easy to build wrong. Most errors should never trigger it.

    3 min read

Also available as an RSS feed.