
Why
I kept Googling things like “Great Value white rice nutrition” and landing on product pages with different serving sizes. I wanted one readable record per ingredient, with a measure I’d actually use in the kitchen.
How it works
The catalog has 108 generic ingredients from USDA FoodData Central. You can search by name, alias or food group, and filter by state (raw, dry, canned, frozen). Raw and dry versions of a food are separate records because their nutrition differs.
Each record stores nutrients per 100 g. When you pick an amount in grams, cups, tablespoons or a count (one egg, one slice), the browser converts it to grams and rescales the Nutrition Facts label from that one source. There are no duplicate records for different serving sizes.
There are no dependencies: plain HTML, CSS and JavaScript, deployed to GitHub Pages by a GitHub Actions workflow.
Scope
Generic ingredients only. Branded items will go in only once I can check them against the package, since a USDA record isn’t a package label.