How ksranjith786/suggest-recipe works
Suggest Recipe is a Flask application for finding recipes from a user’s pantry. The main workflow serves the ingredient-selection page, accepts selected ingredients and match mode, queries and ranks stored recipes, then renders paginated results with recipe details. The repository also supports populating its database from a CSV and scraping recipe sites into that store. The graph includes the major route, persistence, scraping, and presentation responsibilities. Evidence is limited to the README, source index, and excerpts provided; unsampled behavior is not assumed.
Main entry points: app.py Flask app · recipes.py Recipe search · database.py Recipe persistence · seed.py CSV seeding
Components 19
Web application
- Flask app
project/app.py - Home routing
project/routes/home.py - Pantry page
project/routes/ingredients.py - Management routes
project/routes/management.py - Recipe lookup routes
project/routes/fetch.py - Pantry view
project/templates/ingredients.html - Error view
project/templates/error.html - Legacy recipe view
project/templates/recipes_v0.html
Recipe discovery
- Recipe search
project/routes/recipes.py - Results view
project/templates/recipes.html - Recipe cards
project/templates/partials/recipe_cards.html
Recipe data
- CSV seeding
project/routes/seed.py - Recipe persistence
project/database/database.py - Recipe model
project/database/models/recipes.py - Recipe catalog CSV
project/static/csv/recipes.csv
Recipe ingestion
- Site crawler
project/sites/soup/findSites.py - Recipe extractor
project/sites/soup/ingredients.py
Other components
- Kitchen user
- Recipe websites
Connections 27
- Kitchen user → Flask app: uses
README.md - Flask app → Home routing: registers
project/app.py - Flask app → Pantry page: registers
project/app.py - Flask app → Recipe search: registers
project/app.py - Flask app → Management routes: registers
project/app.py - Flask app → Recipe lookup routes: registers
project/app.py - Flask app → CSV seeding: registers
project/app.py - Flask app → Recipe persistence: initializes
project/app.py - Home routing → Recipe persistence: checks recipes
project/routes/home.py - Home routing → CSV seeding: redirects when empty
project/routes/home.py - Home routing → Pantry page: redirects
project/routes/home.py - Pantry page → Pantry view: renders
project/routes/ingredients.py - CSV seeding → Recipe catalog CSV: reads
project/routes/seed.py - CSV seeding → Recipe persistence: adds recipes
project/routes/seed.py - CSV seeding → Pantry page: redirects
project/routes/seed.py - Kitchen user → Recipe search: submits ingredients
README.md - Recipe search → Recipe persistence: queries matches
project/routes/recipes.py - Recipe search → Results view: renders
project/routes/recipes.py - Recipe search → Recipe cards: renders more
project/routes/recipes.py - Recipe search → Error view: renders errors
project/routes/recipes.py - Recipe lookup routes → Recipe persistence: queries and deletes
project/routes/fetch.py - Recipe lookup routes → Legacy recipe view: renders
project/routes/fetch.py - Site crawler → Recipe websites: fetches pages
project/sites/soup/findSites.py - Site crawler → Recipe extractor: extracts recipe details
project/sites/soup/findSites.py - Site crawler → Recipe persistence: stores recipes
project/sites/soup/findSites.py - Recipe extractor → Recipe websites: fetches recipe page
project/sites/soup/ingredients.py - Management routes → Site crawler: references crawler
project/routes/management.py