Evidence Capture
Multi-modal evidence collection including QR/NFC scanning, photo/video capture, scale readings, seal verification, and OCR for zero-paper customs workflows.
Last updated: 2025-02-18
Evidence Capture
Certexi's evidence capture system enables zero-paper customs workflows by digitizing every proof point in the logistics chain. Evidence is collected through multiple modalities and cryptographically anchored for tamper-proof audit trails.
Capture Modalities
QR & Barcode Scanning
Built-in scanner supports all major barcode formats:
- QR codes — Transport unit identification, slot mapping
- Code 128 / Code 39 — Shipping labels, container IDs
- EAN-13 / UPC — Product identification
- Data Matrix — High-density industrial labels
The scanner uses the device camera via the MediaDevices API and works in both online and offline modes.
NFC Tag Scanning
Certexi uses the Web NFC API for contactless identification:
- Read/write NDEF-formatted NFC tags
- Associate tags with transport units, slots, or operators
- Works on Android Chrome 89+ with NFC hardware
- Range: approximately 4cm for reliable reads
NFC Requirements
Web NFC requires HTTPS (or localhost for development) and is currently supported on Android Chrome and Edge. iOS support is not yet available via browser APIs.
Photo & Video Capture
Timestamped visual evidence for every workflow stage:
- Photo capture — High-resolution evidence photos with EXIF metadata
- Video recording — Short clips for complex inspections
- CCTV integration — Automated clip extraction from surveillance cameras
- Annotations — Mark up photos with damage indicators
All media files are uploaded to Nextcloud via WebDAV with path-based organization:
/Certexi/whms/slots/{slot_id}/evidence/{timestamp}-{random}.jpg
Scale Readings
Integration with industrial scales for weight verification:
- Serial port communication via Web Serial API
- Automated readings during weighing stages
- Tolerance-based validation against expected weights
- Historical weight tracking for trend analysis
Seal Verification
Container and transport unit seal management:
- Record seal numbers at entry and verify at exit
- Photo documentation of seal condition
- Break seal logging with supervisor authorization
- Cross-reference with customs declarations
OCR (Optical Character Recognition)
WASM-Powered
OCR runs locally in the browser using a WebAssembly-compiled engine. No data leaves the device during recognition.
Automatic text extraction from:
- License plates (ANPR integration)
- Shipping documents and customs declarations
- Container numbers and markings
- Weight certificates and inspection reports
Live Demo: Evidence Accumulation
Watch how evidence accumulates as a transport unit moves through the customs workflow. Each piece is cryptographically linked to the previous — modifying any item breaks the hash chain.
8-item evidence chain — scans, photos, documents, scale readings, CCTV clips, and seal verifications.
Evidence Chain
Every piece of evidence is linked into a cryptographic chain:
- Capture — Evidence collected with timestamp, GPS, and operator ID
- Hash — SHA-256 hash computed for the evidence bundle
- Anchor — Hash anchored in a Merkle tree via Flowhash Core
- Store — File uploaded to Nextcloud with metadata
- Link — Evidence hash stored in the immutable event ledger
This creates a tamper-evident chain where any modification to evidence files is detectable.
Offline Evidence
All evidence capture works offline:
- Photos are stored in IndexedDB until sync
- NFC reads are queued with full tag data
- Scale readings are cached locally
- Everything syncs automatically when the connection is restored
Evidence UI Components
Scan Result Card
<Card className="w-72"> <CardHeader className="pb-2"> <div className="flex items-center gap-2"> <Badge variant="outline" className="text-green-500 border-green-500">Verified</Badge> <CardTitle className="text-sm">QR Scan Result</CardTitle> </div> <CardDescription>TU-2025-00042 — Slot A-04</CardDescription> </CardHeader> <CardContent className="space-y-2"> <div className="flex justify-between text-xs"> <span className="text-muted-foreground">Scanned at</span> <span>14:32:07 UTC</span> </div> <div className="flex justify-between text-xs"> <span className="text-muted-foreground">Hash</span> <span className="font-mono text-[10px]">sha256:a4f2...</span> </div> <Progress value={100} className="h-1" /> </CardContent> </Card>
Scale Reading Badge
<div className="flex items-center gap-3 p-3 border rounded-lg"> <div className="flex flex-col gap-1"> <span className="text-xs text-muted-foreground">Gross Weight</span> <span className="text-lg font-bold">24,500 kg</span> </div> <div className="flex flex-col gap-1"> <span className="text-xs text-muted-foreground">Tolerance</span> <Badge variant="outline" className="text-green-500 border-green-500">Within ±2%</Badge> </div> <div className="flex flex-col gap-1"> <span className="text-xs text-muted-foreground">Status</span> <Badge className="bg-green-500">Accepted</Badge> </div> </div>
Seal Verification Form
<Card className="w-80"> <CardHeader className="pb-2"> <CardTitle className="text-sm">Seal Verification</CardTitle> <CardDescription>Container MSKU-4821093</CardDescription> </CardHeader> <CardContent className="space-y-3"> <div className="space-y-1"> <Label htmlFor="seal-num">Seal Number</Label> <Input id="seal-num" placeholder="Enter seal number" defaultValue="CX-2025-88421" /> </div> <div className="space-y-1"> <Label htmlFor="seal-cond">Condition</Label> <Select defaultValue="intact"> <SelectTrigger> <SelectValue /> </SelectTrigger> <SelectContent> <SelectItem value="intact">Intact</SelectItem> <SelectItem value="broken">Broken</SelectItem> <SelectItem value="tampered">Tampered</SelectItem> <SelectItem value="missing">Missing</SelectItem> </SelectContent> </Select> </div> <Button className="w-full" size="sm">Verify & Capture Photo</Button> </CardContent> </Card>
Integration with Workflows
Evidence capture integrates directly into the four-stage customs workflow:
| Stage | Required Evidence |
|---|---|
| Entry (Aduana) | NFC scan, license plate photo, seal number |
| Weighing (Báscula) | Scale reading, weight certificate photo |
| Inspection (Supervisor) | Inspection photos, observation notes |
| Exit (Salida) | Seal verification photo, NFC confirmation |