Skip to content

drmcoder/scan-erp-docs

Repository files navigation

Scan ERP — Documentation & Resources

Public documentation, architecture notes, and resources for Scan ERP — a QR-based ERP system for CMT garment factories.

Website Blog

What is Scan ERP?

Scan ERP is a purpose-built ERP for CMT (Cut-Make-Trim) garment manufacturing factories. Operators scan bundle QR codes with cheap Android phones; the system auto-calculates piece-rate pay, tracks WIP across stations, and runs production line announcements over a Raspberry Pi-based print server.

Production data: 115,370+ pieces tracked across our own factory floor with 95-99% scan accuracy on $50 Android phones.

Built by: Santosh Rijal, MBBS doctor and family garment business owner in Nepal. Scan ERP started as our own factory's solution after evaluating PROTRACKER, FastReact, WFX, and Stitch-MES.

Quick Links

Architecture Overview

┌─────────────────────────────────────────────────────────────────┐
│                    Operator Mobile (Browser)                     │
│  Cheap Android Phone — jsQR + BarcodeDetector + ZXing fallback   │
└────────────────────────┬────────────────────────────────────────┘
                         │ HTTPS
                         ↓
┌─────────────────────────────────────────────────────────────────┐
│                Next.js 15 (Vercel) — Operator App                │
│         Bundle scan workflow, work pool, payments               │
└──────┬──────────────────────────────────────────┬───────────────┘
       │                                          │
       ↓                                          ↓
┌──────────────────┐                  ┌────────────────────────┐
│ Firebase Firestore│                  │ Raspberry Pi 4 (Edge)  │
│ + Realtime DB     │←───────SSE──────→│ Cache, print server,   │
│                   │                  │ ZKTeco biometric ADMS  │
└───────────────────┘                  └─────────┬──────────────┘
                                                 │
                                                 ↓
                                       ┌─────────────────────┐
                                       │ Hardware Stations   │
                                       │ - TSC label printer │
                                       │ - Brother A4 printer│
                                       │ - ESP32-CAM scanner │
                                       │ - PA + TTS speaker  │
                                       └─────────────────────┘

Key Features

1. Real-Time Bundle Tracking

Every bundle has a unique QR code. Each scan records: who, what, where, when. Bundle locations update across stations within seconds.

Read more →

2. Automated Piece-Rate Payment

Wages calculate from scan data automatically. Eliminates 90%+ of payment disputes that consume traditional wage clerk afternoons.

Formula: pieces × rate × skill multiplier + bonuses − quality penalty

Read more →

3. Marriage / Convergence Tracking

A single garment is cut into 5-15 components (front, back, sleeves, collar) sewn separately, then joined. Scan ERP tracks all components and confirms when a complete garment is ready.

4. Edge-Cached Operation

Raspberry Pi maintains local cache of work pool data. When internet drops (3-5 times daily in Bangladesh), operators continue scanning. Pi syncs when connection returns.

5. Multi-Language Operator UI

English + Nepali (Devanagari script). TTS announcements in factory dialect. Designed for low-literacy operators.

6. Hardware Integration

  • ZKTeco biometric attendance (ADMS protocol)
  • TSC label printers (TSPL)
  • Brother A4 printers (PCL)
  • ESP32-CAM scanner stations
  • Factory TV display for line leaderboards

Technology Stack

Layer Technology
Frontend Next.js 15.5, TypeScript, Tailwind CSS
State Zustand, React Context, IndexedDB (Dexie)
Backend Firebase Firestore + Realtime DB + Auth
Edge Raspberry Pi 4 (Express + pm2), Cloudflare Tunnel
Hardware ESP32-CAM, ZKTeco, TSC TSPL, Brother PCL
Analytics Firebase Analytics, GA4
QR Decoding jsQR + BarcodeDetector + ZXing (3-decoder fallback)
i18n next-intl (English + Nepali Devanagari)

Documentation Index

Getting Started

Implementation

SAM/SMV Reference

Country Guides

Compliance

Competitor Comparisons

Pricing

Plan Monthly Best fit
Starter $200/mo 10-50 sewing machines
Growth $500-1,200/mo 50-150 machines
Scale $1,500-3,000/mo 150-300+ machines

Detailed pricing →

Contact

Founder Background

Santosh Rijal is an MBBS medical doctor and family garment business owner in Nepal. Scan ERP started as Trishakti Apparel's internal tool after evaluating existing options. Featured in Setopati (2025) for the journey from medicine to garment manufacturing entrepreneurship.

License

Code: Closed source (commercial product). Documentation in this repository: CC-BY-4.0.

About

Public documentation, architecture, and 50+ guides for Scan ERP — QR-based ERP for CMT garment factories.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors