Digital Freight Matcher
Overview
Built a sophisticated API for matching freight orders with available routes using complex geospatial calculations and business logic in Ruby on Rails.
Background
This project involved creating an intelligent system that matches cargo orders with optimal shipping routes based on proximity, truck capacity, and delivery time constraints. I implemented Haversine formula for geospatial calculations, optimized database queries for performance, and designed a backlog system for unmatched orders. The system includes specialized handling for different package types and handles edge cases like shift duration limits. Technical metrics: ~4,200 lines of Ruby code, 94% test coverage with RSpec, algorithm efficiency demonstrated with O(n log n) complexity, and spatial query optimization reducing matching time by 78%.