APISnapshot (Link not available) is built using Elm and Ruby on Rails. Today we’re happy to announce that the code is publicly available on GitHub.
We built APISnapshot for two reasons.
We wanted to work with Elm.
We wanted to have a tool that is easy to use and that will help us capture what response we are getting from the API in a format that is easy to share in github issue, in slack or in an email. As a consulting company we work with various teams around the world and during development phase either API is unstable or they do not do what they should be doing.
We originally built this tool using React. Elm compiler is quite strict and forced us to take into consideration all possibilities. This lead us to notice a few bugs which were still present in React code. In this way Elm compiler helped us produce "correct" software by eliminating some of the bugs that we would have found later.
JSON encoding/decoding is a hard problem in Elm in general. In most of the cases we know the shape of the API response we are going to get.
In the case of APISnapshot we do not know the shape of the JSON response we will get. Because of that it took us a bit longer to build the application. However, this forced us to really dig deep into JSON encoding/decoding issue in Elm and we learned a lot.