Spartecipes Post-Mortem

Jason Sigmon
JSON’s Coding Adventures
3 min readJan 12, 2016

As soon as we finished Greenfield it was time to start Legacy. Legacy had the same four-day time constraint, but we had to improve another group’s app. We decided we wanted to enhance an app called Spartecipes. This app utilized the Big Oven API to provide users with various recipes and we felt it would be easy to improve.

Project

Our improvement goals centered on improved customization and improving the backend. I was interested in acquiring some backend experience; so, that’s what I initially handled. The bug I was trying to squash related to allowing users to be able to refresh on pages other than the homepage. This issue was caused by Angular dealing solely with single page apps. What this means is you are not switching to other full pages like on a website. Instead, a different view is being rendered, allowing for easy page change. I went searching online and found out I needed to have the back end render the index page then change the view to the page the user was previously on. This proved more challenging than expected and was solved by trying a few different Node Packages.

After addressing some more minor routing issues, I moved to the front end. The first easy fix I wanted to implement related to the shopping cart. The app we inherited forced users to delete each recipe manually once they finished it. I wanted a way that users could quickly remove all of their recipes. I initially figured I could just set the recipes array equal to an empty array. Unfortunately, this removed the connections the app relied on to add new recipes. Instead, I ended up looping over the existing array, and it manually removed each element.

Next up was improving the search function. I noticed on some of my teammates computers, random Unicode in front of their query. We could not figure out why but assumed a RegEx would fix it. I had used one previously in my Chrome extension to restrict the input to certain characters. Wanting to avoid using Polymer, I tried to write it myself, by allowing only Letters. This still did not fix the problem; thus, I tried to have it delete characters if a non-letter was entered. This fixed the Unicode issue enough that users could easily search.

Result

Our improved app allowed users to search for recipes, then receive nutrition information and have the ability to customize units if they lived in a metric country. We also allowed for changes to the serving size because many recipes created too many portions. This app would have been close to production ready, but it relied on API’s we used thanks to free trials. We would not be able to afford the API cost, but a video of our app in action is available here.

Problem

Once again there were two problems I left at the end of the project. The first you can see in the video. When you press a non-letter key, including shift and enter, it will delete one character behind your cursor. This did not prevent the search from working but potentially could cause problems. There was also an issue that arose with you having to double click on the clear cart to get it work. I think that was caused by subsequent code that was added to that page, but I was unable to pinpoint the exact cause.

Deployed Site: http://spartecipes-revisited.herokuapp.com/ — May be down due to API issues.

--

--

Jason Sigmon
JSON’s Coding Adventures

Founder of Arternic, LCS Fan, and tweet @jaysig91. Feel free to reach out and say hello