<?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: Santosh Rijal</title>
    <description>The latest articles on DEV Community by Santosh Rijal (@drmcoder).</description>
    <link>https://dev.to/drmcoder</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%2F3922063%2F5e6e23f2-ad09-4b60-9c61-f3d6e02b9c8d.png</url>
      <title>DEV Community: Santosh Rijal</title>
      <link>https://dev.to/drmcoder</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/drmcoder"/>
    <language>en</language>
    <item>
      <title>We built a free bulk checker for EU REX numbers (open source, no API key)</title>
      <dc:creator>Santosh Rijal</dc:creator>
      <pubDate>Sun, 22 Nov 2026 03:16:09 +0000</pubDate>
      <link>https://dev.to/drmcoder/we-built-a-free-bulk-checker-for-eu-rex-numbers-open-source-no-api-key-37ei</link>
      <guid>https://dev.to/drmcoder/we-built-a-free-bulk-checker-for-eu-rex-numbers-open-source-no-api-key-37ei</guid>
      <description>&lt;h2&gt;
  
  
  There is no API, so we read the public page carefully
&lt;/h2&gt;

&lt;p&gt;The Commission's validation page loads its result as a small HTML fragment. Each fact sits in a table row: a bold label, then a value cell. So the parser collects label → value pairs and only trusts the ones it knows:&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="n"&gt;re&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;/&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;\&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;^&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;80&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="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;*&amp;lt;&lt;/span&gt;\&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;\&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;*&amp;lt;&lt;/span&gt;\&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;td&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;\&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;*&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;td&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;^&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;*&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;\&lt;span class="n"&gt;s&lt;/span&gt;\&lt;span class="no"&gt;S&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="o"&gt;&amp;lt;&lt;/span&gt;\&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;td&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;/&lt;/span&gt;&lt;span class="n"&gt;gi&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;html&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;statusText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'status of the rex number'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two rules kept it honest:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Never guess.&lt;/strong&gt; If the page layout isn't recognised, the result is &lt;code&gt;unavailable&lt;/code&gt;, not "valid" and not "not found". A wrong "valid" could cost a buyer real duty.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Not valid" is not "valid".&lt;/strong&gt; The status for a revoked number also contains the words "is valid" (&lt;code&gt;is not valid&lt;/code&gt;), so the check excludes &lt;code&gt;not valid&lt;/code&gt; explicitly.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Bugs real input found
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Spaces inside one number.&lt;/strong&gt; People copy numbers from PDF invoices as &lt;code&gt;NPREX 1244417670168 NPTEPC&lt;/code&gt;. Our first splitter treated spaces as separators and turned one number into three "wrong format" entries. Now lines, commas and semicolons separate numbers; spaces only do when every word is itself a complete REX number.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Whitespace in the "not found" box.&lt;/strong&gt; The Commission's "does not exist" message sits in a box padded with hundreds of spaces. A 400-character window missed it. We now read the box's first paragraph instead, and our test fixture copies the real padding so this can't come back.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Matching too broadly.&lt;/strong&gt; Searching the whole page for "does not exist" would misread any notice containing that phrase. We read the status row first and look for the not-found message only in its own box.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Being a good citizen of a free government service
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Valid answers are cached for 6 hours, "not found" for only 10 minutes, so a new registration shows up quickly.&lt;/li&gt;
&lt;li&gt;One shared deadline per request, so ten slow lookups can't take a minute.&lt;/li&gt;
&lt;li&gt;A per-visitor hourly limit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;We pass on only what a buyer needs:&lt;/strong&gt; status, registration date, name and country. Address, e-mail and phone from the public record are deliberately dropped, and we don't store who checks what.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  One caveat worth repeating
&lt;/h2&gt;

&lt;p&gt;A valid REX number proves the exporter is &lt;strong&gt;registered&lt;/strong&gt;. It does not prove the goods meet the rules of origin, or that the invoice wording is right. The checker says so on every result.&lt;/p&gt;

&lt;p&gt;If you work on customs or trade tooling, the code is MIT-licensed: use it, and tell us what would make it more useful.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How I Built a QR-Powered ERP for Garment Factories Using React, Firebase, and a Raspberry Pi 🧵⚡</title>
      <dc:creator>Santosh Rijal</dc:creator>
      <pubDate>Sat, 09 May 2026 17:35:16 +0000</pubDate>
      <link>https://dev.to/drmcoder/how-i-built-a-qr-powered-erp-for-garment-factories-using-react-firebase-and-a-raspberry-pi-55gc</link>
      <guid>https://dev.to/drmcoder/how-i-built-a-qr-powered-erp-for-garment-factories-using-react-firebase-and-a-raspberry-pi-55gc</guid>
      <description>&lt;p&gt;The Problem: The "Spreadsheet Chaos" of the Sewing Floor&lt;br&gt;
Most people think garment manufacturing is just "sewing." In reality, it’s a logistics nightmare. A single factory floor might have 60+ machines, 100+ operators, and thousands of fabric bundles moving at once.  &lt;/p&gt;

&lt;p&gt;Before Scan ERP, tracking was done on paper or messy Excel sheets. This led to:&lt;/p&gt;

&lt;p&gt;Payment Disputes: "I sewed 50 sleeves, why am I paid for 40?"&lt;/p&gt;

&lt;p&gt;The Black Hole: A bundle goes missing, and production stops for hours.&lt;/p&gt;

&lt;p&gt;Delayed Decisions: Managers only see "yesterday's" data, never "now."&lt;/p&gt;

&lt;p&gt;The Solution: A "Zero-Install" System of Action &lt;br&gt;
I didn’t want to build a "System of Record" where people just type in data. I wanted a System of Action.  &lt;/p&gt;

&lt;p&gt;We built Scan ERP as a Progressive Web App (PWA) because factory environments hate App Stores. No downloads, no updates—just a QR scan and you're in.  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Multi-Engine QR Scanner (99% Accuracy)
Scanning on cheap, greasy $100 Android phones is hard. To hit 99% accuracy, we didn't rely on one library. We built a hybrid engine combining:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;BarcodeDetector API (Native &amp;amp; Fast)&lt;/p&gt;

&lt;p&gt;jsQR (Fallback) &lt;br&gt;
ZXing (Robustness)&lt;/p&gt;

&lt;p&gt;This ensures that even a smudged QR code on a moving bundle gets registered in &amp;lt;200ms.  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Architecture: From Monolith to Modular
Initially, our firebase-services.js was a 3,000-line beast. We recently performed a major "Architectural Cleanup":
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Modular Services: Split by domain (Inventory, Piece-rate, Quality Control).  &lt;/p&gt;

&lt;p&gt;Base Service Pattern: A standardized FirebaseBaseService for CRUD, automated timestamps (createdAt, updatedAt), and batch transactions. &lt;br&gt;
The Result: A 75% reduction in core service file size and way faster bundle loading.  3. Handling "Off-Grid" Factories with Raspberry PiInternet in factories can be spotty. We deployed a Raspberry Pi as an edge collector. It handles local data sync and ensures that even if the Wi-Fi drops, the sewing lines don't. Once the connection is back, Firebase Background Sync handles the heavy lifting.  The Impact: Real Data, Real Fast &lt;br&gt;
 In our primary deployment (60+ machines in Nepal), we’ve already tracked 115,370+ pieces.  &lt;/p&gt;

&lt;p&gt;Bottlenecks Detected in &amp;lt;30 Seconds: If a line slows down, the dashboard turns red instantly.  &lt;/p&gt;

&lt;p&gt;Zero Payment Disputes: Every scan creates a tamper-proof entry in the operator's digital diary.  &lt;/p&gt;

&lt;p&gt;Lessons Learned&lt;br&gt;
Building for the "real world" is different from building for "the browser."&lt;/p&gt;

&lt;p&gt;UX &amp;gt; Beauty: Big buttons, high contrast, and voice notifications matter more than fancy animations on a dusty factory floor.  &lt;/p&gt;

&lt;p&gt;PWA is the Future of Enterprise: In 2026, the "install barrier" is the biggest killer of B2B apps. PWAs solve this.  &lt;/p&gt;

&lt;p&gt;Check out the live project here: &lt;a href="https://scanerp.pro/" rel="noopener noreferrer"&gt;https://scanerp.pro/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Are you building niche ERPs or experimenting with PWA scanning? Let's chat in the comments!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>pwa</category>
      <category>erp</category>
      <category>fashion</category>
    </item>
  </channel>
</rss>
