How lucasocp/ifood-smart-ingestion-agent works
This is an iFood menu-ingestion and semantic-search service. Its main workflow collects menu records and reviews, derives review sentiment, normalizes menu data and infers dietary and allergen attributes, then indexes enriched items for filtered similarity search. The FastAPI layer triggers ingestion and serves search results; the index is in memory and rebuilt at startup. The graph follows the README and shown source excerpts; unsampled implementation details are not assumed.
Main entry points: pipeline.py Ingestion and Search Pipeline · app.py FastAPI REST API · models.py Data Contracts · async_scraper.py Menu Scraper
Components 11
Service API
- FastAPI REST API
app.py - Ingestion and Search Pipeline
src/pipeline.py
Catalog Ingestion
- Menu Scraper
src/scraper/async_scraper.py
Enrichment
- Review Sentiment
src/agents/review_sentiment_agent.py - Schema Normalizer
src/agents/schema_normalizer.py - Data Contracts
src/models.py - Model Compatibility
src/compat.py
Semantic Retrieval
- Vector Indexer
src/vector_store/vector_indexer.py - In-Memory Catalog
src/vector_store/vector_indexer.py
Other components
- User / iFood App
- Menus and Reviews
Connections 15
- User / iFood App → FastAPI REST API: submits requests
README.md - Menus and Reviews → Menu Scraper: provides catalog data
README.md - FastAPI REST API → Ingestion and Search Pipeline: triggers ingestion
app.py - FastAPI REST API → Ingestion and Search Pipeline: requests search
app.py - Ingestion and Search Pipeline → Menu Scraper: fetches records
src/pipeline.py - Menu Scraper → Data Contracts: creates raw items
src/scraper/async_scraper.py - Ingestion and Search Pipeline → Review Sentiment: analyzes reviews
src/pipeline.py - Ingestion and Search Pipeline → Schema Normalizer: normalizes items
src/pipeline.py - Schema Normalizer → Data Contracts: creates enriched items
src/agents/schema_normalizer.py - Review Sentiment → Data Contracts: returns sentiment summary
src/agents/review_sentiment_agent.py - Ingestion and Search Pipeline → Vector Indexer: indexes items
src/pipeline.py - Ingestion and Search Pipeline → Vector Indexer: delegates search
src/pipeline.py - Vector Indexer → In-Memory Catalog: stores and searches
src/vector_store/vector_indexer.py - Data Contracts → Model Compatibility: uses model base
src/models.py - FastAPI REST API → User / iFood App: returns results
app.py