ScanGuard AI
Catch Missed Operational Scans Before They Cost Revenue
Overview
Anomaly detection and analytics platform for high-volume logistics and retail operations that surfaces missed barcode scans, ranks them by downstream risk, and gives operations teams a clear queue to resolve.
The problem
In warehouses, hubs and retail floors, a missed package or asset scan stays invisible until a billing discrepancy, a lost shipment or a failed delivery shows up days later. By then the trail is cold and the fix is expensive.
The solution
Built ScanGuard AI: a Python backend that reconstructs expected scan sequences per shipment, detects gaps and out-of-order events, and exposes them through a React analytics dashboard. Recommendations are ranked by financial exposure so supervisors know which gaps to fix first.
Project gallery
Technical architecture
Event ingestion, sequence anomaly detection, and an operations dashboard
Event Ingestion
Normalizes scanner feeds and shipment manifests into a single ordered event stream per consignment.
Sequence Anomaly Detector
Compares observed scan paths against expected hub sequences and flags missing, duplicated or out-of-order events.
Risk Scorer
Weights each gap by shipment value, lane history and SLA pressure so the queue is prioritised by impact, not volume.
React Analytics Dashboard
Trend charts, drill-down tables and resolution actions built with React Router, Recharts and Lucide icons.
Methodology
- Reconstructed expected scan paths from historical shipments per lane and hub
- Defined gap, duplicate and sequence-violation rules with operations staff
- Added a risk score so teams triage by exposure instead of chronological order
- Back-tested detection against known billing disputes to measure precision
- Built resolution tracking so each flagged gap has an owner and outcome
Results & impact
Key impact
- Moved missed-scan discovery from month-end reconciliation to same-day alerts
- Reduced disputed invoices by catching gaps before billing
- Gave supervisors an auditable resolution trail per shipment
- Revealed recurring hub-level process failures through trend analysis
Challenges & solutions
Noisy Scanner Data
Deduplicated events by scanner, timestamp and parcel, then applied confidence windows before flagging gaps
Alert Fatigue
Grouped related gaps into a single case per shipment and suppressed known routine exceptions
Key implementation
Scan Sequence Gap Detection
EXPECTED = ["pick", "pack", "hub_in", "hub_out", "dispatch"]
def find_gaps(events):
"""Return missing or out-of-order scans for one shipment."""
seen = [e.stage for e in sorted(events, key=lambda e: e.timestamp)]
gaps = []
for index, stage in enumerate(EXPECTED):
if stage not in seen:
gaps.append({"stage": stage, "type": "missing", "position": index})
positions = [EXPECTED.index(s) for s in seen if s in EXPECTED]
for previous, current in zip(positions, positions[1:]):
if current < previous:
gaps.append({"stage": seen[current], "type": "out_of_order"})
return gaps