This web application allows users to input ingredients they have at home and receive potential recipes that can be made. If all the ingredients are not available for an exact match, the system suggests "near" recipes and provides AI-powered ingredient substitutions.
https://client-dot-round-office-437918-e3.ue.r.appspot.com/
- Ingredient Input & Recipe Matching: Users can input available ingredients and receive recipes with exact matches.
- AI-Powered Substitutions: Automatically suggests replacements for missing ingredients.
- Near Recipe Suggestions: Suggests recipes even when not all ingredients are available.
- Recipe Filtering: Enables filtering by cuisine, dietary restrictions, and preparation time.
- Fixed an issue where certain recipe matches returned incorrect results.
- Resolved API timeout issues with the OpenAI integration.
- Addressed a bug where recipe filtering did not apply properly to dietary restrictions.
- Some substitutions may not account for dietary restrictions.
- Rare cases where duplicate "near" recipes are displayed.
- Limited recipes for niche dietary requirements (e.g., keto).
Planned Improvements:
- Expand substitution database for more dietary-specific recommendations.
- Implement user feedback for recipe accuracy.
-
Ingredient Input & Recipe Matching
- Enter ingredients you have at home.
- Receive recipes that match those ingredients.
-
Near Recipe Suggestions
- Get alternative "near" recipes if you’re missing some ingredients.
- View AI-generated ingredient substitutions based on availability.
-
Recipe Filtering
- Filter recipes by cuisine type, dietary restrictions, or preparation time.
-
AI-Powered Ingredient Substitutions
- Suggests substitutions for missing ingredients based on similarity.
- Example: Use yogurt as a substitute for sour cream.
- Frontend: React.js
- Backend: Node.js with Express
- Database: MongoDB
- AI Tool: GPT-4o (for AI-powered ingredient substitutions)
- Version Control: GitHub
- Deployment: Google Cloud Platform (GCP)
- Node.js (v16 or higher)
- npm (v8 or higher)
- MongoDB server
The following libraries are required:
- React.js
- Express.js
- Clone the repository:
git clone https://github.com/CS-3300-P8/RecipeBuilder.git
- Navigate to the project directory:
cd RECIPEBUILDER
Install required packages for both client and server:
cd client
npm install
cd ../server
npm install- Start the development servers:
- In the
serverdirectory:npm run dev
- In the
clientdirectory:npm run dev
- In the
- Set up API Key:
Add your OpenAI API key in thekeys.envfile underserver:OPENAI_API_KEY=your-key-here
-
Blank Screen in Client App:
- Ensure the OpenAI API key is configured correctly in
keys.env. - Restart the client after changes using:
npm run dev
- Ensure the OpenAI API key is configured correctly in
-
Server Crashing:
- Confirm MongoDB is running locally or provide a valid connection string in the
keys.envfile.
- Confirm MongoDB is running locally or provide a valid connection string in the
-
Missing Dependencies:
- Reinstall dependencies with:
npm install
- Reinstall dependencies with:
-
Q: Can I use this without an OpenAI API key?
A: No, the AI-powered substitution feature requires a valid API key. -
Q: How can I report a bug?
A: Open an issue on our GitHub repository.
- Factory Pattern: Dynamically creates recipe objects based on user input.
- Command Pattern: Modulates backend logic for reusability in future development.
- Mediator Pattern: Centralizes API calls for simplicity when altering backend.
The project includes comprehensive testing:
- Unit Testing: For individual functions, using Jest and Mocha.
- Integration Testing: Ensures frontend and backend work together, using Postman and Supertest.
- System Testing: Verifies complete functionality, using Selenium for browser-based tests.
AI-Specific Testing
- Blackbox Testing: Tests input/output behavior of AI-powered substitutions and pantry management/database operations.
- Whitebox Testing: Debugs internal logic for substitutions using TensorFlow.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Make your changes.
- Commit your changes (
git commit -m 'Add feature'). - Push to the branch (
git push origin feature-branch). - Open a pull request.
This project is licensed under the MIT License.