There are 2 repositories under snap-to-road topic.
Map Matching (Snap to road functionality) done right using Valhalla's Meili
This is a simple example of the Roads API from google. This snaps the road plots to the road. A very handy API by Google. This is developed in Django.
Google Maps Snap To Road Sample HTML