<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pang Jun Han</title>
    <description>The latest articles on DEV Community by Pang Jun Han (@junhanpang).</description>
    <link>https://dev.to/junhanpang</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4137539%2F9cc8074a-a231-40fb-bd5b-d2cf8332b7ad.jpg</url>
      <title>DEV Community: Pang Jun Han</title>
      <link>https://dev.to/junhanpang</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/junhanpang"/>
    <language>en</language>
    <item>
      <title>Why my AI is read-only: designing automation that staff trust</title>
      <dc:creator>Pang Jun Han</dc:creator>
      <pubDate>Mon, 23 Nov 2026 10:23:44 +0000</pubDate>
      <link>https://dev.to/junhanpang/why-my-ai-is-read-only-designing-automation-that-staff-trust-53lp</link>
      <guid>https://dev.to/junhanpang/why-my-ai-is-read-only-designing-automation-that-staff-trust-53lp</guid>
      <description>&lt;p&gt;Whenever I show an office manager what AI can do with their paperwork, the first question is the same: "What if it gets it wrong?"&lt;/p&gt;

&lt;p&gt;It's the right question. A tool that's right 95% of the time but quietly wrong the other 5% is worse than no tool, because nobody knows which 5% to check. So every system I build follows the same six rules. They come from two real setups: the AI back office at the piling and foundation contractor where I work, and a procurement system for an electrical and ELV contractor in Penang.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Read, don't write
&lt;/h2&gt;

&lt;p&gt;The AI reads the accounting system. It never posts to it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Accounting access is read-only. The AI never signs in to it or types a password.&lt;/li&gt;
&lt;li&gt;Where an assistant does key in a purchase order, it stops before the end: it never clicks Approve on its own.&lt;/li&gt;
&lt;li&gt;Nothing gets deleted, and files are never overwritten. Every output is a new, versioned copy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the AI can't change the books, the worst it can do is produce a wrong report, and a person will catch that before anyone acts on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. A person approves every record
&lt;/h2&gt;

&lt;p&gt;The AI does the reading and matching. A person makes the decision.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every delivery order the AI reads is approved by a person before it counts.&lt;/li&gt;
&lt;li&gt;When the delivery order is approved, the system checks the PO balance again, so two part deliveries can never add up to more than was ordered.&lt;/li&gt;
&lt;li&gt;In the warehouse app, the AI reads delivery notes into an inbox, and a person checks each one against the paper before saving it. The AI never changes stock directly.&lt;/li&gt;
&lt;li&gt;In the bore log check app I'm testing now, the AI advises a pile length but engineers decide. No concrete goes in until every flag is cleared, the length is confirmed and the site engineer signs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Flag it, never guess
&lt;/h2&gt;

&lt;p&gt;If a field is unclear, the AI says so. It doesn't fill in its best guess.&lt;/p&gt;

&lt;p&gt;This matters more than it sounds. In one batch of 76 delivery order scans, the AI held back 8. Seven of them had already been keyed by staff months earlier, with a digit added or swapped in the DO number. A system that guessed would have keyed them again and created seven duplicates. A system that flags gave purchasing a short list to check.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Stop when the numbers don't add up
&lt;/h2&gt;

&lt;p&gt;Every scheduled job checks its own counts. If anything doesn't match, it stops and reports the problem instead of carrying on.&lt;/p&gt;

&lt;p&gt;Every Monday, a health check reports OK or PROBLEM for each scheduled task, so a job that has quietly stopped running gets noticed within a week.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Measure it on your own documents
&lt;/h2&gt;

&lt;p&gt;"The AI is accurate" means nothing until it's measured. On a hand-checked test set of 50 delivery order pages, the AI read the DO number correctly 98% of the time, and dates, PO numbers, items and units 100%. Every change to the system has to pass the same test again.&lt;/p&gt;

&lt;p&gt;Cost gets the same treatment. Every paid AI read gets a free check first and a fixed budget, so there are no surprise bills.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Keep sensitive data out
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;RM amounts and personal data are masked in apps and emails.&lt;/li&gt;
&lt;li&gt;Worker data is reported as counts only, never with personal details.&lt;/li&gt;
&lt;li&gt;Everything is logged: every report has an owner and a record of whether it was sent.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What the rules buy you
&lt;/h2&gt;

&lt;p&gt;Staff don't trust a black box, and they shouldn't. These rules turn the AI into something they can check: it shows its work, it asks when it's unsure, and it can't change anything without them.&lt;/p&gt;

&lt;p&gt;That's also when it starts catching real problems. In the Penang system, 34 of 40 delivery orders staff uploaded turned out to be already recorded or duplicates. Every one was stopped before anyone approved it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to start
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Pick one document type, usually delivery orders.&lt;/li&gt;
&lt;li&gt;Write down the rules first: what the AI may read, what it may never touch, and who approves.&lt;/li&gt;
&lt;li&gt;Run it alongside your current process for two weeks, and measure it on your own documents before switching over.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you want to see this on your own paperwork, the free DO check is a good start. Send me 10 recent DOs with their POs, and within 2 working days I'll show you, free, which ones don't match.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://pangjunhan.vercel.app/articles/read-only-ai-automation" rel="noopener noreferrer"&gt;pangjunhan.vercel.app&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>productivity</category>
      <category>construction</category>
    </item>
    <item>
      <title>How to automate PO and DO matching in a Malaysian construction company</title>
      <dc:creator>Pang Jun Han</dc:creator>
      <pubDate>Thu, 12 Nov 2026 06:15:25 +0000</pubDate>
      <link>https://dev.to/junhanpang/how-to-automate-po-and-do-matching-in-a-malaysian-construction-company-10gm</link>
      <guid>https://dev.to/junhanpang/how-to-automate-po-and-do-matching-in-a-malaysian-construction-company-10gm</guid>
      <description>&lt;p&gt;Every contractor I've worked with has the same problem. Signed delivery orders (DOs) pile up, someone has to match each one to the right purchase order (PO), key it into the project system, and file the paper. It's slow, it falls behind, and when it falls behind nobody knows what's actually been delivered.&lt;/p&gt;

&lt;p&gt;I've now automated PO/DO matching for two Malaysian contractors. Here's how it works, and the problems you'll hit that nobody warns you about.&lt;/p&gt;

&lt;h2&gt;
  
  
  The basic flow
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Scan.&lt;/strong&gt; Signed DOs are scanned into one shared folder, sorted by project. This is the only manual step, and it's one your document control team already does.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read.&lt;/strong&gt; AI reads each DO: supplier, DO number, date, items, quantities and units, including handwriting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Match.&lt;/strong&gt; Each DO line is matched to an open PO line: same project, same supplier, same item, quantity within what's left on the PO.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check before keying.&lt;/strong&gt; Before anything is entered, the DO is checked against what's already recorded, so nothing is keyed twice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key.&lt;/strong&gt; Matched DOs go into your system with the signed scan attached.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flag the rest.&lt;/strong&gt; Anything unclear goes on a short check list for purchasing. Nothing is guessed.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The problems nobody warns you about
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Staff typos in your existing records.&lt;/strong&gt; In one batch of 76 scans, the AI held back 8. Seven of them had already been keyed by staff months before, with a digit added or swapped in the DO number. A strict "same DO number" check would have created seven duplicates. You need a fuzzy match: same supplier, same date, same quantity, and a DO number that's one character off.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Suppliers print more than one number.&lt;/strong&gt; Many dockets have a DO number and a separate form serial or plant code. You have to tell the AI which one your system uses, supplier by supplier.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DOs with no PO.&lt;/strong&gt; Rentals, urgent purchases, items ordered by phone. These can't be matched and shouldn't be forced. They go to purchasing to raise or link a PO.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Closed or used-up POs.&lt;/strong&gt; A DO that arrives after a PO is fully delivered needs a person to decide, not the AI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unreadable fields.&lt;/strong&gt; A smudged quantity, a date covered by a stamp, a missing signature. The AI must flag these, not "best guess" them.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What it takes
&lt;/h2&gt;

&lt;p&gt;At one piling contractor, the system has read 1,300+ delivery orders and checked them against 18,000+ PO lines and 41,000+ existing records. Each morning, purchasing gets a short check list instead of a pile of paper, and document control gets a list of DOs that were logged but haven't been scanned yet.&lt;/p&gt;

&lt;p&gt;Building PO/DO matching is the biggest single workflow I do: usually 4–10 sessions (RM1,600–4,000), because it has to connect to your accounting or project system and handle your suppliers' quirks. It's also the one that saves the most time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to start
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Pick one project and one supplier type (concrete is a good start: high volume, consistent dockets).&lt;/li&gt;
&lt;li&gt;Get your document control team scanning into one folder.&lt;/li&gt;
&lt;li&gt;Run it for two weeks alongside your current process before switching over.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you want to know what PO/DO matching would look like for your company, the 30-minute task check is free, and you'll get a personalised automation plan.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Pang Jun Han: AI automation for Malaysian construction companies and SMEs. How PO/DO matching works and what it costs: &lt;a href="https://pangjunhan.vercel.app/automate-delivery-orders" rel="noopener noreferrer"&gt;https://pangjunhan.vercel.app/automate-delivery-orders&lt;/a&gt; · All services: &lt;a href="https://pangjunhan.vercel.app/ai-automation" rel="noopener noreferrer"&gt;https://pangjunhan.vercel.app/ai-automation&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>construction</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How much does AI automation cost for a Malaysian SME? Real numbers.</title>
      <dc:creator>Pang Jun Han</dc:creator>
      <pubDate>Tue, 27 Oct 2026 07:11:21 +0000</pubDate>
      <link>https://dev.to/junhanpang/how-much-does-ai-automation-cost-for-a-malaysian-sme-real-numbers-b70</link>
      <guid>https://dev.to/junhanpang/how-much-does-ai-automation-cost-for-a-malaysian-sme-real-numbers-b70</guid>
      <description>&lt;p&gt;"How much will it cost?" is the first question every business owner asks me about AI. Most answers online are either "it depends" or a big agency package. So here are my actual numbers, from setting up AI workflows for Malaysian contractors and SMEs.&lt;/p&gt;

&lt;h2&gt;
  
  
  First: there's no fixed package
&lt;/h2&gt;

&lt;p&gt;AI automation works best when you start with the one task that costs your team the most time. So I charge for time used, not a bundle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free task check (30 minutes):&lt;/strong&gt; you show me the paperwork that eats your week. I send a written scope.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI introduction and set-up:&lt;/strong&gt; RM600 per 4-hour session, usually once.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workflow build:&lt;/strong&gt; RM400 per 4-hour session, on-site or remote.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monthly support:&lt;/strong&gt; RM300 a month for fixes, small changes and a weekly check-in. Month to month, no minimum term.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Managed service:&lt;/strong&gt; RM1,000 a month, once automatic jobs are running every day.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What a process actually costs to build
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Simple&lt;/strong&gt; (staff claims, timesheets, letters and summaries): 1–2 sessions, RM400–800&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Medium&lt;/strong&gt; (WhatsApp site returns, stock lists, progress reports): 2–4 sessions, RM800–1,600&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Large&lt;/strong&gt; (delivery orders vs purchase orders, invoices vs DOs, linked to your accounting or project system): 4–10 sessions, RM1,600–4,000&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A typical first phase
&lt;/h2&gt;

&lt;p&gt;Here's an example (an example, not a package):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free task check: RM0&lt;/li&gt;
&lt;li&gt;AI introduction and set-up: RM600&lt;/li&gt;
&lt;li&gt;One main process, like matching DOs to POs (6 sessions): RM2,400&lt;/li&gt;
&lt;li&gt;One simple process, like staff claims (1 session): RM400&lt;/li&gt;
&lt;li&gt;First month of support: RM300&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Total: about RM3,700&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What it saves
&lt;/h2&gt;

&lt;p&gt;Two anonymous examples from real projects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An electrical and ELV contractor in Penang: about 1,160 hours a year of staff time saved, worth about RM26,000.&lt;/li&gt;
&lt;li&gt;A piling contractor: 1,300+ delivery orders read and 18,000+ purchase order lines matched by AI.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Costs people forget
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;AI tool subscriptions, if you need them, are billed by the AI provider directly: about US$20–25 per user per month.&lt;/li&gt;
&lt;li&gt;Your team's time to check what the AI flags. A good workflow keeps that list short, but it isn't zero.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to keep the cost down
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Start with one boring, repetitive document, not a company-wide "AI strategy".&lt;/li&gt;
&lt;li&gt;Pick the task that is done most often, not the most impressive one.&lt;/li&gt;
&lt;li&gt;Keep a person on the exceptions. AI that says "I'm not sure" is cheaper than AI that's quietly wrong.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you run a Malaysian SME or contractor and want to know what your first process would cost, the 30-minute task check is free.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Pang Jun Han: AI automation for Malaysian construction companies and SMEs. &lt;a href="https://pangjunhan.vercel.app/ai-automation#pricing" rel="noopener noreferrer"&gt;Full pricing&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>productivity</category>
      <category>smallbusiness</category>
    </item>
    <item>
      <title>We taught AI to read delivery orders. The AI was the easy part.</title>
      <dc:creator>Pang Jun Han</dc:creator>
      <pubDate>Mon, 26 Oct 2026 12:37:07 +0000</pubDate>
      <link>https://dev.to/junhanpang/we-taught-ai-to-read-delivery-orders-the-ai-was-the-easy-part-4k93</link>
      <guid>https://dev.to/junhanpang/we-taught-ai-to-read-delivery-orders-the-ai-was-the-easy-part-4k93</guid>
      <description>&lt;p&gt;Every construction site runs on paper. Concrete, steel, diesel, rebar: each delivery comes with a signed delivery order (DO), and someone in the office has to key every one into the system, match it to the purchase order, and file the scan. At a busy contractor that's hours of work every week, and it's the kind of work nobody notices until it falls behind.&lt;/p&gt;

&lt;p&gt;Over the past few months I set up an AI workflow at a Malaysian construction company to take that job over. Here's what it does and what I learned.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Site and store staff scan the signed DOs into one folder. That's the only manual step.&lt;/li&gt;
&lt;li&gt;Overnight, the AI reads each DO (supplier, items, quantities, dates) and matches it to the right purchase order or site transfer.&lt;/li&gt;
&lt;li&gt;It enters the record in the company's system with the signed scan attached.&lt;/li&gt;
&lt;li&gt;Anything it isn't sure about goes on a short list. In the morning, staff only check that list.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The hard part isn't the AI, it's the paper.&lt;/strong&gt; Handwriting, stamps over text, carbon copies, photos taken at an angle. Most of the work was teaching the workflow what "good enough to trust" looks like.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Letting the AI say "I'm not sure" is the most important feature.&lt;/strong&gt; People trust the system because it doesn't pretend. A short list of flagged items is easy to check; a system that is quietly wrong is worse than doing it by hand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Missing paperwork is as valuable as processed paperwork.&lt;/strong&gt; Once every DO is tracked, you get a daily list of what hasn't been scanned yet, so the office knows exactly what to chase from site.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start with one boring document.&lt;/strong&gt; Not a company-wide AI strategy. One document type, one folder, one list. Once that works, the next one (store transfers, diesel, claims) is much faster.&lt;/p&gt;

&lt;h2&gt;
  
  
  Results so far
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;1,300+ delivery orders read&lt;/li&gt;
&lt;li&gt;18,000+ purchase order lines matched&lt;/li&gt;
&lt;li&gt;41,000+ records checked&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  If you run a contractor or SME
&lt;/h2&gt;

&lt;p&gt;You don't need a big IT project to start. If your team spends hours keying paper into a system, that's where AI pays for itself first. I'm happy to share what worked.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Pang Jun Han: operations &amp;amp; AI automation, founder of MyCreatorPulse. &lt;a href="https://pangjunhan.vercel.app" rel="noopener noreferrer"&gt;pangjunhan.vercel.app&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>productivity</category>
    </item>
    <item>
      <title>I built a daily analytics app for Malaysian creators (Next.js + Neon + Vercel)</title>
      <dc:creator>Pang Jun Han</dc:creator>
      <pubDate>Mon, 28 Sep 2026 05:25:40 +0000</pubDate>
      <link>https://dev.to/junhanpang/i-built-a-daily-analytics-app-for-malaysian-creators-nextjs-neon-vercel-fk3</link>
      <guid>https://dev.to/junhanpang/i-built-a-daily-analytics-app-for-malaysian-creators-nextjs-neon-vercel-fk3</guid>
      <description>&lt;p&gt;A lot of creators in Malaysia post the same video on TikTok, Instagram and YouTube, some on Douyin and Xiaohongshu too, and every app shows its numbers in its own place and its own way.&lt;/p&gt;

&lt;p&gt;So I built MyCreatorPulse: one dashboard for all of them. Every night at 2am Malaysia time it reads a creator's public numbers on TikTok, Instagram, YouTube, Facebook, Douyin and Xiaohongshu, saves a snapshot, and in the morning shows what each post gained overnight. No platform login, you just give it your username.&lt;/p&gt;

&lt;p&gt;It's still in its pilot with a handful of creators. Here's what I've learned building it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Next.js 15 (App Router), React 19, TypeScript&lt;/li&gt;
&lt;li&gt;Tailwind v4&lt;/li&gt;
&lt;li&gt;Postgres on Neon, with Drizzle&lt;/li&gt;
&lt;li&gt;Better Auth for sign-in&lt;/li&gt;
&lt;li&gt;Vercel (Singapore region) with two cron jobs&lt;/li&gt;
&lt;li&gt;Resend for email, Cloudflare for DNS&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Two crons do most of the work
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"crons"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/cron/snapshot"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"schedule"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0 18 * * *"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/cron/digest"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="nl"&gt;"schedule"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0 0 * * *"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;18:00 UTC is 2am in Malaysia, when everything gets read. 00:00 UTC is 8am, when the morning email goes out. Each run claims the day before doing anything, so if a cron ever fires twice, the second one does nothing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Time zones will get you
&lt;/h2&gt;

&lt;p&gt;Every date in the app is pinned to Malaysia time explicitly. My PC is on UTC+8, so a bug that leaned on the machine's clock would never show up locally. The tests run with &lt;code&gt;TZ=UTC&lt;/code&gt;, same as Vercel, to catch those.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tests that block the deploy
&lt;/h2&gt;

&lt;p&gt;The numbers are the whole product, so the checks run inside the build:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm run check &amp;amp;&amp;amp; next build"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;They replay real bugs on an in-memory Postgres (PGlite) through the same code the dashboard uses. If one fails, Vercel refuses the deploy and the site stays on the last good version.&lt;/p&gt;

&lt;p&gt;Lesson from this week: a test must never depend on the build machine's environment. One of mine created fake PayPal subscriptions on a made-up plan ID. Locally that env var was empty, so it passed. On Vercel the real one was set, the check failed, and three deploys quietly never went out. Now the test sets what it needs and puts it back after.&lt;/p&gt;

&lt;h2&gt;
  
  
  Engagement rate is easy to get wrong
&lt;/h2&gt;

&lt;p&gt;Sounds simple: likes + comments ÷ views. But photos don't have views. Add up likes over every post and views only over videos, and a photo-heavy account ends up with a crazy rate. Only count posts that actually have a view count:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;withViews&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;posts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;views&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;views&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;views&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;withViews&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;views&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;reactions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;withViews&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;likes&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;comments&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;rate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;views&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;reactions&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;views&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I turned this into a free calculator anyone can use, no sign-up: &lt;a href="https://mycreatorpulse.com/engagement-rate-calculator" rel="noopener noreferrer"&gt;https://mycreatorpulse.com/engagement-rate-calculator&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Platforms don't all tell you the same thing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;YouTube rounds public subscriber counts to three figures (12.3K), and the API does too, so the app shows what YouTube shows instead of pretending it's exact.&lt;/li&gt;
&lt;li&gt;Instagram only has view counts on reels and videos, and a hidden like count is unknown, not zero.&lt;/li&gt;
&lt;li&gt;Xiaohongshu doesn't show views publicly at all.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The rule I ended up with: if a platform doesn't publish a number, the app doesn't guess it.&lt;/p&gt;

&lt;h2&gt;
  
  
  HTML email is 2005 again
&lt;/h2&gt;

&lt;p&gt;The weekly summary email has charts in it. Gmail strips &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; tags, SVG and plenty more, so the "charts" are table cells with a height and a background colour:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;td&lt;/span&gt; &lt;span class="na"&gt;valign=&lt;/span&gt;&lt;span class="s"&gt;"bottom"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"height:36px;background:#1f9d6b;border-radius:3px 3px 0 0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tables and inline styles only. Ugly to write, works everywhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;Instagram and YouTube pages just went up, Douyin and Xiaohongshu are there for creators who post in Chinese, and there are plans for talent agencies now too. If you're a creator, or know one in Malaysia, the live demo works without signing up: &lt;a href="https://mycreatorpulse.com" rel="noopener noreferrer"&gt;https://mycreatorpulse.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy to answer anything about the build in the comments.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>nextjs</category>
      <category>webdev</category>
      <category>buildinpublic</category>
    </item>
  </channel>
</rss>
