mofilo_nutrient_verifier 1.0.0
mofilo_nutrient_verifier: ^1.0.0 copied to clipboard
Production-grade nutrition validation for user-submitted food data. Validates using physics-based limits, energy conservation, and toxicity thresholds. Binary pass/fail with trust scoring.
Mofilo Nutrient Verifier #
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
⚖️ Legal & Medical Disclaimers #
⚠️ 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