Mofilo Nutrient Verifier

pub package License: MIT

Production-grade nutrition validation built to scale. Validates user-submitted food data to ensure it's physically possible, calorically accurate, and safe to consume.


Quick Start

import 'package:mofilo_nutrient_verifier/mofilo_nutrient_verifier.dart';

final food = FoodItem(
  id: 'abc123',
  name: 'Grilled Chicken Breast',
  servingSize: 100,
  servingUnit: 'g',
  protein: 31,
  carbs: 0,
  fat: 3.6,
  calories: 165,
);

final result = NutrientVerifier.verify(food);

if (result.pass) {
  print('βœ“ Valid food (score: ${result.trustScore}/100)');
  // Safe to add to database
} else {
  print('βœ— Invalid food:');
  for (final reason in result.reasons) {
    print('  $reason');
  }
  // Reject submission
}

🎯 Features

πŸ”¬ Physics-Based Validation - Blocks nutrition data that violates laws of nature (matter density, energy conservation)

πŸ’§ Volume Unit Protection - Advanced validation for liquid foods (ml, cups, fl oz) using physics-based concentration limits

⚑ 5-Layer Validation Pipeline - Input β†’ Volume β†’ Physics β†’ Energy β†’ Safety (fails fast on first violation)

🌍 Universal Language Support - Name-independent validation works in any language (English, δΈ­ζ–‡, EspaΓ±ol, etc.)

πŸ›‘οΈ Acute Toxicity Protection - Blocks dangerous sodium (>3000mg), caffeine (>400mg), vitamin A levels

πŸ“Š Trust Scoring - 0-100 confidence score for data quality filtering

⚠️ Binary Pass/Fail - No warnings that allow bad data through (strict quality control)


Installation

dependencies:
  mofilo_nutrient_verifier: ^1.0.0

Then run:

flutter pub get

⚠️ THIS IS NOT MEDICAL ADVICE

This software is a technical validation tool, NOT:

  • ❌ Medical advice or medical nutrition therapy
  • ❌ A substitute for healthcare professionals
  • ❌ Approved by FDA or any medical authority

🩺 Medical Conditions - Consult a Professional

DO NOT rely on this software alone if you have diabetes, kidney disease, heart disease, eating disorders, food allergies, or any medical condition.

ALWAYS consult a Registered Dietitian (RDN) or healthcare provider.

πŸ“œ Warranty

This software is provided "AS IS" without warranty of any kind.

Full legal terms: See DISCLAIMER.md and LICENSE


πŸ“„ License

MIT License - Copyright (c) 2025 Mofilo

This software is provided "AS IS" without warranty. See DISCLAIMER.md for complete terms.

Built with ❀️ by Mofilo

Libraries

mofilo_nutrient_verifier
Google-grade nutrition validator for 1+ billion users.