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

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay