DEV Community

n00bgineer
n00bgineer

Posted on • Originally published at n00bgineer.wordpress.com on

Building a privacy-first health app - update #3

Introduction

In the previous post, I mentioned that I was able to figure out the basics of the FDC API. However, I decided to further explore the REST API and discovered that the food items within the ‘Branded’ category (e.g., Gourmet Belgian Waffles by WaffleWaffle, LLC) have properties such as servingSize and servingSizeUnit (based on which, I created this layout). In contrast, ‘Foundation’ food items (e.g., Raw ground Chicken with additives or apple juice) do not come with any such properties. So, I explored the serving size of these food items and came to the conclusion that the nutritional information for all the foundational food items is based on the serving size of 100g by default.

Updates

  1. I had previously used Tracepath’s original schema, consisting of two models: User and Report , to test authentication. However, since I was busy fixing the landing page and other pages, I decided to update the schema later, as the FoodItem model depended on my understanding of the FDC API. Since I was (finally) able to understand the REST API, I decided to complete the basic schema and regenerate the scaffold. Furthermore, since I was already planning to integrate the payment feature with the app, I also decided to add the PaidSubscriptions model to it.

Next steps

  1. Since I’ve regenerated the models, firstly, I’ll need to fix some basic issues to re-enable authentication and test it out. Additionally, I’ll also update the OnboardingModal since we are no longer accepting UserType values (e.g., INDIVIDUAL vs. ORGANIZATION ) that I borrowed from Tracepath’s repository.
  2. Finally, creating the food item search page.

Screenshots


A small section of the update model

Top comments (0)