Ingredient Matching, Measured
Matches free-text recipe lines to 12,000+ USDA foods and converts amounts to grams; 92% of held-out test lines matched the right food.
Health Tech · Full-Stack Development · Cloud Infrastructure
A recipe checker for people managing high blood pressure or type 2 diabetes. Paste a recipe and it matches each ingredient to USDA food data, then checks every serving against published guidelines, a per-meal budget and dietary needs such as halal, kosher, vegan or food allergies.

The Project
People managing high blood pressure or type 2 diabetes are given daily limits for sodium and added sugars, but recipes rarely say how a serving measures up, and most nutrition apps ignore budget and dietary needs.
Hearten checks a pasted recipe against the guidelines a person chooses: NHLBI and the 2025 ACC/AHA guideline for blood pressure, the ADA Standards of Care for diabetes, and FDA Daily Values. It also estimates cost per serving and checks vegetarian, vegan, pescatarian, halal, kosher, gluten-free, dairy-free and alcohol-free needs, plus the nine major food allergens.
I drew on my background in nutrition to write the rules and the wording. Results say whether a recipe fits a person's plan rather than calling food good or bad, keep calories out of focus, and never treat missing data as zero.
The app is live, with the API on AWS Lambda defined in Terraform and deployed automatically through GitHub Actions.
Key Contributions
Matches free-text recipe lines to 12,000+ USDA foods and converts amounts to grams; 92% of held-out test lines matched the right food.
Compares each serving with one meal's share of cited daily limits and names the ingredients behind any flag.
FastAPI on AWS Lambda behind a rate-limited API Gateway, defined in Terraform, with secrets in AWS Systems Manager and OIDC-based deploys.
Behind the Build
Daily nutrient limits are hard to apply to a single recipe, especially when someone is also working within a food budget, a religious practice or a food allergy.
The goal was a tool that checks a recipe per serving against published guidelines, cost and dietary needs at once, and explains every result: which guideline it comes from and which ingredients are behind it.
Because this is health information, the app is framed as educational. It compares recipes with guidelines; personal targets, like a stricter sodium limit or a carb goal, come from a person's care team and can be entered as custom values.
The database holds 12,213 foods from two USDA datasets: FNDDS, which describes foods as eaten, and SR Legacy, which covers plain recipe ingredients such as flour, spices and raw meats.
Added sugars come from USDA's Food Patterns Equivalents Database. SR Legacy doesn't report them, so a rule fills them in where they're clear, and leaves them unknown rather than guessing where they aren't.
Prices come from USDA's Purchase to Plate national averages, adjusted to today's dollars with the Consumer Price Index, plus current Bureau of Labor Statistics prices for staples like flour, rice and eggs.
Every food is tagged with what it contains (pork, shellfish, wheat, alcohol and so on) using USDA food groups, ingredient lists and keyword rules. Foods the rules can't settle are tagged cautiously and listed for human review.
A parser reads each recipe line into an amount, a unit and the food words, handling fractions, ranges, package sizes like "1 (15 oz) can", and tablespoon versus teaspoon abbreviations.
An explainable matcher then ranks USDA foods by how well their names cover the recipe's words, weighted by how rare each word is. It prefers plain ingredients over prepared dishes and raw forms unless the recipe says cooked, and breaks ties using how often USDA's own recipes use each ingredient.
Amounts are converted to grams using USDA's portion weights for each food, such as "1 cup, chopped" or "1 large".
I evaluated it on 97 hand-labeled recipe lines, tuning on 60 and holding out 37 until the end. On the held-out lines, it matched the right food 92% of the time and came within 25% of the correct weight 95% of the time.
Each serving is compared with one meal's share of a daily limit, or a half, quarter or eighth of that for a snack. Sodium, added sugars and alcohol are limits; potassium is shown as progress toward a goal, with a caution for people with kidney disease or on certain blood pressure medicines.
Dietary requirements become exclusion rules over the food tags, so they combine naturally. Halal and kosher checks add "check certification" notes, and the kosher check also catches meat combined with dairy.
The FastAPI backend runs on AWS Lambda behind an API Gateway with rate limiting, all defined in Terraform. The database connection string is stored encrypted in AWS Systems Manager and never appears in code or version control.
GitHub Actions runs linting, database migrations and tests against a real Postgres on every push, then deploys through short-lived OIDC credentials that can only update this one function.
The website is a lightweight static page on Vercel: paste a recipe, set a plan, and read the results.
Results appear as the recipe annotated line by line, showing which USDA food each line matched, how many grams, and any notes about that ingredient, next to per-serving checks with sources.
Because many users are older adults, it uses Atkinson Hyperlegible, a typeface designed for low-vision readers, and always states each result in words rather than relying on color alone.
It works at phone width, by keyboard, and in light and dark modes. Settings are saved only in the browser, and nothing a person enters is stored.
Matching is lexical, so unusual ingredients or brand names can be missed. These lines are listed as not counted, rather than silently ignored.
Prices are national averages, and cooking oil, salt and spices have no public average price, so users can enter their own. Location-based pricing and other currencies are planned; prices are already stored in a currency-ready format.
Dietary checks can rule ingredients out, but can't certify a dish as safe, halal or kosher, and the app says so.
Next is a weekly meal planner that uses optimization to build meals within the same limits, budget and dietary needs.