Meal planning and grocery shopping can be time-consuming and overwhelming tasks, particularly for college students. To address this, we propose YourPalate.
Our ECE 49595O senior design project is an open-source web application that automates the process of meal planning and shopping list creation by utilizing machine learning algorithms, k-nearest neighbors, and public APIs, YourPalate generates personalized weekly meal plans based on user preferences, dietary restrictions, culinary skills, and time constraints.
Unlike traditional recipe platforms that focus on individual meals, YourPalate integrates user data to produce a balanced and diverse meal schedule that encourages culinary exploration while accommodating time and budget limitations. Additionally, the application offers a seamless user experience with features like ADA-compliant design, downloadable meal plans, and dynamically updated shopping lists. We implement YourPalate using Django, TensorFlow, and SQL as the primary technologies, demonstrating its potential as a valuable tool for enhancing dietary habits and simplifying meal preparation
This project is written uses Django, specifically in "debug" mode as well, this means the admin page is accessible from the web with no authentication. Do not host in production environments without disabling this in Djanog's settings.
Because our project is in debug mode the admin page is not secure. It can be acccessed by <DNS NAME>/admin
as opposed to <DNS NAME>/YourPalate/etc
.
This can be disabled in the project by going into settings.py (contained within the web development folder) and setting DEBUG_MODE to false. While it is available however, the page provides valuable testing information about users.
Here it's possible to see all the accounts that have access through your authentication system, and edit or delete them if necessary.
YourPalate register page above
YourPalate login page above
After logging in and creating an account if necessary. The user is directed to our home page. This page contains all the links users need to use the program successfully.
YourPalate home page shown above
Each user is required to create or log into an account when accessing the website.
YourPalate restrictions page shown above
From there they have the option of selecting restrictions including caloric intake goal, vegetarianism, and time restrictions per meal.
YourPalate quiz page shown above
In addition, they can complete our preferences quiz which gets their opinions on several representative recipes in order to provide initial recommendations.
Note, if the user tries to generate recommendations without any preferences or restrictions input they will not be tailored to that user's tastes.
After optionally filling out this information they can use the generate mealplan functionality to create a mealplan and recipe for the week.
YourPalate is meant to be deployed to an AWS EC2 instance, and interact with an RDS MySQL databse.
To deploy the project...
- Clone the repository into an EC2 instance
- run
./setup_docker
script found in the scripts directory - Update
nginx.conf
file in the root directory to reflect your IP and port (default is 8000) - Use
sudo docker compose up -d
to create and deploy the necessary image - The website should then be accessible from the http://<DNS_name> which is accessible from the AWS interface
For our implimentation of this project we used the AWS RDS web service to host a database using MySQL. The connection details should be stored in a .env
file in the root direcoty of the project. If the data is properly formatted then you should be able to connect with no other changes.
The data for YourPalate is contained within several tables in our database. (All stored under the parent User-restrictions
- recipes
- Contains recipe name, id, prep-time, nutrition info, user description, ingredients list, cooking instructions, and tags we added to aid in recommendation.
- user_ratings
- Dual column table where the first column is recipe IDs and the second is a JSON dictionary of each user that has rated that recipe, and what their rating was.
- users_restrictions
- Contains user ID and the restrictions they've input in that portion of the website.
- new_users
- Another dual column table formatted the same as user_ratings.
- Contains user ids and a JSON dictionary of the recipes they've rated alongside the rating itself.
- Our initial dataset contained user rating data, which is how we generate our recommendations. This file is where we store new user information during deployment.
- There's nothing stopping someone from integrating these two tables together, however more user data means the recommendations take longer to generate. (Though they're likely more accurate as well.) At some point there needs to be logic so as to not constantly increase runtime during deployment.
src is split into two parts
- recommender contains our data processing, recommendation algorithms, and updating for our questionnaire
- web_design/sample_site contains our Django frontend work, major parts include
- YourPalate/ directory contains our main app functionality
- templates/ contains all the html files for each webpage in the project
- staticfiles contains css styles and images that are displayed in our project
- sampe_site/ contains Django settings that are configured for our deployment, but can be changed to fit your pipeline and needs