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 746b5230ec [#1] chore: fix mysql column errors, correct git version display parser, and implement json plate allergens table 3 недель назад
.agents 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
.vscode 264d27496d TG-442: Sync resilience configurations, resolve SearXNG crash, and update docs with dynamic custom Git log ID and tag 1 месяц назад
alembic 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
dags 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
docker 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
docs 58c3849eb5 [#1] chore: update default models, rewrite allergen check to use cached LLM, and update README grading layout 3 недель назад
k8s 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
local_tools 24634c07f4 [#1] chore: make git-ident-filter line-restricted and automate remote model deployment 3 недель назад
nginx 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
scratch 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
scripts 0f4001cecd [#1] chore: use force sync fetch-reset in deploy script 3 недель назад
searxng 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
skills acca3bb900 [#1] fix: resolve multiline matching in git-ident-filter and fix app.py syntax error 3 недель назад
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 3 недель назад
.dockerignore 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
.gitattributes 60823f3780 [#1] docs: update README.md grading criteria, add Technical Document and User Manual, fix app.py version parsing 3 недель назад
.gitignore acca3bb900 [#1] fix: resolve multiline matching in git-ident-filter and fix app.py syntax error 3 недель назад
Final_Presentation.html 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
INSTALL_WSL.md 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
PROJECT_CONTEXT.md 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
Project.pdf 58c3849eb5 [#1] chore: update default models, rewrite allergen check to use cached LLM, and update README grading layout 3 недель назад
README.md 58c3849eb5 [#1] chore: update default models, rewrite allergen check to use cached LLM, and update README grading layout 3 недель назад
Retro Planning.pdf 58c3849eb5 [#1] chore: update default models, rewrite allergen check to use cached LLM, and update README grading layout 3 недель назад
add_logging.py 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
alembic.ini 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
app.py 746b5230ec [#1] chore: fix mysql column errors, correct git version display parser, and implement json plate allergens table 3 недель назад
backup_db.sh 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
check_users.py 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
configure_zabbix_alerts.py 58c3849eb5 [#1] chore: update default models, rewrite allergen check to use cached LLM, and update README grading layout 3 недель назад
configure_zabbix_email.py 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
data_sync.sh 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
delivery.zip 2efd3d34da [#1] chore: update generated docs and delivery package zip 3 недель назад
deploy.sh 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
description.docx d768eadec4 TG-221 #closed - Last commit to sync all the file to ship to the teacher. 1 месяц назад
docker-compose-wsl.yml 80c89df147 [#1] chore: pass LLM_MODEL env var and mount .env to app service in docker-compose configs 3 недель назад
docker-compose.yml 80c89df147 [#1] chore: pass LLM_MODEL env var and mount .env to app service in docker-compose configs 3 недель назад
docker-compose_skip.yml 80c89df147 [#1] chore: pass LLM_MODEL env var and mount .env to app service in docker-compose configs 3 недель назад
download_csv.sh 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
generate_docs.py 58c3849eb5 [#1] chore: update default models, rewrite allergen check to use cached LLM, and update README grading layout 3 недель назад
ingest_csv.py 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 3 недель назад
init.sql 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
manage_services.sh 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
master_trigger.sh 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
my.cnf 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
myloginpath.py 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
proper_reset.sh 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
requirements.txt 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
reset.sh 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
rotate_passwords.py 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
snmp_notifier.py 58c3849eb5 [#1] chore: update default models, rewrite allergen check to use cached LLM, and update README grading layout 3 недель назад
start_batch_ingest.sh 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад
unit_converter.py 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 3 недель назад
zabbix_telemetry.py 1701828b12 [TG-131] Purge database passwords from tracked files and format application versioning 3 недель назад

README.md

The current version is #ident "@(#)$Format:LocalFoodAI:app.py:%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:

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.