How nicolas-gls/recipe-website works
Recipe Hub serves a browser UI and JSON API for browsing/searching recipes, viewing serving-scaled details, and combining selected recipes into a priced shopping list. FastAPI routes delegate to catalog and shopping services, which read the SQLite recipe, ingredient, and supermarket-product data. Startup initializes the schema and seeds an empty database from JSON/CSV inputs. The README documents browser-local selection storage and uploaded recipe images. The graph follows shown route calls and database access; templates and local-storage behavior are included at the documented level, without inferring template internals.
Main entry points: main.py FastAPI web app · seed.py Database seeding · database.py SQLite access and schema · services.py Recipe search and details
Components 15
Web interface
- Server launcher
app.py - FastAPI web app
app/main.py - Rendered pages
app/templates
Recipe catalog
- Catalog API routes
app/catalog/routes.py - Catalog schemas
app/catalog/models.py - Recipe search and details
app/catalog/services.py
Shopping calculation
- Shopping API route
app/shopping/routes.py - Shopping schemas
app/shopping/models.py - Aggregation and pricing
app/shopping/services.py
Persistence and setup
- Runtime configuration
app/config.py - SQLite access and schema
app/database.py - Database seeding
app/seed.py - Recipe source data
data/recipes.json - Product and price data
data/supermarket_products.csv
Other components
- Browser user
Connections 23
- Browser user → Server launcher: starts app
README.md - Server launcher → FastAPI web app: runs server
app.py - Browser user → FastAPI web app: uses web/API
README.md - FastAPI web app → Catalog API routes: mounts router
app/main.py - FastAPI web app → Shopping API route: mounts router
app/main.py - FastAPI web app → Recipe search and details: calls services
app/main.py - FastAPI web app → Aggregation and pricing: calls service
app/main.py - FastAPI web app → Rendered pages: renders pages
app/main.py - FastAPI web app → SQLite access and schema: checks database
app/main.py - FastAPI web app → Database seeding: seeds if empty
app/main.py - Catalog API routes → Recipe search and details: delegates
app/catalog/routes.py - Catalog API routes → Catalog schemas: validates as
app/catalog/routes.py - Recipe search and details → Catalog schemas: builds responses
app/catalog/services.py - Recipe search and details → SQLite access and schema: queries recipes
app/catalog/services.py - Shopping API route → Aggregation and pricing: delegates
app/shopping/routes.py - Shopping API route → Shopping schemas: accepts and returns
app/shopping/routes.py - Aggregation and pricing → Shopping schemas: builds results
app/shopping/services.py - Aggregation and pricing → SQLite access and schema: queries ingredients and products
app/shopping/services.py - SQLite access and schema → Runtime configuration: uses database path
app/database.py - Database seeding → SQLite access and schema: resets and populates
app/seed.py - Database seeding → Runtime configuration: reads source paths
app/seed.py - Database seeding → Recipe source data: loads recipes
app/seed.py - Database seeding → Product and price data: loads products
app/seed.py