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