There are massive shortages of many essential products throughout the United States right now. We, like many Americans, have had difficulty getting items including toilet paper and bread, and decided to create a tool that we and others could use to easily find the products they need.
What it does
With user input of a "cart" of search items they're looking for and a maximum distance they're willing to drive, the In Stock Near Me API returns a list of available products near you for each term and metadata on the stores they're located at.
How we built it
The In Stock Near Me Search API is an amalgamation of our Store APIs, which locate the nearest stores to the user and then send parallel requests to query the inventory of each of those stores, for each search term in your "cart". We then agglomerate the results for each store by search term and return this as JSON.
Challenges we ran into
We had significant blockers, including inconsistent store API/site responses, a Kroger API that decides to refuse OAuth token requests every few hours, and learning languages and frameworks that we hadn't ever used before.
Accomplishments that we are proud of
We are very proud to have successfully reverse-engineered the Whole Foods, Walmart, and Walgreens store sites, a time-consuming process that allowed us to easily access the information we needed.
What we learned
On the frontend, none of our team had experience with C# or Xamarin, the tool we used to build our app. On the backend, we had to learn Json.NET, Flurl, ASP.NET, and the C# standard library. We gained a huge appreciation for asynchronous requests on a medium scale, without which each Search API request would have taken hundreds of seconds.
What's next for In Stock Near Me
We have a fully-functioning API for In Stock Near Me, that we hope to make available to the public for other developers to consume to create useful or helpful applications. Our team will be working to build out our app, add user accounts and authentication, and submit our app to the Google Play and Apple App Stores.
Try It out
asp.net, c#, flurl, json, xamarin