{"id":474,"date":"2020-10-20T22:17:37","date_gmt":"2020-10-21T06:17:37","guid":{"rendered":"http:\/\/wp.evanyamoto.com\/?p=474"},"modified":"2025-11-29T19:14:59","modified_gmt":"2025-11-29T19:14:59","slug":"recallfind","status":"publish","type":"post","link":"https:\/\/evanyamoto.com\/blog\/2020\/10\/20\/recallfind\/","title":{"rendered":"RecallFind"},"content":{"rendered":"<p>A few years ago, when my youngest son was still an infant, I happened to turn on the news and saw a recall about a popular baby formula. Thankfully, it wasn&#8217;t one we were using and I don&#8217;t think the effects were severe, but I realized I would&#8217;ve had no idea about it if I didn&#8217;t happen to turn on the news at that moment.<\/p>\n<p>So, I started looking into making a site to make it easier to find recalled products. As it turns out, there are free APIs provided by different government agencies. But being the government, they are all a little different by agency such as the FDA and the NHTSA. However, the one I was specifically looking for was the CPSC (Consumer Product Safety Commission) and they had the best site and API. Unfortunately, I&#8217;ve learned that what products that make it on the list is somewhat political. We also have a BOB stroller and this manufacturer made the news because they were going to be on the list but we&#8217;re allegedly able to pay their way out of it. But nevertheless, it&#8217;s a good service that more people should use.<\/p>\n<p>As I looked around, I found some sites that used the API, but most looked like they were class projects that met some minimal requirements. So I went about creating a site and again chose to make it using Vue JS, that I recently learned in my, <a href=\"http:\/\/www.evanyamoto.com\/blog\/index.html?pid=461\" target=\"_blank\" rel=\"noopener noreferrer\">&#8216;it&#8217;s not a portal&#8217; project.<\/a><\/p>\n<p>I ended up using Vuetify as the UI framework and it really helped speed up the time to build the site, even thought it was something new to me and I had look up how to do everything.<\/p>\n<p>I made it so the site pulls down the API data as an AJAX post and formats it nicely into cards.&nbsp; One problem I encountered is that the images can be pretty much any size or dimension and the text can be a few words or a few pages.&nbsp; So, I used flexbox to keep all of the cards the same height and maintain consistent spacing and truncated the text after a certain limit.<\/p>\n<p>Once the individual cards were designed, I then made it so you can change the display from a grid of cards to a list of narrower items.&nbsp; And after that, I used an animation library so the cards gradually display as you scroll.<\/p>\n<p><video muted=\"\" playsinline=\"\" src=\"https:\/\/evanyamoto.com\/screencasts\/RecallFind1.mp4#t=0.5\" controls=\"true\" preload=\"metadata\"><\/video><\/p>\n<p>When you select a product, it loads a full screen modal with some slight animations.&nbsp; This view has an image carousel and it displays all of the important details about the recall.&nbsp; It may not look like much, but it took a lot of thought to display all of the data in meaningful way.&nbsp; There&#8217;s so many different fields that may or may not be populated, so I tried to pick out the most important ones and grouped them into 3 sections that I feel makes it it easy to read, even though there can be a lot of text.<\/p>\n<p><video muted=\"\" playsinline=\"\" src=\"https:\/\/evanyamoto.com\/screencasts\/RecallFind2.mp4#t=0.5\" controls=\"true\" preload=\"metadata\"><\/video><br \/>\nAs a side note, I really like this mirror but it was recalled. But I may be making something like this in a future project.<\/p>\n<p>One that was done, I added a search feature.<\/p>\n<p><video muted=\"\" playsinline=\"\" src=\"https:\/\/evanyamoto.com\/screencasts\/RecallFind3.mp4#t=0.5\" controls=\"true\" preload=\"metadata\"><\/video><\/p>\n<p>And lastly, I added some filtering options and other links to the sidebar.<\/p>\n<p><video muted=\"\" playsinline=\"\" src=\"https:\/\/evanyamoto.com\/screencasts\/RecallFind4.mp4#t=0.5\" controls=\"true\" preload=\"metadata\"><\/video><\/p>\n<p>One thing you&#8217;ll notice is that the FDA cards look a lot different.&nbsp; This goes back to how each of the agencies use slightly different ways to publish the recall data.&nbsp; If I was trying to productize this site, I feel like it would have to gather all of the data across agencies but display them in a consistent format.&nbsp; I don&#8217;t think the technical part is actually that hard, but it would require someone to look through and make some manual edits to all of the items for consistency.<\/p>\n<p>So, I built this site and I was happy with how it turned out, but I never tried to make it into a &#8216;real&#8217; site for various reasons.&nbsp; But I did add it as subdomain so anyone can use the site here:<\/p>\n<p><a href=\"http:\/\/recallfind.evanyamoto.com\/\">http:\/\/recallfind.evanyamoto.com\/<\/a><\/p>\n<p>And, I learned more about Vue JS. It may not specifically help me with my normal work, mostly in C# MVC, but it did help me learn some different ways to do things in JavaScript and it helped to improve my development and design skills overall.  I would like to keep working with Vue, but most likely, this will be the last project I do with Vue and will pick another technology to learn for the next one.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few years ago, when my youngest son was still an infant, I happened to turn on the news and saw a recall about a popular baby formula. Thankfully, it wasn&#8217;t one we were using and I don&#8217;t think the effects were severe, but I realized I would&#8217;ve had no idea about it if I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":734,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[16],"class_list":["post-474","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-design","category-development","tag-featured"],"_links":{"self":[{"href":"https:\/\/evanyamoto.com\/blog\/wp-json\/wp\/v2\/posts\/474","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/evanyamoto.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/evanyamoto.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/evanyamoto.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/evanyamoto.com\/blog\/wp-json\/wp\/v2\/comments?post=474"}],"version-history":[{"count":1,"href":"https:\/\/evanyamoto.com\/blog\/wp-json\/wp\/v2\/posts\/474\/revisions"}],"predecessor-version":[{"id":742,"href":"https:\/\/evanyamoto.com\/blog\/wp-json\/wp\/v2\/posts\/474\/revisions\/742"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/evanyamoto.com\/blog\/wp-json\/wp\/v2\/media\/734"}],"wp:attachment":[{"href":"https:\/\/evanyamoto.com\/blog\/wp-json\/wp\/v2\/media?parent=474"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/evanyamoto.com\/blog\/wp-json\/wp\/v2\/categories?post=474"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/evanyamoto.com\/blog\/wp-json\/wp\/v2\/tags?post=474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}