Note · seedling
Receiving a pallet from its label
- Stage
- seedling
- Links
- 1 out, 1 in
A forklift operator in Inbound Outbound receives a pallet by scanning its label. The label is a GS1-128 barcode that carries an SSCC, the 18 digit serial shipping container code.
Reading the label
parseScan in shared/barcode.ts reads the GS1 application identifiers the dock uses: the SSCC (00), GTIN (01), batch (10), best before and expiry dates (15, 17), purchase order (400), item count (37) and net weight (310n). It accepts the ]C1 prefix, the 0x1D separator or the bracketed (00) form. The check digit is mod 10: weights of 3 and 1 alternate from the right of the body. A wrong digit is refused with (00) SSCC has a wrong check digit. A product barcode (EAN-13, UPC-A) is refused with a message to scan the pallet label.
Matching it to a pallet
scanLine takes a visit and a key and does one of four things:
- A pallet already scanned is refused.
- A label that matches a pallet by SSCC or id marks it OK.
- A label that matches nothing binds to the next expected pallet without a label, and marks it OK.
- With no expected pallet left, it adds an extra pallet. A blind count adds every scan.
Rule 3 exists because the advance shipping notice does not yet carry SSCCs. Labels bind in order until it does.
Four ways in
A keyboard-wedge scanner types into the terminal. The camera uses BarcodeDetector. An NFC tag uses Web NFC, which only Chrome on Android has. Typing the number works everywhere. All four feed parseScan.
Cards at the gate
A card reader is an ESP32 with a PN532 NFC board that posts the card’s UID to a keyed address. The answer is ok, hold, unknown or duplicate, and the reader lights an LED from it. A second tap within 3 seconds is a duplicate. The database stores the SHA-256 of the organisation id and the UID, so it holds no raw card number.
The API side is tested. The ESPHome config in firmware/card-reader/ has not run on hardware, and the camera and NFC paths have not run on a device.
Projects
- Inbound OutboundA multi-tenant SaaS for booking vehicles into a warehouse and calling them to a dock, built on Cloudflare in three days as a test of building real full-stack cloud applications.
Projects
- Inbound OutboundA multi-tenant SaaS for booking vehicles into a warehouse and calling them to a dock, built on Cloudflare in three days as a test of building real full-stack cloud applications.