Repository used for the DOPRO project dealing with food AI.
This repository contains:
a full Taiga export plus all other documents that are part of your project planning, including any project presentation materials.
the full final product, including all files, documentation and presentation materials.

Lange François 2a1cfbe2d0 [#1] Fix code block line wrapping and replace literal $ placeholders with correct #ident formatting in descriptions před 2 týdny
.agents a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
.vscode 264d27496d TG-442: Sync resilience configurations, resolve SearXNG crash, and update docs with dynamic custom Git log ID and tag před 1 měsícem
alembic a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
dags a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
docker a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
docs 2a1cfbe2d0 [#1] Fix code block line wrapping and replace literal $ placeholders with correct #ident formatting in descriptions před 2 týdny
k8s 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning před 3 týdny
local_tools a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
nginx 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning před 3 týdny
scratch a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
scripts 2a1cfbe2d0 [#1] Fix code block line wrapping and replace literal $ placeholders with correct #ident formatting in descriptions před 2 týdny
searxng a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
skills a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
taiga 744ffe8c14 [#1] chore: resolve security leak, configure dynamic versioning filters, update Streamlit and Flask applications to read version from %cd, update unit converter, ingestion, and search features, and export Taiga scrum data před 3 týdny
.dockerignore 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning před 3 týdny
.gitattributes a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
.gitignore a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
Final_Presentation.html b2c23ead47 [#1] Align Final_Presentation.html version format před 3 týdny
INSTALL_WSL.md 129180a306 [#1] Add Developer and Agent Productivity Guidelines to guides and agent workflows před 3 týdny
PROJECT_CONTEXT.md a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
Project.pdf 2a1cfbe2d0 [#1] Fix code block line wrapping and replace literal $ placeholders with correct #ident formatting in descriptions před 2 týdny
README.md ef4111da16 [#1] Configure mirror repositories and dynamic git filter sanitization před 3 týdny
Retro Planning.pdf 2a1cfbe2d0 [#1] Fix code block line wrapping and replace literal $ placeholders with correct #ident formatting in descriptions před 2 týdny
add_logging.py a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
alembic.ini 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning před 3 týdny
app.py 1e316d1030 [#1] Render Mermaid flowcharts, relative cross-linking, and clean up RCS $ placeholders před 3 týdny
backup_db.sh 1e316d1030 [#1] Render Mermaid flowcharts, relative cross-linking, and clean up RCS $ placeholders před 3 týdny
check_users.py a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
configure_zabbix_alerts.py a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
configure_zabbix_email.py a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
data_sync.sh a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
delivery.zip 2a1cfbe2d0 [#1] Fix code block line wrapping and replace literal $ placeholders with correct #ident formatting in descriptions před 2 týdny
deploy.sh a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
description.docx d768eadec4 TG-221 #closed - Last commit to sync all the file to ship to the teacher. před 1 měsícem
docker-compose-wsl.yml a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
docker-compose.yml a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
docker-compose_skip.yml a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
download_csv.sh a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
e9fa96c9-18ae-4afb-861a-68faea1fde08.png a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
generate_docs.py 2a1cfbe2d0 [#1] Fix code block line wrapping and replace literal $ placeholders with correct #ident formatting in descriptions před 2 týdny
ingest_csv.py a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
init.sql a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
manage_services.sh 1e316d1030 [#1] Render Mermaid flowcharts, relative cross-linking, and clean up RCS $ placeholders před 3 týdny
master_trigger.sh a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
my.cnf 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning před 3 týdny
myloginpath.py a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
proper_reset.sh a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
requirements.txt a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
reset.sh a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
rotate_passwords.py a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
setup_app.sh a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
setup_wsl.ps1 6b02c9a5ac [#1] Configure dynamic git filters, add WSL setup runbooks/telemetry, and clean dead files před 3 týdny
snmp_notifier.py a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
start_batch_ingest.sh a701972ed9 [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows před 2 týdny
unit_converter.py e758e4f49d [#1] Update regenerated documentation PDFs and Git filters placeholders před 3 týdny
zabbix_telemetry.py e758e4f49d [#1] Update regenerated documentation PDFs and Git filters placeholders před 3 týdny

README.md

The current version is #ident "@(#)$Format:LocalFoodAI_lanfr144:README.md:%an:%ae:%ad:%cn:%ce:%cd:%H:%D:%N$"

Local Food AI 🍔

A strictly local, privacy-first AI Medical Dietitian and Food Explorer. This project leverages the OpenFoodFacts dataset and local LLMs (Ollama) to provide medically sound dietary advice, recipe parsing, and menu planning without sending any user data to the cloud.

Features

  • Dynamic Medical Profiling: Configure your health profile (e.g., Kidney issues, pregnancy, vegan). The AI dynamically adjusts all responses, recommendations, and warnings based on these exact medical needs.
  • RAG Architecture: The AI is connected to a massively partitioned local MySQL database. When you ask a question or request a meal plan, the AI executes SQL queries autonomously to fetch precise nutritional data.
  • SearXNG Web Integration: When the local Database lacks culinary heuristics, the AI securely queries a local, private instance of SearXNG to answer questions without compromising patient privacy.
  • Plate Builder & Unit Conversion: Input culinary recipes (e.g., "1.5 cups of flour") and the system converts them to metric standard weights based on the product's density.
  • Distributed Microservice Topology: Supports decoupling across VirtualBox, Hyper-V, and WSL2 using Bridged Networking and SNMP container telemetry for Zabbix.

Documentation (Capstone Deliverables)

Please refer to the docs/ folder for detailed guides:

Quick Start & WSL Installation

This project is fully optimized to run on Windows Subsystem for Linux (WSL2) with Ubuntu 22.04 LTS.

  1. WSL Setup (Windows Host): Open an Administrator PowerShell window at the root of the repository and run:

    powershell.exe -ExecutionPolicy Bypass -File setup_wsl.ps1
    

    This enables WSL2 features and spins up a dedicated Ubuntu 22.04 LTS instance named Dopro1 with user lanfr144.

  2. Branch Checkout & App Setup (WSL Environment): Navigate to the repository home directory inside WSL:

    cd ~
    # Option A: Clone from the Primary Repository (Internal Network)
    git clone https://git.btshub.lu/lanfr/LocalFoodAI_lanfr144.git
       
    # Option B: Clone from the Alternative Repository (Worldwide Access - Clone)
    # git clone https://github.com/lanfr144/LocalFoodAI_lanfr144.git
       
    cd LocalFoodAI_lanfr144
       
    # Always ensure you are on the primary main branch:
    git checkout main
       
    # Launch the installation script to set up Docker, configurations, and permissions:
    ./setup_app.sh
    
  3. Run services: Configure database and app variables in a .env file at the root directory, then run:

    ./manage_services.sh start
    

For detailed step-by-step instructions, please consult the Installation Guide PDF.

Tech Stack

  • Frontend: Streamlit
  • Database: MySQL 8.0
  • AI Engine: Ollama (Llama 3.2:3B)
  • Web Search: SearXNG
  • Monitoring: Zabbix (SNMPv2c)
  • Deployment: Native Ubuntu, Docker Compose, Hyper-V / VirtualBox
  • Project Management: Taiga (Synced dynamically via Python)

AI Skills & Governance

This project leverages specialized AI skills to maintain code quality, documentation, and strict governance:

  • Code Review: Automatically reviews code changes for correctness, edge cases, style, and performance.
  • Doc Writer: Ensures all documentation and inline comments stay perfectly synchronized with source code changes.
  • Expert Coach: Acts as a principal engineer, enforcing optimal code, modularity, and a mandatory Identity Tag in file headers.
  • Git Commit: Enforces strict Git governance, Taiga tracking (TG-123), and a single main branch workflow. For every commit, a task in Taiga must be associated. If the task does not exist, it must be created and added to a user story and a sprint.
  • Refactor Coach: Refactors code to improve readability, performance, and modularity without changing external behavior.
  • SQL Optimizer: Enforces DBA standards for MySQL, Oracle, and PostgreSQL, ensuring proper indexing, transaction management, and secure access.
  • Test Generator: Generates comprehensive unit and integration tests focusing on boundary conditions and logical coverage.

Grading

There will be 6 grades in total: 3 for Project Management 1 (PM1) and 3 for Domain-specific Project 1 (DSP1).

PM1:

  • Requirements analysis and assessment.
  • Overall project planning and execution.
  • Project presentation.

DSP1:

  • The final product shipped to the customer.
  • The product documentation:
    • Technical document, explaining how to install and configure the final product as well as the technologies used (LLM, DB, etc.) for an IT audience. Explain which Antigravity models you used for which tasks as well as how and why you configured agent permissions. Also reflect on what Antigravity struggled with and you handled this. Explain which local LLM the app uses and why. Explain the app infrastructure via a diagram showing how the app components communicate locally. Explain how you've verified that no user data leaves the server.
    • User manual, explaining how to use the final product from an end user (non developer) perspective.
  • The presentation to the customer.