I am doing a web app to filter recipes based on user's health information.

So if an admin adds a recipe of Friend egg(sunny side up).

Normally, based on how i cook my egg.

I would only need,

Chicken Egg (whole, commonly Large) Seasonings (mostly salt, say 1g)

How would i be able to make my own nutritional facts based on those 2 ingredients on my Sunny side up recipes?

I have a current Table named ingredient i use as a reference whenever inserting a recipe every ingredient of that recipes goes through this to reference its information.

The Columns are as follows:

Name - Description - Calories - Carbs - Fat - Protein - - Sodium - Sugar - Group

Group refers to the food group, as for the above ingredient of egg, it should fall under poultry. Since chicken is poultry. Then salt, should be seasoning.

I'm not professional nor knowledgeable in terms of nutritional values.

I will greatly appreciate it if someone whose knowledgeable in the field could offer/show me a simple way of making a nutritional facts.

My due is next week. I'm so confused and desperate.

  • This is pretty much identical to a previously asked question. You'll need a nutritional database, in which you can look up each ingredient and find out how many calories and how much of each macronutrient it contains. (Note that not all databases will be freely licensed to use in an app like yours.) If you have issues with the programming side, you might want to head over to stackoverflow.com.
    – Cascabel
    Mar 6, 2014 at 4:21
  • What would be better, Based by ingredients or by recipe as a whole? If i would base it from an ingredient i would need to add the values from each ingredient and that will become the nutritional value of the recipe. Mar 6, 2014 at 4:25
  • Ive taken down websites that i can look up to. But if you know any sites with these DB it would be greatly appreciated. Mar 6, 2014 at 4:26
  • If people are uploading their own recipes, I don't understand how you could magically look up the nutritional content of the recipe - probably no one's calculated it before. You have to do it by ingredient. If you're asking how to design the software to do this, that's not a cooking question - try stackoverflow.com for very specific questions, and programmers.stackexchange.com for design issues. But in either case, you can't just say "how do I write this program?".
    – Cascabel
    Mar 6, 2014 at 4:29
  • For sites with those databases, with the caveat that not all of them will let you freely query them from your app, see the question I closed this as a duplicate of - notably one answer mentions the USDA, which is pretty much the one true source of nutritional data in the US.
    – Cascabel
    Mar 6, 2014 at 4:31