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 c8d8922fe1 [#1] Fix DB connection credentials in start_batch_ingest.sh and recreate delivery.zip преди 2 седмици
.agents 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
.vscode 48e7f5fdf2 TG-442: Sync resilience configurations, resolve SearXNG crash, and update docs with dynamic custom Git log ID and tag преди 1 месец
alembic 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
dags 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
docker 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
docs e8287f2c80 [#1] Recreate delivery package and configure CSV ingestion scripts to load all rows преди 2 седмици
k8s 45bdb66384 [TG-131] Purge database passwords from tracked files and format application versioning преди 3 седмици
local_tools 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
nginx 45bdb66384 [TG-131] Purge database passwords from tracked files and format application versioning преди 3 седмици
scratch c8d8922fe1 [#1] Fix DB connection credentials in start_batch_ingest.sh and recreate delivery.zip преди 2 седмици
scripts 8504f88ab0 [#1] Add Cover page, TOC, Index, Global Index, and HTML portal to deliverables преди 2 седмици
searxng 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
skills 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
taiga ea2783436b [#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 преди 3 седмици
.dockerignore 45bdb66384 [TG-131] Purge database passwords from tracked files and format application versioning преди 3 седмици
.gitattributes 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
.gitignore 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
37b11a8e-c3a8-4d02-a3f5-db36b8767771.png 27504a592f [#1] Commit current state before purging sensitive history преди 2 седмици
41535d4b-b926-4645-a5d9-86205955427c.png 27504a592f [#1] Commit current state before purging sensitive history преди 2 седмици
4d00b963-7be0-43b2-bfcf-2c2d005d15b8.png 27504a592f [#1] Commit current state before purging sensitive history преди 2 седмици
5dc8b34f-dd7f-4bdd-b4fd-52623ae8cf05.png 27504a592f [#1] Commit current state before purging sensitive history преди 2 седмици
5f1439a5-a5c6-40f7-b32e-2562510e9c63.png 27504a592f [#1] Commit current state before purging sensitive history преди 2 седмици
754f8f4d-a42b-4590-99f1-912a554fcc6d.png 27504a592f [#1] Commit current state before purging sensitive history преди 2 седмици
Final_Presentation.html 5d2e141e47 [#1] Align Final_Presentation.html version format преди 2 седмици
INSTALL_WSL.md e47fdcbae4 [#1] Fix page 2 text loss, scale header logos, add DOPRO1 to footer, purge hardcoded secrets, and add header/footer guidelines преди 2 седмици
PROJECT_CONTEXT.md 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
Project.pdf 8504f88ab0 [#1] Add Cover page, TOC, Index, Global Index, and HTML portal to deliverables преди 2 седмици
README.md fe86695213 [#1] Save latest changes before complete remote reinstall преди 2 седмици
Retro Planning.pdf e8287f2c80 [#1] Recreate delivery package and configure CSV ingestion scripts to load all rows преди 2 седмици
ad2619d5-f12b-4841-b28c-56a8fc78f56e.png 27504a592f [#1] Commit current state before purging sensitive history преди 2 седмици
add_logging.py 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
alembic.ini 45bdb66384 [TG-131] Purge database passwords from tracked files and format application versioning преди 3 седмици
app.py 3f9d837fa1 [#1] Guide LLM to utilize MySQL FULLTEXT search indexes in app.py prompt преди 2 седмици
b2b1454f-7c4a-41ed-ab20-1ab3ca7899f7.png 27504a592f [#1] Commit current state before purging sensitive history преди 2 седмици
backup_db.sh 147ab8e844 [#1] Render Mermaid flowcharts, relative cross-linking, and clean up RCS $ placeholders преди 2 седмици
check_users.py 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
configure_zabbix_alerts.py e47fdcbae4 [#1] Fix page 2 text loss, scale header logos, add DOPRO1 to footer, purge hardcoded secrets, and add header/footer guidelines преди 2 седмици
configure_zabbix_email.py 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
data_sync.sh 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
delivery.zip c8d8922fe1 [#1] Fix DB connection credentials in start_batch_ingest.sh and recreate delivery.zip преди 2 седмици
deploy.sh 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
description.docx 53a0cb4d52 TG-221 #closed - Last commit to sync all the file to ship to the teacher. преди 1 месец
docker-compose-wsl.yml a05a0881e3 [#1] Save latest changes before complete remote reinstall преди 2 седмици
docker-compose.yml a05a0881e3 [#1] Save latest changes before complete remote reinstall преди 2 седмици
docker-compose_skip.yml 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
download_csv.sh e8287f2c80 [#1] Recreate delivery package and configure CSV ingestion scripts to load all rows преди 2 седмици
e9fa96c9-18ae-4afb-861a-68faea1fde08.png 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
generate_docs.py d4144c0a36 [#1] Save latest changes before complete remote reinstall преди 2 седмици
index.html 8504f88ab0 [#1] Add Cover page, TOC, Index, Global Index, and HTML portal to deliverables преди 2 седмици
ingest_csv.py e8287f2c80 [#1] Recreate delivery package and configure CSV ingestion scripts to load all rows преди 2 седмици
init.sql a05a0881e3 [#1] Save latest changes before complete remote reinstall преди 2 седмици
manage_services.sh 27504a592f [#1] Commit current state before purging sensitive history преди 2 седмици
master_trigger.sh 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
my.cnf d4144c0a36 [#1] Save latest changes before complete remote reinstall преди 2 седмици
myloginpath.py 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
proper_reset.sh 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
requirements.txt 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
reset.sh 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
rotate_passwords.py 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
setup_app.sh 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
setup_wsl.ps1 29e3b498f7 [#1] Configure dynamic git filters, add WSL setup runbooks/telemetry, and clean dead files преди 3 седмици
snmp_notifier.py 60960e76fc [#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows преди 2 седмици
start_batch_ingest.sh c8d8922fe1 [#1] Fix DB connection credentials in start_batch_ingest.sh and recreate delivery.zip преди 2 седмици
unit_converter.py 97cc502bbc [#1] Update regenerated documentation PDFs and Git filters placeholders преди 3 седмици
zabbix_telemetry.py ba10b6be6f [#1] Add sanitized version of scripts without history преди 2 седмици

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 physical bare-metal servers, 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 physical Unix/Linux servers (bare-metal), Docker Compose, WSL2, 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.