The colour scheme was chosen to provide simple, neutral and fresh look. It was an intention to keep the website for all range of users and avoid colour stereotype typically found in the gyms and sports centres such as bright green or blue.
These colours were used throughout all the pages in such a way as to ensure adequate contrast and good user experience.
Google Fonts were implemented on the website. Roboto with sans-serif as fallback was used thoughout the site to present the content in a clear and legible way.
Structure
Website pages
Simplicity, clarity and ease of navigation between pages were the key aspects for design of this website's structure.
At the top of the page there is a recognisable type of navigation bar with website name on the left side and the navigation links to the right which collapses to hamburger icon on smaller screen sizes. At the bottom of the page there is a footer with links to a contact page and developer's social media (opening in a separate tab/window).
The website consists of the following sections:
Home page with an overview of the content and aim of the website.
Planner page where a not logged-in user can see an example of the workout plan and choose to log in or register. Registered user can either view their workout plans or create a new one.
Choose date screen where user can select the start date of their workout plan.
Add plan page allowing user to create a plan.
View plans page where user can see all their plans.
Edit plan page where user can edit an existing plan.
Delete plan allowing user to delete selected plan.
Exercises list page with catalogue of exercises and a filter option to find a specific exercise.
Exercise detail page where user can see a description of a chosen exercise.
Login page for returning user to log in.
Register page allowing a new user to sign up.
Profile page where user can view details of their account and created plans and also delete their account.
Logout page allowing user to log out of the website.
Contact page with contact form which allows users to send an email to the developer and provide their feedback.
404 error page.
Database
The backend consists of Python built with the Django framework with a database of a Postgres for the deployed version
Two database models contain all fields stored in the database and mimics the structure of what is actually stored in the Postgres database
Show diagram
The following models were created to represent the database model structure for the website:
User Model
The User model contains information about the user. It is part of the Django allauth library
WorkoutPlan Model
The WorkoutPlan model contains the following fields: first_day and User
The model has a one-to-one relationship with User
WorkoutTime Model
The WorkoutTime model contains the workout_time_name field
The model contains information about the workout time (AM or PM)
Workout Model
The Workout model contains the following fields: workout_name, workout_time, workout_plan and day
It contains WorkoutTime as a foreign key
It contains WorkoutPlan as a foreign key
The day field contains the date of week for the plan
Exercise Model
The Exercise model contains the following fields: name, description, body_part, type, equipment, level and image
The model represents an exercise and its details
The name fields contains the exercise name
The description field contains exercise description
It contains BodyPart as a foreign-key
It contains Type as a foreign key
It contains Level as a foreign key
The image field contains the exercise image
BodyPart Model
The model contains the body type category for an exercise
The model contains the following fields: part
Type Model
The model contains the type of an exercise
The model contains the following fields: type
Equipment Model
The model contains the equipment type for an exercise
The model contains the following fields: equipment
It contains Exercise as many-to-many field
Level Model
The model contains the level of an exercise
The model contains the following fields: level
Wireframes
Big screens - laptop & desktopMedium screens - tabletSmall screens - mobile
Technologies Used
Languages & Frameworks
HTML
CSS
Javascript
Python 3.10.2
Django 3.2
Libraries & Tools
Am I Responsive was used to create the multi-device mock-up at the top of this README.md file
The nav bar contains links to Home page, Planner page, Exercise page and Profile page.
Logged-in users will see their name in the nav bar with option on click to either view their profile or log out
Not logged in users will have option to either register or log in
The nav bar is fully responsive and changes to a toggler (hamburger menu) on smaller size screens
The navbar allows user to easily jump to a specific section on the website
User stories covered: 2, 18
See feature images
Home page
Home page includes nav bar, main body and a footer
Home page main body includes description of the website and what its users can find and expect. It has direct links to the planner page and exercises page
User stories covered: 1
See feature images
Footer
A footer is displayed at the bottom of the each page
Contains link to contact form (opening in the same window), social media and GitHub page (opening in a separate window)
Contains copyrights info
User stories covered: 16
See feature images
Sign up / Register
New users can create an account
The user must provide a valid username, password and password confirmation. Email address is optional
User cannot register the same details twice for an account
Once register the users are immediately logged in and taken to the planner page
User stories covered: 3, 14
See feature images
Login
Returning users can login to their account
The user must have an account in the system and they must enter the correct username and password
Both fields are mandatory
Once logged in the user will be navigated to the planner page
User stories covered: 10, 12, 14
See feature images
Logout
Confirmation screen for Logged in user to logout from their account
User stories covered: 21
See feature images
Profile
Logged in user can see details about their account and workouts created
User stories covered: 22
See feature images
Delete account
User have an option to delete their account from the system.
The modal pops up for user to confirm their choice and are warned that this action is irreversible
User stories covered: 23
See feature images
Planner page
There are two views depending whether a user is logged in or not
For users who are not logged in to their account they can see two options to access the planner - log in and sign up. There is also an example of the planner to give user an idea how the ready plan looks like
Logged-in users can see the confirmation message that they've been successfully logged in and they are taken back to the planner page where they can select from two options to either view their current plans or add a new one
User stories covered: 3, 10, 12
See feature images
Choose date
User can select the first day of their plan using the date picker
It is not possible to create two plans starting on the same day. On selection of an incorrect date the user is presented with a warning message to choose another day on the calendar
User stories covered: 4, 13
See feature images
Add plan
User can add plan either from the planner page or the view plans page
There are 28 input fields representing the workout plan. 14 fields for AM and 14 for PM
It is possible to leave some fields blank
For easier navigation on small screen devices the first column is frozen so that user can see it at all times when scrolling right & left between days of the week
User is provided with a feedback message that their plan has been added
User stories covered: 4, 13
See feature images
View plans
User can see all the plans they created
There is one plan per page displayed with the date at the top of the table
User can use the right & left navigation arrows to jump between plans
There are three options available to edit plan, add a new plan or delete the currently viewed plan. These are represented by the font awesome icons below the workout plan table
For easier navigation on small screen devices the first column is frozen so that user can see it at all times when scrolling right & left between days of the week
User stories covered: 4, 8
See feature images
Navigation icons
Located unser the plan in the view plans page
Allow user to edit, add or delete currently displayed plan on the page
User stories covered: 5, 6
See feature images
Edit plan
User can edit a selected plan
This can be done by clicking the first icon from the navigation icons
Date of plan currently being edited is displayed above the plan
User can edit any field and save once happy with edition
For easier navigation on small screen devices the first column is frozen so that user can see it at all times when scrolling right & left between days of the week
User is provided with a feedback message that their plan has been edited
User stories covered: 5
See feature images
Delete plan
User can delete a selected plan
This can be done by clicking the third icon from the navigation icons
The modal pops up for user to confirm the deletion of the plan
User is provided with a feedback message that their plan has been deleted
User stories covered: 6
See feature images
Feedback messages
User is provided with feedback message about the action their performed, eg. added, edited or deleted a plan or logged-in, registered, logged-out, etc.
User stories covered: 7
See feature images
Exercises list page
A page with a catalogue of training exercises targeting different body parts, with various level of difficulty and type of training
User is able to search through all the exercises choosing a specific body part, level of difficulty or type of training. They can also find a specific exercise by typing a part of its name
User stories covered: 9, 11
See feature images
Exercise filter
Filter through all the exercises which allows user to find a specific exercise depending on the targetedd body part, level of difficulty or type of training. There is also an option to find an exercise by typing a part of its name
Filter collapses on smaller screens and expands by clicking on the 'Find an exercise' button
User stories covered: 9
See feature images
Exercise pagination
Allows for display of twelve exercises per page, if there are more, the page is paginated
User to go the the previous/next page or the first/last page of exercises
User stories covered: 20
See feature images
Exercise detail page
Provides overview of the exercise
Users can view a detailed description on how to perform the exercise
User stories covered: 19
See feature images
Contact form
Contact form allows user to contact the developer and send their message or provide feedback
All three fields (username, email and message) on the form are mandatory
Not logged-in users need to provide their name, email address and message content
Username on the form is automatically provided for the logged-in user as well as their email address, if one was given during account registration. If not, the user needs to provide their email address manually.
User stories covered: 16
See feature images
Contact form confirmation
Confirmation message is provided for user that they contact message has been successfully sent
User stories covered: 17
See feature images
Error pages
If a user encounters an error, the relevant error page is displayed (400, 403, 404 or 500)
Lighthouse was used to test the performance, accessibility, best practice and SEO of the site.
Overall the results are very good for the 4 values.
Desktop
View results
Page
Performance (%)
Accessibility (%)
Best Practices (%)
SEO (%)
home/templates/home/index.html
99
100
92
100
home/templates/home/contact.html
100
100
92
100
home/templates/home/profile.html
100
100
92
100
exercises/templates/exercises/exercises_list.html
99
96
92
100
exercises/templates/exercises/exercise.html
100
100
92
100
plannerapp/templates/plannerapp/add_plan.html
100
93
92
100
plannerapp/templates/plannerapp/choose_date.html
100
93
92
100
plannerapp/templates/plannerapp/edit_plan.html
100
93
92
100
plannerapp/templates/plannerapp/planner.html
100
98
92
100
plannerapp/templates/plannerapp/view_plans.html
100
98
92
100
templates/account/login.html
100
100
92
90
templates/account/signup.html
100
100
92
100
templates/account/logout.html
100
100
92
100
Mobile
View results
Page
Performance (%)
Accessibility (%)
Best Practices (%)
SEO (%)
home/templates/home/index.html
99
100
92
100
home/templates/home/contact.html
99
100
92
100
home/templates/home/profile.html
99
100
92
100
exercises/templates/exercises/exercises_list.html
75
98
92
100
exercises/templates/exercises/exercise.html
99
100
92
100
plannerapp/templates/plannerapp/add_plan.html
99
93
92
100
plannerapp/templates/plannerapp/choose_date.html
99
92
92
100
plannerapp/templates/plannerapp/edit_plan.html
98
93
92
100
plannerapp/templates/plannerapp/planner.html
99
98
92
100
plannerapp/templates/plannerapp/view_plans.html
97
98
92
100
templates/account/login.html
98
100
92
92
templates/account/signup.html
99
100
92
100
templates/account/logout.html
99
100
92
100
Wave
The WAVE WebAIM web accessibility evaluation tool was used to test the websites accessibility.
Home pageContact page
- Initially there were 3 errors shown for no labels to input fields. This was fixed by adding labels and setting bootstrap class to sr-only.
Profile pageExercises listExercise detail pageChoose date pageAdd plan
There were 28 errors identified related to missing form labels which were fixed and as a result there are no more errors identified. Same issues for edit plan page.
Edit planPlanner page
Initially there was one error related to the empty table header (1st th element), which was fixed by addiding value to the th element and setting 'visibility: none';
View plans
A few errors related to empty links of navigation icons were corrected by adding aria-hidden='true' and setting bootstrap class to sr-only.
I want only the logged-in users to be able to create their plans
Step
Expected Result
Actual Result
Click on 'Planner' on the navigation bar
For not logged-in users displays an example of the plan and option to log in or register
Works as expected
Screenshot
I want users to be able to create the plan on any day that suits their needs
Step
Expected Result
Actual Result
On planner page click 'Add a new plan'
Displays choose date page with a day picker
Works as expected
Select any date on the calendar other than Monday, eg. Wednesday
Displays add plan page with Wednesday as the first day of the plan
Works as expected
Choose other date of the week as a first day, eg. Saturday
Displays add plan page with Saturday as the first day of the plan
Works as expected
Screenshot
I want data entry to be validated on sign-up page
Step
Expected Result
Actual Result
Click on the 'Log in' on the nav bar and 'Register' from the drop-down menu
Displays Registration page
Works as expected
Input username shorter than 4 characters (eg. xyz)
Prevents registration. Shows warning message to lenghten username text
Works as expected
Input username which has already been taken (eg. Admin)
Prevents registration. Displays 'A user with that username already exists.' message
Works as expected
Input incorrect format of email
Shows warning message to include '@' in the email. Prevents registration
Works as expected
Input 'newuser12' password
Prevents registration. Displays 'The password is too similar to the username' message
Works as expected
Input '12345678' as a password
Prevents registration. Displays 'This password is entirely numeric' message
Works as expected
Input 'testing' as a password
Prevents registration. Displays 'This password is too short. It must contain at least 8 characters' message
Works as expected
Input two different values in 'Password' and 'Password (again)' fields
Prevents registration. Displays 'You must type the same password each time.' message
Works as expected
Screenshot
I want the user to come to a 404 error page instead of having to use the browser back button if they enter a URL that does not exist
Step
Expected Result
Actual Result
Type the wrong page in the www address
Reroute to a customised 404 page
Works as expected
Screenshot
I want user to be able to contact me and provide their feedback
Step
Expected Result
Actual Result
Click on the envelope icon in the footer
Displays contact page with contact form
Works as expected
For user who is not logged-in fill in username, email and message fields and click 'Send message'
Initially displays contact form with no data in and after completion sends the form
Works as expected
For user who is logged-in and did not provide email on registration, fill in email and message fields and click 'Send message'
Initially displays contact form with prepopulated username and after input of email and message sends the form
It did not work when tested. User email was not shown in the received email. The code in home views.py was corrected and the feature re-tested. As documented in the screenshot below, it now works as expected.
For user who is logged-in and provided email on registration, fill in the message fields and click 'Send message'
Initially displays contact form with prepopulated username and email address and sends the form with user message
Works as expected
Screenshot
I want user to receive feedback if their message in contact form has been sent.
Step
Expected Result
Actual Result
Click on the envelope icon in the footer
Displays contact page with contact form
Works as expected
Fill in required contact form fields and click 'Send message' button
Display confirmation message to the user
Works as expected
Screenshot
I want my site to be fully responsive
Step
Expected Result
Actual Result
Change device screen size using chrome dev tools
The web functionality remains the same on various screen sizes
Works as expected
Screenshot
I want to see details of a specific exercise and get an idea how to perform it correctly
Step
Expected Result
Actual Result
Navigate to exercise page in the navigation bar
Displays the list of all exercises paginated by 12
Works as expected
Click 'View' button under an exercise picture and overview
Displays the selected exercise detail page
Works as expected for both logged in and not logged in user
Screenshot
I want a paginated list of exercises so that I can easily select an exercise to view
Step
Expected Result
Actual Result
Navigate to exercise page in the navigation bar
Displays the list of all exercises paginated by 12
Works as expected
Click on the '»' symbol to go to the next page
Displays next available page
Works as expected
Click on the '»»' to jump to the last page
Displays last page
Works as expected
Click on the '«' symbol to go to the previous page
Displays previous available page
Works as expected
Click on the '««' to jump to the first page
Displays first page
Works as expected
Put a filter on exercises and select only exercises for legs from the body part filter and click 'Search'
Displays only exercises matching the search criteria
Works as expected
Test '»»' & '««' symbols to jump to the last / first page
Displays last / first page available
Works as expected
Screenshot
I want to be able to log out from my account
Step
Expected Result
Actual Result
On navigation bar click on username and select 'Log out' from the drop-down menu
Displays the log out page
Works as expected
Click on the 'Log out' button
Logs user out and displays confirmation message
Works as expected
Screenshot
I want to be able to see details of my account on the profile page
Step
Expected Result
Actual Result
On navigation bar click on username and select 'Profile' from the drop-down menu
Displays the profile page
Works as expected
Screenshot
I want to be able to delete my account if I decide to no longer use the app
Step
Expected Result
Actual Result
On navigation bar click on username and select 'Profile' from the drop-down menu
Displays the profile page
Works as expected
Click on the 'Delete profile' button
Pops up modal to confirm user's decision and warns about the irreversibility of this action
Works as expected
Click on the 'Delete' button to confirm the choice
Deletes the user account and displays the message on the main screen
Works as expected
Screenshot
Automated testing
Automated testing was done using the Django's unit tests from a Python standard library module: unittest. The reports were produced using the coverage tool.
Exercises app:
Home app:
Plannerapp app:
Performing tests on various devices
The website was tested using Google Chrome Developer Tools Toggle Device Toolbar to simulate viewports of different devices.
The website was tested on the following devices:
ASUS ZenBook (tablet screen)
Samsung Galaxy Tab A (tablet screen)
Samsung S7 (mobile screen)
Browser compatibility
Testing has been carried out on the following browsers:
Googe Chrome Version 101.0.4951.41 (Official Build) (64-bit)
Firefox Browser 99.0.1 (64-bit)
Microsoft Edge Version 101.0.1210.32 (Official build) (64-bit)
The post method on the date selector did not work properly
Renamed function to 'post', removed 'if request.method == "POST":'. Also standardised the nomenclature of files - changed ‘-‘ to ‘_’
The session ID for the planner could not be obtained
Changed "request.session[workout_plan.pk] = workout_plan.id" into "request.session['workout_plan.id'] = workout_plan.pk"
Unable to save forms from formset due to row containing null values
Added properties to WorkoutPlan models (blank=True, null=False, default='',)
Validation: button being a descendant of an element and vice-versa (e.g. <a href="/planner"><button type="button" class="button">start now</button></a>
Made an a tag with a class of link-button (<a href="/planner" class="link-button mt-2">start now</a>)
Duplicated code of exercise filters with its appearence on the page was set with CSS and media queries which was causing html errors due to duplicated ID tags
Removed duplicated code and wrote JavaScript function to adjust filter drop-down and functionality on the smaller screens
Validation: wave tool identified 3 errors due to no labels to input fields
Fixed by adding labels and setting bootstrap class to sr-only
Validation: wave tool identified 28 errors for missing form fields labels in add plan and edit plan page
Added labels with no visibility set
Validation: error identified for missing 1st table header field
Added value to the th element and set 'visibility: none';
Validation: wave tool identified a few error for empty links of navigation icons
Added aria-hidden='true' and set bootstrap class to sr-only
Testing: no email address shown on email from logged-in user who had to manually input their address to the field on the contact form
Amended view to display contact form in views.py by adding nested if function in if request.user.is_authenticated
Images used in this app were found via Google Search Engine. I'm not able to list all the sources but would like to emphasise that I'm not the author of any of them, except for the background image
Some pictures used in this app were taken from the CrossFit® youtube channel (screenshot), e.g. bench press
As a site user, I can delete my plan so that I can remove it if no longer needed
Acceptance criteria
If the user is logged into the site and they have selected one of their workout plan to be deleted and confirmed the delete request then the plan is deleted
As a site user I can delete my account if I decide to no longer use the app so that my details will be deleted from the database
Acceptance criteria
There should be a button displayed beneath user account details allowing them to delete their profile
When clicking on the button there should be a pop up modal displayed to confirm user's decision and warning about the fact that the action is irreversible
If the user confirmed the delete request then the user account is deleted from the database and user is taken to the home page
A visual relevant feedback message should be displayed
As a site user, I can edit my workout plan so that I can change it at any point
Acceptance criteria
If the user is logged into the site and they have selected one of their workout plan to be edited and have made the appropriate changes, their plan is amended
As a site user, I can create my account so that I am able to plan my workouts
Acceptance criteria
When user clicks on the Login tab in the nav bar and selects to Register, they are taken to the sing up page where they need to fill in all required fields. Then their account will be created.
Once the account has been created, user is taken directly to the planner page
As a site owner, I want users to come to a 404 error page so that they don't have to user the browser back button if they enter a URL that does not exist
Acceptance criteria
There should be a link allowing user to go back to home page without the need to click on the nav bar menu