AI/ML
SupplyLens AI
Supply Chain Disruption Scenario Planner

Overview
A generative AI-powered supply chain intelligence platform that lets logistics teams describe real-world disruptions in natural language and receive structured impact analysis with affected shipments, financial exposure, alternative routing, and mitigation strategies. Combines a conversational Claude interface with an interactive global map, real-time KPI dashboard, and detailed shipment table — all backed by a 45-shipment mock dataset spanning $44M in transit value across three global integration centers.
Key Features
- Conversational AI analysis via Claude Sonnet with streaming responses — describe any disruption scenario and receive shipment-level impact assessments with financial estimates and prioritized mitigation recommendations
- Interactive Leaflet map with real-time shipment markers, route polylines, animated disruption zone overlays, and dynamic zoom to affected regions
- Real-time KPI dashboard with animated counters, bar charts by integration center (St. Louis, Amsterdam, Singapore), and cargo type distribution pie charts
- 5 preset disruption scenarios (Gulf Coast Hurricane, Suez Canal Blockage, West Coast Port Congestion, Midwest Winter Storm, Semiconductor Shortage) with one-click analysis
- Structured data extraction from AI responses via <<<IMPACT_DATA>>> JSON blocks that dynamically update map overlays and dashboard metrics
- Haversine distance calculations for geospatial shipment-to-disruption zone matching, export briefing generation, demo mode with pre-baked responses, and 69 tests across utilities, hooks, and components
Challenges & Solutions
The project addressed complex challenges including designing a system prompt injection strategy that embeds the full 45-shipment dataset and scenario definitions into Claude's context for reasoning without external API calls, parsing structured <<<IMPACT_DATA>>> JSON blocks from streaming AI responses to decouple AI reasoning from UI rendering updates, implementing Haversine great-circle distance calculations to identify shipments within geographic disruption zones, solving Leaflet SSR hydration issues with dynamic imports, building an iOS-compatible media playback workaround, and implementing in-memory rate limiting at 20 requests/minute per IP to prevent Claude API abuse.
Tech Stack
Project Type
AI/ML