An enterprise-grade weighbridge management system built for the palm oil industry, handling weight transactions, quality control, partner contracts, and real-time reporting — with offline-first capability and hardware integration for on-site scales.

Records weight transactions even without internet using IndexedDB with a sync queue, ensuring zero downtime in remote plantation areas with unreliable connectivity.
Connects directly to physical weighbridge scales via configurable serial port, automatically capturing weight readings with customizable data filters and flow control.
Tracks palm oil quality parameters including DOBI, FFA, moisture, and impurity levels — with fruit bunch sortation grading and partner-provided vs internal assessments.
Granular permission system with configurable roles, route-level guards, and comprehensive activity logging — ensuring accountability across multi-location operations.
Many palm oil mills use Raspberry Pi or low-spec machines as their on-site server. Optimizing the SvelteKit build with adapter-node, tuning PostgreSQL for limited RAM, and using Bun as the runtime instead of Node.js were critical to achieving acceptable performance on ARM-based hardware with just 2GB of memory.
Transactions recorded offline need to eventually sync without data loss or duplication. I built a queue-based sync system using IndexedDB (via Dexie.js) that handles conflict detection, master data versioning, and graceful recovery from partial syncs — all transparent to the operator at the weighbridge.
Bridging physical weighbridge hardware with a web application required parsing raw serial data streams with varying formats across different scale manufacturers. I implemented a configurable serial filter system that extracts weight values from noisy data using pattern matching, with fallback handling for connection drops.