# Project export: MEALY

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: Cal Hacks 12.0
- Tagline: MEALY, THE MEAL PREP APP FOR LONGEVITY
- Devpost: https://devpost.com/software/mealy-zme2jf
- GitHub: https://github.com/jdelpego/meal_prep_backend
- Demo: https://apps.apple.com/us/app/mealy-longevity-meal-planner/id6754829819
- Video: https://www.youtube.com/embed/PXUm7UpcUeI?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 1 GitHub contributor(s) — jdelpego (32 commits)

## Devpost submission (written by the team)

### Overview

Smart Meal Optimization for Balanced Nutrition Mealy is an intelligent meal planning API that uses advanced mathematical optimization to create perfectly balanced meals based on your calorie and macronutrient goals. What It Does Mealy solves a complex nutritional puzzle: given a list of available foods, it calculates the exact portions needed to hit your target calories, macronutrients (carbs, protein, fat), and micronutrients—all while ensuring realistic, practical serving sizes. How It Works Select Your Foods: Choose from a diverse database of whole foods including proteins (chicken, salmon, tofu), carbs (rice, oats, quinoa), healthy fats (avocado, olive oil, almonds), and vegetables Set Your Goals: Specify your target calories and macro percentages (or use smart defaults) Get Optimized Meals: Receive precise portion sizes that balance all your nutritional targets simultaneously The optimization engine uses weighted least squares with intelligent constraints to find the ideal combination of foods that: Hits your calorie target accurately Balances macronutrients according to your percentages (e.g., 40% carbs, 30% protein, 30% fat) Includes adequate vegetables for micronutrients Provides realistic portions (10g–400g per ingredient) Considers 13+ essential micronutrients for longevity Key Benefits 🎯 Precision Nutrition Achieve macro targets within 1-2% accuracy No more guessing or manual calculations Mathematical optimization ensures the best possible balance 🥗 Prevents Extreme Results Smart bounds prevent unrealistic portions (no more 878g of carrots!) Normalized weighting ensures fair balancing across all nutrients Minimum 10g per ingredient prevents trace amounts Maximum 400g per ingredient keeps portions realistic 🧮 Science-Based Algorithm Uses normalized weights (w/t²) to equalize percentage errors Treats a 1% error in fat the same as a 1% error in carbs Considers both macronutrients and micronutrients simultaneously Decoupled vegetable constraint prevents circular dependencies 🔧 Flexible & Customizable Set custom calorie targets (default: 700 kcal per meal) Adjust macro percentages to your diet (e.g., 50/25/25 for low-fat) Choose from diverse food options including plant-based proteins Works with any combination of available foods ⚡ Fast & Reliable RESTful API built with FastAPI Instant optimization results CORS-enabled for easy frontend integration Consistent, reproducible results Technical Highlights Optimization Approach The app uses scipy's least squares solver (lsq_linear) with: Matrix A: Nutritional content per 100g for each food Vector b: Your target nutrient values Weight normalization: weight / (target²) for fair percentage-based penalties Bounds: 10–400g per ingredient for practical portions Nutrient Tracking Each meal is optimized across 17+ nutritional parameters: Macros: Calories, carbs, protein, fat, fiber Minerals: Magnesium, potassium, selenium, zinc Vitamins: D, K2, folate, B12, C, E Other: Omega-3 EPA/DHA, choline Food Database Curated whole-food database with per-100g nutrition data sourced from USDA: Proteins: Chicken, salmon, eggs, beef, tofu Carbs: White rice, sweet potato, oats, quinoa Fats: Avocado, almonds, olive oil Vegetables: Broccoli, spinach, carrots, kale, bell peppers, cauliflower, tomato Fruits: Banana, blueberries API Usage Endpoint: POST /optimize_meal_prep Request Body: Response: Endpoint: POST /recommend_ingredients Get food recommendations based on your current selection to improve nutritional balance. Running Mealy Local Development The API will be available at http://localhost:8001 Requirements Python 3.11+ FastAPI NumPy SciPy Scikit-learn Pydantic Use Cases Meal Prep Planning: Calculate exact portions for weekly meal prep Macro Tracking: Hit specific macro targets for fitness goals Dietary Balance: Ensure adequate micronutrient intake Recipe Development: Create nutritionally optimized meal combinations Nutrition Education: Understand how foods combine to meet nutritional needs Future Enhancements Additional food database entries Meal planning for multiple meals per day Cost optimization alongside nutrition Allergen and dietary restriction filtering Meal variety scoring to prevent monotony Built with ❤️ for optimal nutrition Mealy - Because balanced nutrition shouldn't require a PhD in mathematics

## README (from the GitHub repository)

# Mealy 🍽️

**Smart Meal Optimization for Balanced Nutrition**

Mealy is an intelligent meal planning API that uses advanced mathematical optimization to create perfectly balanced meals based on your calorie and macronutrient goals.

## What It Does

Mealy solves a complex nutritional puzzle: given a list of available foods, it calculates the exact portions needed to hit your target calories, macronutrients (carbs, protein, fat), and micronutrients—all while ensuring realistic, practical serving sizes.

### How It Works

1. **Select Your Foods**: Choose from a diverse database of whole foods including proteins (chicken, salmon, tofu), carbs (rice, oats, quinoa), healthy fats (avocado, olive oil, almonds), and vegetables
2. **Set Your Goals**: Specify your target calories and macro percentages (or use smart defaults)
3. **Get Optimized Meals**: Receive precise portion sizes that balance all your nutritional targets simultaneously

The optimization engine uses **weighted least squares** with intelligent constraints to find the ideal combination of foods that:
- Hits your calorie target accurately
- Balances macronutrients according to your percentages (e.g., 40% carbs, 30% protein, 30% fat)
- Includes adequate vegetables for micronutrients
- Provides realistic portions (10g–400g per ingredient)
- Considers 13+ essential micronutrients for longevity

## Key Benefits

### 🎯 **Precision Nutrition**
- Achieve macro targets within 1-2% accuracy
- No more guessing or manual calculations
- Mathematical optimization ensures the best possible balance

### 🥗 **Prevents Extreme Results**
- Smart bounds prevent unrealistic portions (no more 878g of carrots!)
- Normalized weighting ensures fair balancing across all nutrients
- Minimum 10g per ingredient prevents trace amounts
- Maximum 400g per ingredient keeps portions realistic

### 🧮 **Science-Based Algorithm**
- Uses normalized weights (`w/t²`) to equalize percentage errors
- Treats a 1% error in fat the same as a 1% error in carbs
- Considers both macronutrients and micronutrients simultaneously
- Decoupled vegetable constraint prevents circular dependencies

### 🔧 **Flexible & Customizable**
- Set custom calorie targets (default: 700 kcal per meal)
- Adjust macro percentages to your diet (e.g., 50/25/25 for low-fat)
- Choose from diverse food options including plant-based proteins
- Works with any combination of available foods

### ⚡ **Fast & Reliable**
- RESTful API built with FastAPI
- Instant optimization results
- CORS-enabled for easy frontend integration
- Consistent, reproducible results

## Technical Highlights

### Optimization Approach
The app uses **scipy's least squares solver** (`lsq_linear`) with:
- **Matrix A**: Nutritional content per 100g for each food
- **Vector b**: Your target nutrient values
- **Weight normalization**: `weight / (target²)` for fair percentage-based penalties
- **Bounds**: 10–400g per ingredient for practical portions

### Nutrient Tracking
Each meal is optimized across 17+ nutritional parameters:
- **Macros**: Calories, carbs, protein, fat, fiber
- **Minerals**: Magnesium, potassium, selenium, zinc
- **Vitamins**: D, K2, folate, B12, C, E
- **Other**: Omega-3 EPA/DHA, choline

### Food Database
Curated whole-food database with per-100g nutrition data sourced from USDA:
- **Proteins**: Chicken, salmon, eggs, beef, tofu
- **Carbs**: White rice, sweet potato, oats, quinoa
- **Fats**: Avocado, almonds, olive oil
- **Vegetables**: Broccoli, spinach, carrots, kale, bell peppers, cauliflower, tomato
- **Fruits**: Banana, blueberries

## API Usage

### Endpoint: `POST /optimize_meal_prep`

**Request Body**:
```json
{
  "foods": ["chicken", "white_rice", "broccoli", "avocado"],
  "kcalories": 700,
  "carbs_percent": 40,
  "protein_percent": 30,
  "fat_percent": 30
}
```

**Response**:
```json
{
  "portions": {
    "chicken": 120.5,
    "white_rice": 85.3,
    "broccoli": 150.0,
    "avocado": 45.2
  },
  "totals": {
    "kcalories": 698.4,
    "carbs_g": 69.8,
    "protein_g": 52.3,
    "fat_g": 23.1,
    "fiber_g": 12.4,
    ...
  }
}
```

### Endpoint: `POST /recommend_ingredients`

Get food recommendations based on your current selection to improve nutritional balance.

## Running Mealy

### Local Development
```bash
# Install dependencies
pip install -r requirements.txt

# Run the server
./run.sh
```

The API will be available at `http://localhost:8001`

### Requirements
- Python 3.11+
- FastAPI
- NumPy
- SciPy
- Scikit-learn
- Pydantic

## Use Cases

- **Meal Prep Planning**: Calculate exact portions for weekly meal prep
- **Macro Tracking**: Hit specific macro targets for fitness goals
- **Dietary Balance**: Ensure adequate micronutrient intake
- **Recipe Development**: Create nutritionally optimized meal combinations
- **Nutrition Education**: Understand how foods combine to meet nutritional needs

## Future Enhancements

- Additional food database entries
- Meal planning for multiple meals per day
- Cost optimization alongside nutrition
- Allergen and dietary restriction filtering
- Meal variety scoring to prevent monotony

---

**Built with ❤️ for optimal nutrition**

*Mealy - Because balanced nutrition shouldn't require a PhD in mathematics*


## Detected evidence (automated analysis)

Indexed codebase: 5 recognized source files, 26 KB.
- FastAPI (technology) — detected in the code
- Python (language) — detected in the code
- Firebase (technology) — claimed on Devpost, not found in the code

## Codebase structure (from repository index)

### Files (7 of 7)

```
.gitignore
app.py
food_data.py
presets.py
README.md
requirements.txt
run.sh
```

### Dependencies

- requirements.txt: fastapi@==0.115.0, numpy@==2.1.0, pydantic@==2.9.0, scikit-learn@==1.5.2, scipy@==1.14.1, uvicorn[standard]@==0.32.0

### Recent commits (newest first)

- changed recipe to list format
- updated backend
- ready2
- ready for render?
- Perf
- Change
- Updated it to run on localhost
- updated
- w
- update
- New render test
- Run this
- Current github
- Fixed veggie issue
- Big change
- Removed sily comments
- Added sensible bounds
- Updated weights
- Working backend
- feat: cap protein and carb selections

## Key source files (fetched from GitHub, selected and truncated for size)

### requirements.txt

```
fastapi==0.115.0
uvicorn[standard]==0.32.0
pydantic==2.9.0
numpy==2.1.0
scipy==1.14.1
scikit-learn==1.5.2
```

### app.py

```python
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from pydantic import BaseModel
import numpy as np
from scipy.optimize import lsq_linear
from food_data import FOOD_DATA
from presets import PRESETS
from sklearn.metrics.pairwise import cosine_similarity


app = FastAPI()

app.add_middleware(
    CORSMiddleware,
    allow_origins=["*"],
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)

class MealRequest(BaseModel):
    foods: list[str]
    kcalories: int = 700
    carbs_percent: int = 40
    protein_percent: int = 30
    fat_percent: int = 30

@app.post("/optimize_meal_prep")
def optimize_meal_prep(request: MealRequest):
    
    # Extract parameters from request
    foods = request.foods
    kcalories = request.kcalories
    carbs_percent = request.carbs_percent
    protein_percent = request.protein_percent
    fat_percent = request.fat_percent
    
    columns = []
    for food in foods:
        column = []
        for category in PRESETS['weights'].keys():
            if category == "vegetable_g":
                column.append(1.0 if FOOD_DATA[food]['category'] == "vegetable" else 0.0)
            else:
                column.append(FOOD_DATA[food][category] / 100.0)
        columns.append(column)
    A = np.column_stack(columns)
    
    # Use parameters instead of PRESETS['targets']
    target_kcalories = kcalories
    target_carbs_g = (target_kcalories * (carbs_percent / 100.0)) / 4.0
    target_protein_g = (target_kcalories * (protein_percent / 100.0)) / 4.0
    target_fat_g = (target_kcalories * (fat_percent / 100.0)) / 9.0
    target_vegetable_g = target_kcalories * PRESETS['targets']['vegetable_g_calorie_ratio']

    targets = []
    for category in PRESETS['weights'].keys():
        if category == "kcalories":
            targets.append(target_kcalories)
        elif category == "carbs_g":
            targets.append(target_carbs_g)
        elif category == "protein_g":
            targets.append(target_protein_g)
        elif category == "fat_g":
            targets.append(target_fat_g)
        elif category == "vegetable_g":
            targets.append(target_vegetable_g)
        else:
            # Micronutrients - scale by calorie ratio
            targets.append(PRESETS['daily_values']['micronutrients'][category] * (target_kcalories / PRESETS['daily_values']['kcalories']))
        
    b = np.array(targets)

    # Normalize weights by target magnitude for fair comparison
    # Without this, small targets (like fat_g=23g) get ignored vs large targets (carbs_g=70g)
    base_weights = [weight for weight in PRESETS['weights'].values()]
    
    normalized_weights = []
    for weight, target in zip(base_weights, targets):
        if target > 1:  # Only normalize non-zero, non-trivial targets
            # Divide by sqrt(target) for gentler normalization
            # This balances between absolute and percentage-based errors
            normalized_weights.append(weight / (target ** 0.5))
        else:
            normalized_weights.append(weight)
    
    W_sqrt = np.diag(np.sqrt(np.array(normalized_weights)))
    
    # Set minimum and maximum bounds for all foods
    # Min: 10g prevents trace amounts (0.5g of broccoli is pointless)
    # Max: 400g prevents unrealistic single-food dominance
    min_amount = 10  # grams
    max_amount = 400  # grams
    
    lower_bounds = np.full(len(foods), min_amount)
    upper_bounds = np.full(len(foods), max_amount)
    
    # Solve weighted least squares with bounds
    result_obj = lsq_linear(W_sqrt @ A, W_sqrt @ b, bounds=(lower_bounds, upper_bounds))
    x = result_obj.x
    
    # Build targets_dict using the parameters passed to the function
    targets_dict = {
        "kcalories": kcalories,
        "carbs_percent": carbs_percent,
        "protein_percent": protein_percent,
        "fat_percent": fat_percent,
        "vegetable_g_calorie_ratio": PRESETS['targets']['vegetable_g_calorie_ratio']
    }
    for category, _ in PRESETS['daily_values']['micronutrients'].items():
        targets_dict[category] = round(PRESETS['daily_values']['micronutrients'][category] * (target_kcalories / PRESETS['daily_values']['kcalories']), 2)
        
    results_dict = {}
    for i, food in enumerate(foods):
        for category in PRESETS['weights'].keys():
            if category == "vegetable_g":
                if FOOD_DATA[food]['category'] == "vegetable":
                    if category not in results_dict:
                        results_dict[category] = 0
                    results_dict[category] += x[i]
            else:
                if category not in results_dict:
                    results_dict[category] = 0
                results_dict[category] += FOOD_DATA[food][category] * x[i] / 100.0

    # Calculate actual vegetable weight from optimized solution (do this FIRST)
    total_vegetable_g = sum([x[i] for i, food in enumerate(foods) if FOOD_DATA[food]['category'] == "vegetable"])
    total_meal_weight = sum(x)
    
    results_dict['vegetable_g'] = total_vegetable_g
    results_dict['vegetable_weight_percent'] = (total_vegetable_g / total_meal_weight) * 100.0
    
    # Now calculate percentages (using vegetable_g that was just set)
    results_dict['carbs_percent'] = (results_dict['carbs_g'] * 4.0) / results_dict['kcalories'] * 100.0
    results_dict['protein_percent'] = (results_dict['protein_g'] * 4.0) / results_dict['kcalories'] * 100.0
    results_dict['fat_percent'] = (results_dict['fat_g'] * 9.0) / results_dict['kcalories'] * 100.0
    results_dict['vegetable_calorie_ratio'] = results_dict['vegetable_g'] / results_dict['kcalories']
    

    # Round all results to 2 decimal places
    targets_dict = {k: round(v, 2) for k, v in targets_dict.items()}
    results_dict = {k: round(v, 2) for k, v in results_dict.items()}
    
    macro_score = max(0.0, 100.0 - (2.0 / 3.0) * sum(abs(results_dict[k] - targets_dict[k]) for k in ("carbs_percent", "protein_percent", "fat_percent"
[truncated — 2291 more characters]
```

### run.sh

```shell
#!/bin/bash
# Start the FastAPI application
# Works locally and on Render

# Use PORT environment variable if available (Render sets this)
# Otherwise default to 8001 for local development
PORT=${PORT:-8001}

uvicorn app:app --host 0.0.0.0 --port $PORT

```

### presets.py

```python
PRESETS = {
    "targets": {
        "kcalories": 700,
        "carbs_percent": 40,
        "protein_percent": 30,
        "fat_percent": 30,
        "vegetable_g_calorie_ratio": 0.20,  # 140g vegetables for 700 kcal meal (20% ratio)
    },
    
    "daily_values": {
        "kcalories":2000,
        "micronutrients": {
            "fiber_g": 25,
            "magnesium_mg": 350,
            "potassium_mg": 4700,
            "selenium_ug": 55,
            "zinc_mg": 10,
            "vitamin_d_ug": 25,
            "vitamin_k2_ug": 100,
            "folate_ug": 400,
            "vitamin_b12_ug": 2.4,
            "omega3_epa_dha_g": 1.5,
            "vitamin_c_mg": 90,
            "vitamin_e_mg": 15,
            "choline_mg": 400,
        }
    },
    "weights": {
        # Macronutrients (highest priority - these define the meal structure)
        "kcalories": 150,      # Must hit calorie target
        "carbs_g": 150,        # Equal weight for all macros (normalized by target size in code)
        "protein_g": 150,      # Equal weight for all macros (normalized by target size in code)
        "fat_g": 150,          # Equal weight for all macros (normalized by target size in code)
        
        # Vegetables (medium priority - important for health)
        "vegetable_g": 20,     # Allow flexibility, but still important
        
        # Micronutrients (lower priority - nice to have, but don't break macros)
        # High-priority micros (harder to get from typical foods)
        "omega3_epa_dha_g": 5, # Hard to get without fish
        "vitamin_d_ug": 5,     # Hard to get from food
        "magnesium_mg": 4,     # Important for many functions
        "potassium_mg": 4,     # Important electrolyte
        
        # Medium-priority micros
        "fiber_g": 3,          # Usually hit naturally with vegetables
        "selenium_ug": 3,      # Usually adequate
        "zinc_mg": 3,          # Usually adequate
        "folate_ug": 3,        # Abundant in vegetables
        "vitamin_b12_ug": 3,   # Easy with animal products
        "vitamin_c_mg": 3,     # Abundant in vegetables
        
        # Lower-priority micros (often naturally met or less critical)
        "vitamin_k2_ug": 1,    # Rare in foods, usually low
        "vitamin_e_mg": 2,     # Usually adequate
        "choline_mg": 2,       # Usually adequate with eggs
    }
}
```

### food_data.py

```python
# Food nutritional data per 100g
# Sources: USDA or approximate values
# Only including macronutrients and longevity-related micronutrients

FOOD_DATA = {
    "chicken": {
        "category": "protein",
        "kcalories": 165,
        "carbs_g": 0,
        "protein_g": 31,
        "fat_g": 3.6,
        "fiber_g": 0,
        "magnesium_mg": 25,
        "potassium_mg": 256,
        "selenium_ug": 22.0,
        "zinc_mg": 1.0,
        "vitamin_d_ug": 0,
        "vitamin_k2_ug": 0,
        "folate_ug": 4,
        "vitamin_b12_ug": 0.3,
        "omega3_epa_dha_g": 0,
        "vitamin_c_mg": 0,
        "vitamin_e_mg": 0.3,
        "choline_mg": 0
    },
    "salmon": {
        "category": "protein",
        "kcalories": 206,
        "carbs_g": 0,
        "protein_g": 22,
        "fat_g": 13,
        "fiber_g": 0,
        "magnesium_mg": 29,
        "potassium_mg": 429,
        "selenium_ug": 41.0,
        "zinc_mg": 0.6,
        "vitamin_d_ug": 10.9,
        "vitamin_k2_ug": 0,
        "folate_ug": 25,
        "vitamin_b12_ug": 3.2,
        "omega3_epa_dha_g": 1.7,
        "vitamin_c_mg": 0,
        "vitamin_e_mg": 1.0,
        "choline_mg": 105
    },
    "eggs": {
        "category": "protein",
        "kcalories": 143,
        "carbs_g": 0.7,
        "protein_g": 13,
        "fat_g": 9.5,
        "fiber_g": 0,
        "magnesium_mg": 12,
        "potassium_mg": 138,
        "selenium_ug": 30.7,
        "zinc_mg": 1.3,
        "vitamin_d_ug": 2.0,
        "vitamin_k2_ug": 0,
        "folate_ug": 47,
        "vitamin_b12_ug": 0.9,
        "omega3_epa_dha_g": 0,
        "vitamin_c_mg": 0,
        "vitamin_e_mg": 1.0,
        "choline_mg": 293
    },
    "beef": {
        "category": "protein",
        "kcalories": 250,
        "carbs_g": 0,
        "protein_g": 26,
        "fat_g": 17,
        "fiber_g": 0,
        "magnesium_mg": 21,
        "potassium_mg": 318,
        "selenium_ug": 21.0,
        "zinc_mg": 6.3,
        "vitamin_d_ug": 0,
        "vitamin_k2_ug": 0,                                                         
        "folate_ug": 7,
        "vitamin_b12_ug": 2.6,
        "omega3_epa_dha_g": 0,
        "vitamin_c_mg": 0,
        "vitamin_e_mg": 0.1,
        "choline_mg": 82
    },
    "tofu": {
        "category": "protein",
        "kcalories": 76,
        "carbs_g": 1.9,
        "protein_g": 8.0,
        "fat_g": 4.8,
        "fiber_g": 0.3,
        "magnesium_mg": 30,
        "potassium_mg": 121,
        "selenium_ug": 8.9,
        "zinc_mg": 0.8,
        "vitamin_d_ug": 0,
        "vitamin_k2_ug": 0,
        "folate_ug": 15,
        "vitamin_b12_ug": 0,
        "omega3_epa_dha_g": 0,
        "vitamin_c_mg": 0.1,
        "vitamin_e_mg": 0.01,
        "choline_mg": 27.0
    },
    "white_rice": {
        "category": "carb",
        "kcalories": 130,
        "carbs_g": 28,
        "protein_g": 4.4,
        "fat_g": 0.4,
        "fiber_g": 0.4,
        "magnesium_mg": 12,
        "potassium_mg": 35,
        "selenium_ug": 7.5,
        "zinc_mg": 0.5,
        "vitamin_d_ug": 0,
        "vitamin_k2_ug": 0,
        "folate_ug": 3,
        "vitamin_b12_ug": 0,
        "omega3_epa_dha_g": 0,
        "vitamin_c_mg": 0,
        "vitamin_e_mg": 0.0,
        "choline_mg": 0
    },
    "sweet_potato": {
        "category": "carb",
        "kcalories": 86,
        "carbs_g": 20,
        "protein_g": 1.6,
        "fat_g": 0.1,
        "fiber_g": 3.0,
        "magnesium_mg": 25,
        "potassium_mg": 337,
        "selenium_ug": 0.6,
        "zinc_mg": 0.3,
        "vitamin_d_ug": 0,
        "vitamin_k2_ug": 0,
        "folate_ug": 11,
        "vitamin_b12_ug": 0,
        "omega3_epa_dha_g": 0,
        "vitamin_c_mg": 2.4,
        "vitamin_e_mg": 0.3,
        "choline_mg": 12
    },
    "quinoa": {
        "category": "carb",
        "kcalories": 368,
        "carbs_g": 64,
        "protein_g": 14,
        "fat_g": 6.1,
        "fiber_g": 7.0,
        "magnesium_mg": 197,
        "potassium_mg": 563,
        "selenium_ug": 0.0,
        "zinc_mg": 3.1,
        "vitamin_d_ug": 0,
        "vitamin_k2_ug": 0,
        "folate_ug": 184,
        "vitamin_b12_ug": 0,
        "omega3_epa_dha_g": 0,
        "vitamin_c_mg": 0,
        "vitamin_e_mg": 2.6,
        "choline_mg": 0
    },
    "banana": {
        "category": "fruit",
        "kcalories": 89,
        "carbs_g": 23,
        "protein_g": 1.1,
        "fat_g": 0.3,
        "fiber_g": 2.6,
        "magnesium_mg": 27,
        "potassium_mg": 358,
        "selenium_ug": 1.0,
        "zinc_mg": 0.2,
        "vitamin_d_ug": 0,
        "vitamin_k2_ug": 0,
        "folate_ug": 20,
        "vitamin_b12_ug": 0,
        "omega3_epa_dha_g": 0,
        "vitamin_c_mg": 8.7,
        "vitamin_e_mg": 0.1,
        "choline_mg": 9.8
    },
    "broccoli": {
        "category": "vegetable",
        "kcalories": 34,
        "carbs_g": 7,
        "protein_g": 2.8,
        "fat_g": 0.4,
        "fiber_g": 2.6,
        "magnesium_mg": 21,
        "potassium_mg": 316,
        "selenium_ug": 2.5,
        "zinc_mg": 0.4,
        "vitamin_d_ug": 0,
        "vitamin_k2_ug": 0,
        "folate_ug": 63,
        "vitamin_b12_ug": 0,
        "omega3_epa_dha_g": 0,
        "vitamin_c_mg": 89.2,
        "vitamin_e_mg": 0.8,
        "choline_mg": 18.7
    },
    "spinach": {
        "category": "vegetable",
        "kcalories": 23,
        "carbs_g": 3.6,
        "protein_g": 2.9,
        "fat_g": 0.4,
        "fiber_g": 2.2,
        "magnesium_mg": 79,
        "potassium_mg": 558,
        "selenium_ug": 1.0,
        "zinc_mg": 0.5,
        "vitamin_d_ug": 0,
        "vitamin_k2_ug": 0,
        "folate_ug": 194,
        "vitamin_b12_ug": 0,
        "omega3_epa_dha_g": 0,
        "vitamin_c_mg": 28.1,
        "vitamin_e_mg": 2.0,
        "choline_mg": 12.8
    },
    "carrot": {
        "category": "vegetable",
        "kcalories": 41,
        "carbs_g": 10,
        "protein_g": 0.9,
        "fat_g": 0.2,
        "fiber_g": 2.8,
        "magnesium_mg": 12,
        "potassium_
[truncated — 4346 more characters]
```