I was watching an HTML/CSS course when I first learned about the browser's Geolocation API and I was struck by how simple it is. Right then I knew I had to make a side project that uses it and since I enjoy cycling, I decided to make an app that not only helps me find the best cycling route between two points on a map but also display valuable insights on the elevation andinclination along the path.
I've found that the best way to truly learn any technology is to use it in a meaningful side-project. That is how you get motivation to finish the project; it holds a meaning to you.
I planned on creating a fullstack project where the backend would use openstreetmap data to calculate the best path between any two points on the map using Djikstra's algorithm.
After playing around with the data of a small country such as Monaco, I realised that working with the full size of the data available is simply not possible without massive hardware upgrades. For example, the dev team behind openstreetmap explicitly asks to not even report issues if you run the software on anything less than 64GB of RAM!
After realising that I could not possibly host the backend myself, I turned to commercially available API's.
I would love to say that I had many challenges but that would not be accurate. I kept the project simple and did not use any 3rd party state management. Relied mostly on React context.
I hindsight, I could have used prop drilling to get the job done with less code. The massice ecosystem of libraries that serve React and JavaScript made my task easier.
This was my second Typescript project and I 100% did not regret using it. It was especially useful when working with the incoming data from the API as Typescript enabled hints and worked almost like documentation for my work.