How yolalee96/pantrysentry works
PantrySentry is a household food-inventory and waste-reduction app. The principal workflow is managing household stock, then using it for expiry reminders, recipe suggestions and cooking, donations, and environmental-impact tracking. Its Flutter client communicates with an Express API; the API’s domain routes use MySQL and shared authorization and product-matching utilities. Recognition and AI recipes use Gemini. The README content was not provided, so coverage follows the source index and tree; frontend details and unsampled route behavior are represented only at subsystem level.
Main entry points: app.js HTTP routing · db.js MySQL connection · recipes.js Recipes and cooking · household_access.js Membership checks
Components 25
Mobile client
- PantrySentry app
pantrysentry-frontend/lib/main.dart
API domains
- API entry
pantrysentry-backend/api/index.js - HTTP routing
pantrysentry-backend/src/app.js - Accounts and auth
pantrysentry-backend/src/routes/auth.js - Households
pantrysentry-backend/src/routes/households.js - Food inventory
pantrysentry-backend/src/routes/inventory.js - Food recognition
pantrysentry-backend/src/routes/recognition.js - Shelf life
pantrysentry-backend/src/routes/shelf_life.js - Expiry reminders
pantrysentry-backend/src/routes/reminders.js - Activity history
pantrysentry-backend/src/routes/activity.js - Recipes and cooking
pantrysentry-backend/src/routes/recipes.js - Food donations
pantrysentry-backend/src/routes/donations.js - Environmental impact
pantrysentry-backend/src/routes/environmental_impact.js - Token authorization
pantrysentry-backend/src/util/auth.js - Membership checks
pantrysentry-backend/src/util/household_access.js
Matching and AI
- Gemini integration
pantrysentry-backend/src/recipe_sources/gemini.js - Product matching
pantrysentry-backend/src/util/product_reference.js - Recipe matching
pantrysentry-backend/src/util/recipe_matching.js - AI recipe validation
pantrysentry-backend/src/util/ai_recipes.js - Waste assessment
pantrysentry-backend/src/util/waste_impact.js - Emission factor matching
pantrysentry-backend/src/util/factor_matching.js
Persistence
- MySQL connection
pantrysentry-backend/src/db.js - PantrySentry database
Other components
- Household user
- Google Gemini
Connections 44
- Household user → PantrySentry app: uses
- PantrySentry app → API entry: API requests
- API entry → HTTP routing: loads
pantrysentry-backend/api/index.js - HTTP routing → Accounts and auth: mounts public auth
pantrysentry-backend/src/app.js - HTTP routing → Households: mounts routes
pantrysentry-backend/src/app.js - HTTP routing → Food inventory: mounts routes
pantrysentry-backend/src/app.js - HTTP routing → Food recognition: mounts routes
pantrysentry-backend/src/app.js - HTTP routing → Shelf life: mounts routes
pantrysentry-backend/src/app.js - HTTP routing → Expiry reminders: mounts routes
pantrysentry-backend/src/app.js - HTTP routing → Activity history: mounts routes
pantrysentry-backend/src/app.js - HTTP routing → Recipes and cooking: mounts routes
pantrysentry-backend/src/app.js - HTTP routing → Food donations: mounts routes
pantrysentry-backend/src/app.js - HTTP routing → Environmental impact: mounts routes
pantrysentry-backend/src/app.js - HTTP routing → Token authorization: protects routes
pantrysentry-backend/src/app.js - Accounts and auth → MySQL connection: queries
pantrysentry-backend/src/routes/auth.js - Accounts and auth → Token authorization: signs and verifies tokens
pantrysentry-backend/src/routes/auth.js - MySQL connection → PantrySentry database: connects to
pantrysentry-backend/src/db.js - Households → MySQL connection: queries
pantrysentry-backend/src/routes/households.js - Food inventory → MySQL connection: queries
pantrysentry-backend/src/routes/inventory.js - Food recognition → MySQL connection: queries
pantrysentry-backend/src/routes/recognition.js - Shelf life → MySQL connection: queries
pantrysentry-backend/src/routes/shelf_life.js - Expiry reminders → MySQL connection: queries
pantrysentry-backend/src/routes/reminders.js - Activity history → MySQL connection: queries
pantrysentry-backend/src/routes/activity.js - Recipes and cooking → MySQL connection: queries
pantrysentry-backend/src/routes/recipes.js - Food donations → MySQL connection: queries
pantrysentry-backend/src/routes/donations.js - Environmental impact → MySQL connection: queries
pantrysentry-backend/src/routes/environmental_impact.js - Households → Membership checks: checks membership
pantrysentry-backend/src/routes/households.js - Food inventory → Membership checks: checks membership
pantrysentry-backend/src/routes/inventory.js - Recipes and cooking → Membership checks: checks membership
pantrysentry-backend/src/routes/recipes.js - Food donations → Membership checks: checks membership
pantrysentry-backend/src/routes/donations.js - Environmental impact → Membership checks: checks membership
pantrysentry-backend/src/routes/environmental_impact.js - Membership checks → MySQL connection: checks membership in
pantrysentry-backend/src/util/household_access.js - Recipes and cooking → Product matching: matches inventory
pantrysentry-backend/src/routes/recipes.js - Recipes and cooking → Recipe matching: ranks suggestions
pantrysentry-backend/src/routes/recipes.js - Recipes and cooking → AI recipe validation: validates AI recipes
pantrysentry-backend/src/routes/recipes.js - Recipes and cooking → Gemini integration: requests suggestions
pantrysentry-backend/src/routes/recipes.js - Gemini integration → Google Gemini: calls API
pantrysentry-backend/src/recipe_sources/gemini.js - Food recognition → Gemini integration: uses generation
pantrysentry-backend/src/routes/recognition.js - Food recognition → Product matching: matches products
pantrysentry-backend/src/routes/recognition.js - AI recipe validation → Product matching: matches products
pantrysentry-backend/src/util/ai_recipes.js - Food inventory → Product matching: resolves products
pantrysentry-backend/src/routes/inventory.js - Environmental impact → Waste assessment: assesses discards
pantrysentry-backend/src/routes/environmental_impact.js - Waste assessment → Product matching: resolves references
pantrysentry-backend/src/util/waste_impact.js - Waste assessment → Emission factor matching: matches factors
pantrysentry-backend/src/util/waste_impact.js