How syp0000/cravingrag works
CravingRAG searches real recipes from natural-language cravings, returning ranked matches with ingredient evidence and explicit exclusions. The main live journey runs from the Search page through the HTTP server and search pipeline: parse intent, retrieve and rank candidates, load recipe details, and display results. The product also includes a saved-search public gallery, a demand-versus-supply Catalog, recipe enrichment and embeddings, and optional decision provenance. Some subsystem links are documented rather than visible in the sampled source; those edges cite the README or are omitted where ownership is uncertain.
Main entry points: pipeline.py Search pipeline · api.js Search API client · App.jsx Page router · Search.jsx Search journey
Components 20
App experience
- Page router
ui/app/src/App.jsx - Search journey
ui/app/src/Search.jsx - Search API client
ui/app/src/api.js - Result details
ui/app/src/RecipeDetail.jsx - Catalog page
ui/app/src/Catalog.jsx - About page
ui/app/src/About.jsx - Saved gallery
ui/app/public/gallery.json - Public gaps snapshot
ui/app/public/gaps.json
Search runtime
- HTTP server
ui/server.py - Search pipeline
ui/pipeline.py - Quality ranking
ui/search_quality.py - Evidence formatting
provenance/recommendation.py
Recipe data
- Snowflake
- Recipe catalog
sql - Recipe enrichment
sql - Recipe embeddings
sql
Catalog and provenance
- Decision recorder
provenance/recorder.py - Demand events
sql/15_demand_events.sql - Supply comparison
sql/16_demand_supply_mart.sql
Other components
- Search visitor
Connections 21
- Search visitor → Page router: opens
README.md - Page router → Search journey: routes to
ui/app/src/App.jsx - Page router → Catalog page: routes to
ui/app/src/App.jsx - Page router → About page: routes to
ui/app/src/App.jsx - Search journey → Search API client: requests search
ui/app/src/Search.jsx - Search journey → Result details: shows results
ui/app/src/Search.jsx - Search API client → HTTP server: calls endpoints
README.md - Search API client → Saved gallery: loads saved searches
ui/app/src/api.js - Search API client → Public gaps snapshot: loads snapshot
ui/app/src/api.js - Catalog page → Search API client: loads catalog data
ui/app/src/Catalog.jsx - HTTP server → Search pipeline: dispatches search
ui/server.py - Search pipeline → Quality ranking: ranks candidates
ui/pipeline.py - Search pipeline → Evidence formatting: formats evidence
ui/pipeline.py - Search pipeline → Decision recorder: records decisions
README.md - Search pipeline → Snowflake: queries and writes
ui/pipeline.py - Snowflake → Recipe catalog: stores recipes
README.md - Recipe enrichment → Recipe catalog: enriches recipes
README.md - Recipe embeddings → Recipe catalog: supports retrieval
README.md - Search pipeline → Demand events: records search events
ui/pipeline.py - Demand events → Supply comparison: feeds comparison
README.md - Supply comparison → Catalog page: informs catalog
README.md