A smart recipe generation and grocery management application that helps busy students reduce food waste, track spending, and discover recipes based on what they already have.
Between classes, labs, and social life, it's hard to keep track of what you have, what to cook, and when food will go bad. SaveBites addresses this by:
- Scanning receipts to automatically extract and track groceries
- Reminding users of upcoming expiration dates
- Suggesting personalized recipes that utilize ingredients already in your pantry
- Recommending informed spending habits to reduce waste and save money
- Receipt Upload & OCR Processing: Upload receipt images and automatically extract ingredient lists
- Pantry Management: Track your grocery inventory with expiration date reminders
- AI-Powered Recipe Generation: Get personalized recipe suggestions based on your dietary preferences, budget, and available time
- Preference Customization: Set dietary restrictions, cuisine preferences, available appliances, and cooking time constraints
- User Profiles: Create personalized accounts to store preferences and track your grocery history
- Smart Filtering: Filter recipes by difficulty, cooking time, cuisine type, and estimated cost
- React - UI framework
- React Router - Client-side routing
- CSS - Styling
- Node.js + Express - RESTful API
- MongoDB - Database for user profiles and pantry data
- Mongoose - ODM for MongoDB
- Multer - File upload handling
- Bcrypt - Password hashing
- CORS - Cross-origin resource sharing
- Python - Data processing and ML
- Google Gemini API - LLM-based recipe generation
- OCR - Receipt image text extraction
- Image Processing - Receipt cleaning and preprocessing
SaveBites/
├── frontend/ # React application
│ ├── src/
│ │ ├── App.js # Main app component
│ │ ├── Generate.js # Recipe generation interface
│ │ ├── UploadReceipts.js # Receipt upload component
│ │ ├── Login.js # User authentication
│ │ ├── UserProfile.js # User profile management
│ │ ├── Recipes.js # Recipe display
│ │ └── ... # Other components
│ └── public/ # Static files
│
├── backend/ # Express API
│ ├── api_call.js # API endpoints
│ ├── mongodb.js # Database configuration
│ ├── UserProfile.js # User management
│ ├── control.py # Backend orchestration
│ └── package.json # Dependencies
│
├── llm_pipeline/ # Recipe generation engine
│ ├── llm_recipe_generator.py # Gemini API integration
│ ├── LLMValidator.py # Recipe validation
│ └── ranker.py # Recipe ranking
│
├── data_classes/ # Shared data models
│ ├── UserProfile.py # User data structure
│ ├── UserPantry.py # Pantry inventory
│ └── Recipes.py # Recipe data structure
│
├── Providers/ # External service providers
│ └── LLM_test.py # LLM testing utilities
│
└── validator/ # Data validation
└── Validator.py # Input validation
- Node.js and npm
- Python 3.8+
- MongoDB (local or Atlas)
- Google Gemini API key
-
Clone the repository
git clone <repository-url> cd SaveBites
-
Setup Backend
cd backend npm install # Create .env file with your MongoDB URI and API keys cp env_template .env # Edit .env with your credentials
-
Setup Frontend
cd frontend npm install -
Setup Python Environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt # If available, or install packages manually
Create a .env file in the backend directory with:
MONGODB_URI=your_mongodb_connection_string
MY_API_KEY=your_google_gemini_api_key
PORT=5000
-
Start MongoDB (if running locally)
mongod
-
Start Backend
cd backend node api_call.js -
Start Frontend (in a new terminal)
cd frontend npm start -
The application will open at
http://localhost:3000
- Sign Up / Log In - Create an account or log in with existing credentials
- Set Preferences - Configure dietary restrictions, cuisine preferences, budget, and available appliances
- Upload Receipts - Scan grocery receipts to add items to your pantry
- Generate Recipes - Click "Generate" to get AI-powered recipe suggestions
- View Your Pantry - Track ingredients and receive expiration date reminders
- Save Recipes - Bookmark favorite recipes for later
- Hero - Landing page
- Login/Signup - Authentication
- UserProfile - User settings and preferences
- UploadReceipts - Grocery inventory management
- Generate - Recipe generation interface
- Recipes - View generated and saved recipes
- Preferences - Configure cooking preferences
- User authentication and management
- Receipt upload and processing
- Pantry inventory endpoints
- Recipe generation requests
- User preference management
- RecipeLLM - Generates personalized recipes using Google Gemini
- LLMValidator - Validates and verifies recipe data
- Ranker - Ranks recipes by relevance to user preferences
This project was built collaboratively with contributions from:
- Frontend Development
- Backend Development
- ML/LLM Pipeline Development
- UI/UX Design
SaveBites - Reducing waste, one recipe at a time. 🍽️