Skip to content
cd ../featured-projects

cat ./projects/scrapflow-sa.md

[PRODUCTION]

03 /

ScrapFlow SA

A SAPS/ITAC-compliant scrap yard platform, digitised end to end.

ScrapFlow SA interface

// stack

  • React 18
  • ASP.NET Core 8
  • SignalR
  • PostgreSQL
  • PWA / IndexedDB
  • Web Serial API
  • Docker
  • Zapier
  • xUnit
  • Vercel
  • Render

// THE PROBLEM

SA scrap metal yards are legally required to log every transaction for SAPS/ITAC compliance — but most still run on carbon-copy paper tickets. A single lost ticket is an unprovable chain-of-custody gap. Yards with multiple sites had no shared view of stock, meaning vehicles could be double-weighed or materials under-reported without anyone noticing until an audit.

// WHAT I BUILT

A SAPS/ITAC-compliant platform with a 6-step digitised ticket workflow: vehicle arrival → weighbridge integration (Web Serial API) → material grading → tare weight → payment → completion. SignalR broadcasts live inventory changes to all connected operators the moment a ticket closes. A webhook engine with HMAC-SHA256 signed payloads integrates with Zapier and n8n for automated notifications. 5-role RBAC (Owner, Operator, Cashier, Gate, Auditor). Offline-first PWA with IndexedDB for weighbridge environments with patchy connectivity. Validated with xUnit 2.6 + Moq 4.20.

// THE KEY DECISION

SignalR over polling. Polling would have introduced a 5–30 second lag in a multi-site inventory view — long enough for an operator at a second yard to start processing material that had already been sold. SignalR WebSocket groups mean every operator sees the same stock number within milliseconds of a ticket completing, making the system genuinely multi-site rather than just multi-user.

// WHAT IT TAUGHT ME

Hardware integration is where software meets reality. The Web Serial API for weighbridge communication required understanding baud rates, parity bits, and unstable serial reads — nothing in a web tutorial covers that. The xUnit test suite for the webhook engine taught me how to isolate infrastructure boundaries: the HMAC signing logic is tested in isolation from the HTTP layer, so I can assert the signature contract without making real outbound requests.

// REAL-WORLD IMPACT

Eliminates the paper bottleneck in a compliance-heavy industry. Each completed ticket is an immutable audit record. The webhook engine means compliance reports can be automatically sent to accountants via Zapier without manual exports. For a yard processing 50+ tickets a day, this removes an entire admin function.