- General Info
- Features
- Technologies Used
- Setup
- Usage
- Test cases
- Updates from last milestone
- Acknowledgements
Is there someone u know who always skips meals because they are too preoccupied with their work? Do you have a friend that always asks you what to eat during lunch? The objective of this project is to develop a Telegram bot that assists individuals in building and maintaining healthy eating habits. Our project aims to address the common dilemma of deciding what to have for lunch by providing personalized meal recommendations and guidance and also the challenge of diet procrastination and meal skipping. We chose to create a telegram bot because of the ease of use and accessibility, where users do not need to download another application.
I have bad eating habits. As a student, I tend to be so occupied with my assignments, tutorials and classes that I will skip meals or even forget them. When my friend sees me, she will always ask "u got eat?". Unfortunately, skipping meals is also quite a common occurrence in this busy Singapore. I hope to use this opportunity to help fellow meal forgotters and myself to build a healthy eating habit, along with the added extension of this application to build a healthier lifestyle.
- I am a user who wants to log meals so that I can keep track of what I eat.
- I am an indecisive user who wants to get recommendations for what to eat so that I do not need to spend time everyday thinking “what should I eat”
- I am a user who wants to improve my eating habits.I will be able to see my meal analytics so that I can make changes to my diet.
- I am a user who wants to improve my eating habits, I will be able to daily reminders for when to eat and drink water so that I will not forget to skip my meals and hydrate even when I am busy with work.
- Log Meal
- View Past Meals
- Meal Analytics
- Set daily reminders
- Food Recommendations
- Cancellation
- python 3.11
- mysql
- db4free (for mysql hosting)
- UptimeRobot for continuous polling.
Here are the steps to follow before starting gotEat
:
Create an account on db4free
The database created can be accessed from the side panel with the value from the MySQL database name in the signup.
Create an account on UptimeRobot
-
For the Monitor type: select HTTP(s).
-
Friendly Name: Choose any name you would like to call your Monitor.
-
URL (or IP): enter your web server link. In the example below, we used the online IDE, replit.
-
Monitoring Interval and Monitor timeout: Default values
-
Tick the alert notify checkbox. This is to notify you via email in the event when your server is down or ran into any problems.
Overall this would be how it would look like. Click the Create Monitor button at the bottom. Now you would be able to monitor the status of the telegram bot.
pip install python-telegram-bot
pip install mysql-connector-python
pip install apscheduler
- to ensure that you are at the right bot, refer to the two pictures below.
Landing page After 'Start' -
select the date of entry for the meal you would like to log. Ranges -3 days from the current date.
-
Input the time of the meal in the HH:MM format (24- hour clock)
Log time Log time confirmation - There are four options: "Breakfast", "Lunch", "Dinner" or "Snack"
- Select one of the four options that best describe the meal you want to log
- Your option is successfully recorded when you see "You have selected (option)"
-
input the meal that you are eating
-
gotEat will find the option closest to the name of meal entered
-
select the option presented
-
"Meal entry logged successfully!"
This feature allows user to cancel during the middle of their queries, restarting their entry
- user can go back to the start and log their meals
This feature allows user to visit your entries of your previously logged meals. Users are able to choose based on categories.
This feature allows user to see analytical data from the recorded meals. Items in the analytics include:
- Total Number of meals eaten
- Breakdown of meals
- Average Meal time of each category
- Favourite Food (Food with highest frequency)
This feature allows user to set daily reminders either to eat or to drink water. Frequency of reminder sent are defined by the user. All reminders for the day will be stopped at 11pm.
This feature allows user to be recommended. Recommendation is based on
- Category which has 3 options: (Dessert, Snack, Main)
- Halal preferrence
In Mile-Stone 3, we managed to complete most of the items that we set out to accomplish from MS2
- Fix Database design. User can only log one entry of meal due to database schema.
- subsequent entry leads to primary key duplicate error.
- Fix set reminders feature.
- user can set meal reminders and reminder to take a break.
- This is optional to the user.
- Fix recommendation for users.
- Add the option to view and delete records for users.
- Fix invalid time in logmeal
- send telegram stickers
- user statistics
- download a summary of what the user has eaten during a predefined interval from the database.
- Improve on the search of possible food.
- We have made significant updates to our database hosting.
- Previously, our users had to download a hosting solution, which essentially transformed their own computers into servers. Our database was also local for each user.
- Currently, we have now transitioned to an online hosting platform. Our database is also available online.
- As part of this update, we have replaced XAMMP, the previous hosting tool, with PHPAdmin.
- Improved the functions for easier user interation
- For example:
- custom calender
- inline keyboards to minimise user activity.
- Searching for possible food when user input what they ate.
- This project was inspired by our everyday busy life in NUS and our unhealthy eating habits
- This project was based many tutorials.
- Many thanks to our advisor
-