(Developer: Darrach Barneveld)
WorkItOut is an all-in-one fitness app that allows you to enter and track your workouts effortlessly. It also provides personalised nutritional information based on your diet goals, including your BMI, daily calorie intake, and recommended macros. Stay on top of your fitness journey with WorkItOut's intuitive features and achieve a healthier lifestyle with ease.
The primary goal of WorkItOut is to provide a concise application that allows users to easily enter and track their workouts. It also helps users develop a healthy lifestyle by using a comprehensive nutrition database to offer customised nutritional information based on the user and their goals.
- The primary business goal for the WorkItOut app is to attract a significant number of users who are interested in fitness and nutrition.
- Build a strong brand presence: Develop a strong brand identity for WorkItOut through consistent branding, engaging content, and positive user experiences.
- Gather user data for research and insights: Leverage the anonymized and aggregated user data to conduct research and gain valuable insights into fitness trends, user preferences, and behaviour patterns.
- Expand the app's functionality and features: Continuously enhance and expand the app's capabilities to cater to the evolving needs of users.
- Users want to set specific fitness goals, such as weight loss, muscle gain, or improved endurance, and track their progress over time.
- Users expect the app to have an intuitive and user-friendly interface that is easy to navigate and understand.
- Users want the ability to track their workout performance, frequency and durations.
- Users expect the ability to track dietary goals and get a better understanding of recommended nutritional information that is customised based on their current profile.
- Users expect the app to continually evolve and improve based on user feedback and emerging fitness trends
- Individuals who are passionate about fitness, exercise, and maintaining an active lifestyle.
- People who prioritise their health and well-being.
- Individuals who aim to lose weight, build muscle, or transform their bodies.
- Users expect an intuitive and easy-to-navigate interface that allows them to quickly access and utilise the app's features.
- Users require the ability to enter and track their workouts
- Users require a log or history of their workouts for reference and progress tracking
- Users expect the app to offer tools for tracking their daily food intake, including calories, macronutrients, and other nutritional information.
- As a website/business owner, I want to attract a large user base to my fitness app website.
- As a website/business owner, I want to continuously improve the app based on user feedback.
- As a website/business owner, I want to build a strong brand presence for the app.
- As a new user, I want to easily understand the purpose and benefits of the fitness app.
- As a new user, I want a simple and intuitive sign-up process.
- As a new user, I want to track my progress easily. I expect the website to have a user-friendly interface that allows me to log my workouts., track my nutrition, and view my progress in a visually appealing and understandable format.
- As a new user, I want to track my nutrition easily. I wish to have custom breakdowns that are tailored to my fitness goals displayed in an understandable format.
- As an existing user, I want the option to easily log into my account.
- As an existing user, I want to track my ongoing progress.
- As an existing user, I want the app to continuously improve based on user feedback.
- As an existing user, I want to be able to easily gain insight to my nutrition plan based on my current metrics.
The Flowchart created with LucidChart. This is a visual representation of the user flow through the application.
As this was a terminal-based project colours were crafted using Colourma which provided a palette of colours to be used in the text. The website incorporated prominent colours such as red, blue, yellow, green, and white to create an engaging and visually appealing interface.
The general layout was as follows:
- Red - Error Messages
- Green - Success Messages
- BLue - Styling UI
- Yellow - Command Messages
- White - Default Text
The intro hero banner was created using Ascii. The tool Patrojk was used to convert text to a font in Ascii format so as to be printed to the terminal.
The main menu was clearly labelled with 7 different options to choose from. Users can easily enter in their choice by matching the corresponding number.
To present data in a clear and organised manner, the website utilised the Tabulate library, which allowed for easy formatting and creation of tables that were easy to read and comprehend.
The combination of well-chosen colours and structured data tables enhanced the overall user experience and usability of the website.
- Enter workout details: Users can input the type of exercise performed and the duration to accurately track their workouts.
- View all workouts: Users have access to a comprehensive view of their logged workouts, allowing them to review their workout history and monitor their progress.
- BMI calculator: Calculator that enables users to calculate their Body Mass Index as an indicator of their overall health and fitness level.
- Recommended calorie intake: Based on users' diet goals (weight loss, maintenance, or muscle gain), the application provides personalised recommendations for daily calorie intake to support their nutrition objectives.
- Recommended macros: Customised macronutrient ratios (protein, carbohydrates, and fats) based on users' weight, height, age, gender and activity level, helping them optimise their nutrition and meet their fitness goals.
- Editing User Data: Users can update their current data at any time for accurate custom calculations.
- Users can log out at any time.
- Workout plans: Offer pre-designed workout plans tailored to different fitness goals, such as weight loss, muscle gain, or overall fitness. Users can follow these plans for structured and guided training.
- Customizable meal plans: Provide the option to create personalised meal plans based on dietary preferences, restrictions, and fitness goals. Offer suggestions for balanced meals and portion sizes.
- Nutritional tracking and logging: Allow users to log their daily food intake, track calories, macronutrients, and micronutrients, and view nutritional breakdowns for meals and snacks.
-
I want to test the applications ease of navigation to ensure that users can easily find the information
- Users can navigate back to the home page from data tables.
- Users are always redirected back to the selection screen when they have finished inputting a workout.
- The list of features is clear and presented well.
-
I want information to be presented clearly in an easy to understand format
- All data is formatted onto a table with columns and rows.
-
I authentication to be easy and intuitive
- Users are prompted whether to login or signup.
- Each option has clear step by step instructions.
- Any errors are clearly displayed and prompting the user to try again.
-
I want to be able to logout of the application to avoid security issues
- Users can log out at any time from the main menu.
-
I want to immediately understand the application so I can make a quick decision as to whether or not to continue.
- The intro page clearly states the purpose of the application and the brand of the product
-
I want to be able to quickly navigate around the application and understand its features.
- Clear instruction on what options are available
- Simple commands to progress through the applications flow.
-
I want information to be displayed easily with customisable data.
- Users can updated current metrics for accurate customisable data
- Data is displayed in easy to read tables
-
I want the login/signup process to be simple and quick
- The login/signup procedure is a simple 3 step process
- The steps are broken down with prompts and error handling
-
I want to easily be able to log into my account
- Users can easily log into their account with a simple 3 step process
-
I want to be able to view my log of workouts
- Users can view all their workouts displayed in an easy to read table
-
I want to be able to change my current statistical information
- Users can update there current weight, height age and activity level
-
I want to be able to change my fitness goals
- Users can check different diet plans and weight loss journeys based on new input information
While writing the code in Visual Studio Code I used the linter PyLance to guide me in the best practice of formatting and also hints on functional writing.
Code Institute's Python Linter was used to check PEP8 validation. This was used at the end of the project's completion to catch any remaining errors.
PEP Validation: ui.py
- ASCII art creates linting errors. In order to resolve these errors the UI banner logo will have to be removed detracting from the experience of the application.
The Deployed Site was testing using Google Lighthouse to ensure performance was ok on the browser. Markup and CSS validation were used also however their performance was beyond the scope of this project as the Code Institute template was used.
W3C Markup Score W3C CSS Score
Bug | Fix |
---|---|
Login/Signup validation was not rerunning the input option when a invalid input was entered so vaulty data was stored | Added a while not loop that kept prompting the user for valid information if the validator did not return true |
Mutable global variables of google sheets and data frames were at risk of corruption in associated functions | Created all instances of the the variables to be passed as parameters to necessary functions to avoid mutations |
Image urls not rendering correctly on deployment. File Paths were not absolute. | Used the github repo url instead of file path names to render the background and favicon images |
Sensitive API keys were being exposed to the github repo against best practice. | Created a dotenv file to hide sensitive information and used the python-dotenv module to access the information. All config vars were added to heroku |
Multiple users could use the same email meaning validation was an issue and updating worksheets. | Created a function which check the validity of an email and check the current database to see if it was not already registered |
Sometimes the APIs were down and unable to display information which crashed the application. | Added a try and except block which caught the errors and displayed an error message to the user |
Pep8 Errors on Ascii art due to invalid escape sequence. | In order to display the ascii art to provide a great UX I had to allow for this linting error to occur |
Code Institute Python Essentials Template for creating a terminal UI where the python code will generate its output to the user.
Steps to reproduce:
- Visit the Code Institute Essentials Template and select use this template.
- Select create a new repository.
- Create a Heroku account.
- Sign up with a student account for credits. (optional)
- Once logged in, select create a new app.
- Select an app name and region.
- Select deployment method as connect to github.
- Find the repo containing the python code created with the CI template and connect it.
- Enable automatic deploys and select the main branch
- In the settings tab select reveal config vars. Input the required hidden variables.
- For this project a creds.json and RAPID_API_HOST, RAPID_API_KEY were created as config vars.
- Select nodejs and python as the buildpack.
- Deploy.
- Go to the GitHub repository
- Click on Fork button in the upper right-hand corner
- Edit the repository name and description if desired
- Click the green create fork button
- Go to the GitHub repository
- Locate the green Code button above the list of files and click it
- Select if you prefer to clone using HTTPS, SSH, or Github CLI and click the copy button to copy the URL to your clipboard
- Open Git Bash
- Change the current working directory to the one where you want the cloned directory
- Type git clone and paste the URL from the clipboard ($ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY)
- Press Enter to create your local clone.
- Go to the GitHub repository
- Locate the green Code button above the list of files and click it
- From the dropdown menu select download Zip.
- Download and open the zip file to run in an editor
- Background Image Background Image
- Favicon Barbell Image Flaticon
Credit to Berat Zorlu for the typing animation and colours. By understanding his code I was able to implement a typing and colour scheme to my project.
Credit to Berat Zorlu for his readme. This readme was used as a template on how to correctly display bugs and fixes in markup.
Credit to useriasminna for the clearing console commands to give a fresh terminal screen to present user data.
Credit to Dr Angela Yu and 100 days of Python for a greater understanding of error handling in python.
Credit to Pylance for helping me to indent and format code, document functions and modules and to follow python best practices.
Credit to Thomas & Asclepius for helping create a basic python email validator function.
Credit to Gspread documentation for a better understanding of gspread methods.
- Git
- GitHub
- VS Code
- Favicon.io - favicon generator
- Coolors - Theme generator
- RapidAPI - Fitness Calcultor
- Chat-GPT
- Google Lighthouse
- Code Institutes Pep8 Checker
- W3C Markup Validation Service
- W3C CSS Validation Service
- Pylance Validator
- Lucid Chart
- Heroku
- google.oauth2.service_account - Access to credentials in creds.json
- gspread - Linking and reading google spreadsheet
- os - To get access to the operating system
- time - Allowing sleep delays to terminal UI
- datetime - Formatting dates for workouts
- tabulate - Formatting data into tables
- colorma - Adding colour to the terminal display
- pandas - Easier configuration of data objects from csv
- re - Allowing reading of regex
- sys - Sleep characters in text animation
- dotenv - Hiding and reading config variables
Special thanks to all my fellow Code Institute students of April 2023 for their invaluable bug testing contributions. A special shoutout to Shane Donlon, Alan Bushell and my brother, Cuan Barneveld for their suggestions for improvements.
I would also like to thank Beret Zorlu in helping me with my Readme format and allowing me to inspect his project on how to best layout certain functions and readme items.
Your efforts have been immensely helpful in improving the application. Thank you all!