1. Project Overview & Scope
The Weighbridge Management System (WMS) is a high-performance, standalone desktop application engineered to digitize and automate truck scale operations for industrial weighbridge stations. Operating entirely offline, the system interfaces directly with digital weight indicators via physical serial ports, automatically calculates net weights, performs local Maund (Maan-Kg) conversions, and dispatches bilingual landscape receipts directly to physical ticket printers silently.
2. The Challenge (The Problem)
Industrial weighbridge stations require extremely fast, reliable, and secure software. However, traditional web browser-based applications face critical limitations:
Hardware Sandboxing: Standard web browsers are prohibited by security sandboxes from communicating directly with local hardware ports (like COM/RS232 ports) [1].
Intrusive Print Dialogs: Browsers force operators to click through print preview dialogs for every receipt, slowing down high-volume shipping lines .
Volatile Data Storage: Local browser storage (localStorage) is fragile; if an operator clears the browser history or cache, months of valuable transaction records can be permanently deleted.
3. The Solution & Architecture
To override these limitations, we designed a custom desktop-wrapped architecture:
The Electron Wrapper: We packaged our high-contrast, responsive HTML5/CSS3/JavaScript interface inside an Electron.js native shell, unlocking access to Node\\\'s native file-system and system API APIs.
Real-time Hardware Bridging: Utilized the modern Web Serial API combined with Electron main-process IPC bindings to establishing direct, uninterrupted serial communication with the weighing indicator .
Secure SQLite Database: Replaced the fragile browser LocalStorage with a local, secure relational SQLite3 Database. The data is permanently written to a dedicated .db file on the computer\\\'s hard drive, making it immune to browser cache cleaning.
4. Key Features & Functionalities
A. Direct Scale Communication (Web Serial API)
The application continuously listens to the selected COM port at a customizable Baud Rate (9600/4800) . It parses the incoming raw ASCII string, filters out non-numeric noise, and updates the giant glowing on-screen LED display in real-time .
B. Standard Maund (Maan-Kg) Conversions
Engineered a built-in mathematical converter aligned with regional agricultural standards (1 Maund = 40 kg). Weights are dynamically displayed and printed in both kilograms and Maunds (e.g., 35,940 kg is instantly calculated as 898 Maan - 20 kg).
C. Advanced Queue & Split-Weighment System
Truck weighing can occur in two sequences (empty truck first or loaded truck first). WMS seamlessly handles both:
Pehla Wazan (1st Weight): Locks the current weight, saves the transaction to the active pending queue, and clears the terminal for the next truck.
Doosra Wazan (2nd Weight): When a pending truck returns, typing its number instantly auto-fills the transaction details. The software captures the new weight, calculates the Net Weight (Absolute Difference), and saves it to the completed database.
D. Custom Virtual Print Preview & Silent Printing
Virtual Preview: Clicking print opens a beautiful, interactive pre-render of the landscape slip inside the app so operators can verify details without printing blindly.
Silent Printing: Once confirmed, the system bypasses all print pop-ups and sends the landscape ticket directly to the Windows default thermal printer silently.
E. Database History & Duplicate Reprinting
We built a local Records History Modal with real-time dynamic search. Operators can search completed slips instantly as they type a single character, load any historical record in read-only mode, and print duplicate tickets.
5. Technology Stack
Desktop Runtime: Electron.js (Node.js)
Frontend UI: HTML5, CSS3 (Print CSS Media Queries), JavaScript (ES6, Web Serial API) .
Database: SQLite3 (Native relational storage).
IPC Channeling: Electron ContextBridge & Preload bindings .
6. Project Outcomes & Impact
0% Data Loss: Secured transaction data from manual browser resets by utilizing local SQL storage .
Zero Internet Dependency: The system runs completely offline, saving monthly hosting and domain costs.
Optimized Workflow: Reduced the average truck processing time by eliminating manual weight logging and print pop-up screens .