Matching riders to routes, not just places
Every hosted ride stores its start, end and full driving route as GeoJSON with 2dsphere indexes in MongoDB. A search first finds routes passing near the rider's start, filters out rides they've already requested, then keeps only routes that also pass near their destination.
- 01Route stored as a GeoJSON LineString, not just two points
- 02$near queries against the route with a configurable radius
- 03Nearest pickup point computed along the host's path
- 04Fare calculated per rider from their actual segment




