Inspiration Description: There are countless people who decide they want to start working out. However, there’s a lot of knowledge to take in when it comes to deciding on your diet. While there are many sources on the internet such as videos, there’s many different factors that play in what you eat. With that in mind, answers can get very lengthy. That’s why we decided to create an app that takes in 4 basic pieces of information, and outputs it with straight-to-the-point results for those who want to figure out what they should eat to get started. Functionality: This app allows users to input their age, weight, workout plan, and your planned diet to give you a personalized breakdown of the foods you should eat (in terms of breakfast, lunch, dinner, snacks) and workout plan, as well as some tips for your workout. Development Process: The frontend of the app is built using JavaFX, which provides a variety of tools for handling graphics and user-inputs. The backend of the app is built using a Java library for the Google Bard API. Once the program receives various inputs from the user, upon the submit button being clicked, it will query the Bard API for a response (in this case, it will be questions based on fitness workout plans). After getting the responses, the program will utilize the output from Bard to display the relevant information to the user. This is done in the backend by analyzing Bard’s output, and with a variety of string reading logic and manipulation, we are able to generate a concise, user-friendly, personalized workout plan to display to the user. Challenges: There were many challenges whilst developing our application. First, we had to figure out how to actually utilize the Bard API. After an hour of research, we found a Java library for the Bard API and got it to function. There were also challenges when interpreting the output from Bard, as we needed to analyze the output to only take out what we wanted. After a lot of string reading and manipulating logic, we were able to develop methods to take out and format the information from Bard’s output. Finally, we had to develop the front-end of the application using JavaFX, which was the most challenging portion of our application. We wanted to provide a drop-down for some of the options the user would present to the program, which required some research to get it working. Drop-downs are not initialized with any values by default, so we needed to initialize it with a list of strings on the scene’s initialization. We also wanted the application to navigate the user to a new screen after clicking the submit button, which required switching between multiple scenes. This required, again, more research, and combined with our past experience with iOS development with Swift, we were able to combine two controllers (input handling and scene switching) to allow the main scene to both accept user inputs and have the ability to switch between scenes. Accomplishments: We are proud of our front-end application, as this was our very first time using JavaFX. Given the limited time constraints and our complete lack of experience in dealing with front-end, we think it turned out great. We are also proud of the work being done on the backend, as it took a bit of research and work to get the Bard API working. The variety of methods used to interpret Bard’s output, and to take out only the necessary portions to display to the user in a concise manner, was quite difficult. Learnings: Throughout the development process, we learned how to import and utilize the Bard API, as well as an introduction to using HTTP/REST based APIs. We also learned the basics of how to use JavaFX to create the front-end for our application, including handling user inputs and how scenebuilder is used to link the GUI to the backend code. Future Plans: Future plans for the application includes a built-in calendar and routines throughout the day that the user can follow with their newly created workout plan. We also plan to create a more visually appealing user interface for ease in use, with pictures, animated buttons/effects, and a polished layout. Programming Language: The primary programming language used for the application is Java.
Log in or sign up for Devpost to join the conversation.