How nawaz-builds/pantry-chef works
PantryChef lets a cook upload an ingredient photo, set dietary and cooking preferences, and receive AI-generated recipes; signed-in users can save and manage recipes. The frontend handles authentication and recipe workflows through HTTP helpers, while FastAPI owns the endpoints, calls the AI provider for ingredient detection and recipe generation, and persists accounts, sessions, and saved recipes through SQLAlchemy. The excerpts establish these major paths, but do not show the complete generation response handling or all backend helper details.
Main entry points: app.py FastAPI endpoints · App.jsx Recipe workspace · api.js HTTP client · login.jsx Login and signup
Components 12
Web client
- Recipe workspace
frontend/src/App.jsx - Login and signup
frontend/src/login.jsx - HTTP client
frontend/src/api.js
API service
- FastAPI endpoints
src/app/app.py - Recipe schemas
src/app/schemas.py - Ingredient detection
src/app/app.py - Recipe generation
src/app/app.py
Persistence and auth
- Password hashing
src/app/security.py - Database session and models
src/app/database.py - Relational database
Other components
- Cook
- Groq AI service
Connections 13
- Cook → Recipe workspace: submits preferences
frontend/src/App.jsx - Recipe workspace → Login and signup: renders when signed out
frontend/src/App.jsx - Login and signup → HTTP client: requests authentication
frontend/src/login.jsx - Recipe workspace → HTTP client: requests recipes and saved items
frontend/src/App.jsx - HTTP client → FastAPI endpoints: sends HTTP requests
frontend/src/api.js - FastAPI endpoints → Ingredient detection: handles recipe upload
src/app/app.py - Ingredient detection → Groq AI service: detects ingredients
src/app/app.py - FastAPI endpoints → Recipe generation: generates recipes
src/app/app.py - Recipe generation → Groq AI service: requests recipes
src/app/app.py - FastAPI endpoints → Recipe schemas: uses response schemas
src/app/app.py - FastAPI endpoints → Password hashing: hashes and verifies passwords
src/app/app.py - FastAPI endpoints → Database session and models: queries accounts and recipes
src/app/app.py - Database session and models → Relational database: persists records