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
- I had previously used Tracepath’s original schema, consisting of two models:
User
andReport
, to test authentication. However, since I was busy fixing the landing page and other pages, I decided to update the schema later, as theFoodItem
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
- 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 acceptingUserType
values (e.g.,INDIVIDUAL
vs.ORGANIZATION
) that I borrowed from Tracepath’s repository. - Finally, creating the food item search page.
Top comments (0)