Skip to content

A recipe estimator for Open Food Facts products

Notifications You must be signed in to change notification settings

openfoodfacts/recipe-estimator

Repository files navigation

Recipe Estimator 🍽️

Tests

The Recipe Estimator analyzes food products to estimate ingredient proportions based on nutritional information. It's part of the Open Food Facts ecosystem, helping to understand what's really in our food.

🚀 Try It Now

🎯 What Does It Do?

Given a food product with:

  • Ingredient list (e.g., "tomatoes, water, sugar, salt")
  • Nutritional information (e.g., "3.2g protein per 100g")

The Recipe Estimator calculates the likely proportion of each ingredient using optimization algorithms that match the nutritional profile.

📚 Documentation

⚡ Quick Start

  1. Install dependencies:

    make install
  2. Run the application:

    # Backend (API server)
    make watch
    
    # Frontend (in another terminal)
    make watch_frontend
  3. Test it:

    • Backend: http://localhost:5521/static/#0677294998025
    • Frontend: http://localhost:3000/#0677294998025

🧪 Running Tests

pytest
# or
make tests

🐳 Docker

# Build and run with docker-compose
make up

Access at: http://localhost:5520/static/#0677294998025

🤝 Community & Support

🛠️ For Developers

Available Commands

make install          # Install all dependencies
make watch            # Run backend with auto-reload  
make watch_frontend   # Run frontend with auto-reload
make tests            # Run tests
make build            # Build Docker image
make up               # Run with docker-compose

Project Structure

  • frontend/ - React application
  • recipe_estimator/ - Python FastAPI backend
  • docs/ - Additional documentation
  • ciqual/ - CIQUAL nutritional database files
  • scripts/ - Build and maintenance scripts

🔧 Contributing

  1. Join the community: Connect with us on Slack
  2. Read the docs: Check the Wiki and project documents
  3. Set up locally: Follow the Installation Guide
  4. Start developing: Use the Development Guide

We welcome contributions of all kinds - code, documentation, testing, and feedback!


Part of the Open Food Facts ecosystem 🌍

About

A recipe estimator for Open Food Facts products

Resources

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors 9