How pritam844/sank-hack works
Fridge2Table turns a user’s leftover ingredients into ranked rescue recipes, then supports recipe details, grocery ordering, and saved favorites. The main search flow is visible in the sampled App and service code; the README documents additional sorting, shopping, and saved-recipe capabilities. Some component wiring is unsampled, so the graph includes documented UI branches but avoids inferring their internal calls.
Main entry points: App.jsx App state · api.js Recipe API service · RecipeCard.jsx Recipe card · RecipeModal.jsx Recipe details
Components 20
Recipe experience
- React entry
src/main.jsx - App state
src/App.jsx - Ingredient input
src/components/IngredientInput.jsx - Recipe results
src/components/RecipeGrid.jsx - Recipe card
src/components/RecipeCard.jsx - Recipe details
src/components/RecipeModal.jsx - Grocery links
src/components/MissingIngredientItem.jsx - Rescue tips
src/components/RescueTips.jsx - Header navigation
src/components/Header.jsx - Bottom navigation
src/components/BottomNav.jsx - Footer
src/components/Footer.jsx
Recipe matching
- Recipe API service
src/services/api.js - Local matching
src/services/recipeDatabase.js
Saved favorites
- Saved recipes
src/components/SavedRecipes.jsx - Firebase setup
src/firebase.js
External services
- Realtime Database
- Spoonacular API
- Browser storage
- Grocery platforms
Other components
- Home cook
Connections 25
- Home cook → Ingredient input: enters ingredients
- React entry → App state: renders
- Ingredient input → App state: submits ingredients
- App state → Recipe API service: requests matches
- Recipe API service → Spoonacular API: queries recipes
- Recipe API service → Local matching: falls back
- Local matching → Recipe API service: returns matches
- Spoonacular API → Recipe API service: returns recipes
- App state → Recipe results: shows results
- Recipe results → Recipe card: renders cards
- Recipe card → App state: selects or saves
- App state → Recipe details: opens recipe
- Recipe details → Recipe API service: requests details
- Recipe details → Grocery links: shows missing items
- Recipe card → Grocery links: shows missing items
- Grocery links → Grocery platforms: opens ingredient search
- App state → Saved recipes: shows favorites
- App state → Firebase setup: uses database setup
- Firebase setup → Realtime Database: initializes connection
- App state → Realtime Database: syncs favorites
- App state → Browser storage: uses offline fallback
- App state → Header navigation: renders navigation
- App state → Bottom navigation: renders navigation
- App state → Rescue tips: shows tips tab
- App state → Footer: renders footer