Oile995 / Project4

0 stars 0 forks source link

Workout-Buddy

am I responsive screenshot

A Workout helper website.

A Workout-tracker/helper website showcasing workouts created by either any User or Admin. The site allows users to create a profile and in turn create, read, edit and delete workouts they have created.

- By Oscar Eriksson

Live site


Repository


Table of contents

Back to Top

  1. UX
  2. Agile Development
  3. Features
  4. Features Left to Implement
  5. Technology used
  6. Testing
  7. Bugs
  8. Credits
  9. Content
  10. Acknowledgements

UX

Pre-project Planning

Database Structure

Lucid Diagram

Database Schema

AllAuth User

id Field
User OneToOneField
Username Charfield
email EmailField
Password Charfield

Workout Model

id Field
Title Charfield
Slug Slugfield
Creator Foreignkey
Updated on Datefield
Featured Image Cloudinary image
Excerpt TextField
Created on Datefield
Number_of_Exercises Integerfield
Status IntegerField
Approved Boolean

Exercise Model

id Field
Title Charfield
Workout Foreignkey
Slug Slugfield
Body TextField
Exercise Image Cloudinary image
Muscle Image Cloudinary image
Approved Boolean
Exercises number Integerfield

UX design

Overview

Workout Buddy is a fictional brand name for a website that helps users in different ways when it comes to workouts and exercises. The main goal is for the users to view all the pre-existing workouts, create, edit or delete their own created workouts and get some insight and knowledge on how to do those exercises that’s detailed with description and pictures of the workouts.

Design

The main goal for the design was: simple and easy to maneuver with bright colors, clear and easy to follow instructions, so it’s suitable even for the older generation. In the future implement User and tracking features which will allow for statistics an records.

Site User

Goals for the website

Wireframes

Wireframes

Wireframe for project with future featured Profile page in the bottom left.

Wireframe

My goal for this project was to create a simple but friendly looking website that allowed users to create edit and delete workouts.

Agile Development

Agile Overview

This project was started alongside a GitHub Projects Page to track and manage the expected workload ahead. The initial aim was to track steps and features needed to get the functionallity and layout as per project goal. Ultimatly I ended up bury myself in epics at a time as my inital user stories were not specific or framed in an accurate way to fit the project outcome.

To see Kanban please click here.

At the initial stages I decided on 6 core requirements for the project and 2 Nice to haves but not important. (NINTH).

From these I added the user stories, acceptance criteria and the tasks so I can track my work effectively. I did however have to update some of the userstories as their task and accptance critera was flawed from the begining. (As this was my first agile project)

My plan was that, once I completed a task I would tick the appropriate box and if all parts of this story were completed I would move it from in progress to completed. However, due to getting stuck early in the project with both the Agile preparation and getting the Project baseline part and models created, I did not update the Agile tool as offen as I initially intended.

I did for some of the milestones but primarly for future project I want to update the agile tool with the following:

User stories

Completed User Stories

To view any of the expanded details of the user stories please click on a user story below to be taken to the Kanban project. If the specific user story does not auto pop up then please click on it from the project page and you will see the details and comments.

  1. USER STORY: Deploy Website#6
  2. USER STORY: Admin Panel#12
  3. USER STORY: Create an Workout (CRUD)#3
  4. USER STORY: Index Workout list pagination#1
  5. USER STORY: Make a account#4
  6. USER STORY: View Workouts#13
  7. USER STORY: Edit Workout (CRUD)#11
  8. USER STORY: Delete Workout (CRUD)#14
  9. USER STORY: Add media to Workout and exercises#10

The following User stories were not completed as they were deemed to be not necessary for this project at this time but are indications of possible future features:

Should User stories
  1. USER STORY: Use Workout#2

    NINTH User stories
  2. USER STORY: Add Likes and Comments#8

  3. USER STORY: View Likes and Comments #9

  4. USER STORY: Track Workout#5

While USER STORY: Events#2 has some parts completed in terms of displaying exercises completed with checkbox, I decided against implementing a more indepth tracking system at this time due to upcoming submission deadlines and because the core requirements of the project have been satisfied elsewhere.

Back to Top of page


Features

User based Features Implemented:

Account restrictions:

Website features:

Dynamic Creation and Updating form chaining
Workout listing view
Workout detail view

index.html

Desktop

Desktop Navigation

Home


Hero Image


Published Workouts list


Footer


Mobile

Mobile Navigation

Mobile Navigation


Menu collapsed


Menu Expanded

Profile.html

User Profile

Profile


Workout_details.html

Desktop

Workout details and Exercise list

Details


Mobile

User profile on mobile

User Mobile

Workout/Exercise Form.html

Desktop

Workout and Exercise form

Form


Delete.html

Desktop

Delete Workout

Delete


Sign-up.html

Desktop

Register Allauth user

Delete

Back to Top of page


Features left to Implement

Back to Top of page


Technology Used

Html

CSS

JavaScript

Python

Django

Bootstrap 5

Allauth

GitHub

Heroku

ElephanSQL

-Heroku PostgreSQL was used as the database for this project during development and in production.

Cloudinary

Git

Lucidcharts

Whimsical

Back to Top of page


Testing

Testing Phase

Manual Testing

Each user story and feature was manually tested in line with intended functionality on both desktop & mobile.

If the intended outcome completes then this will be flagged as pass. If it does not then this is a fail.

Account Registration Tests

Test Result
User can create account Pass
User can log into account Pass
User can log out of account Pass

User Navigation Tests

Test Result
User can navigate to Create Workout Pass
User can access My Page Pass
User access all the pre-existing workouts Pass
SuperUser can access admin panel Pass

Account Security Tests

Test Result
Non logged in user cannot create/edit/delete workouts Pass
Non logged in user cannot access My Page Pass
Non superuser cannot access admin panel Pass

Create Workout Tests

Test Result
User can create a workout when all necessary the fields are complete Pass
User tries to create workout with empty form Fail
User tries to create a workout without workout title Fail
User tries to create a workout without number of exercise Fail
If user tries to fill out form with faulty data, error message is shown and user can try again Pass
If user selects the "Draft" option the workout wont be shown on the home page Pass
If user selects the "Publish" option the workout won't be shown on the home page until approved by admin Pass

Edit/Delete Workout Tests

Test Result
User and superuser can edit their workout Pass
User and superuser can delete their workout Pass
If user is not logged in edit and delete option does not show Pass
If workout is not users edit and delete option does not show Pass
If user tries to update form with faulty data, error message is shown and user can try again Pass

Workout Tests

Test Result
User can view published workouts regardless if they are logged in Pass
User can scroll in pagination of workout on home page Pass
User can select Exercises and details is updated dynamically in workout details Pass
User can check the checkbox for Exercise once done for visual confirmation Pass

Profile Tests

Test Result
User can see paginated list of only workouts created by said user Pass
User can see paginated list of workouts regardless of status Pass

Admin Tests

Test Result
Admin can add/update/delete workouts&exercises from front-end Pass
Admin can add workouts from adminpanel Pass
Admin can add exercises from adminpanel Pass
Admin can update workouts from adminpanel Pass
Admin can update exercises from adminpanel Pass
Admin can approve workouts from adminpanel Pass
Admin can delete workouts from adminpanel Pass
Items they display correctly on front-end when updated/added Pass

Google Lighthouse Testing

Desktop

index.html

Google Lighthouse Index

Create_workout.html

Google Lighthouse Profile

Workout_details.html

Google Lighthouse Profile

HTML W3 Validation

index.html

W3 Validation checker

Result: No Errors

CSS Validation

w3 Jigsaw CSS checker

Result: Pass - No Errors

Jshint Validation

Jshint JS checker

Result: Pass - No Errors, only 1 warning

Pip8 Validation

Models.py, as it was the only file with any warnings

Jshint JS checker

Result: Pass - No Errors, only 2 warning but I did not want to try indenting 3-4 lines, due to the length

Back to Top of page


Bugs

Images does not load in Heroku.


Create form page not loading


Update Workout crash


Update Workout crash


Exercise image did not load


Back to Top of page


Credits

Code institue Django3blog
venezuelan-food-cookbook
Shutterstock and Canva

Back to Top of page


Content & Resources

Django Documentation
Stackoverflow
W3 Schools
Code Institute

Back to Top of page


Acknowledgements

Leonardo-Simeone, Alan-Bushell and Code-Institute

As my project based heavily on all 3 example project and even if I didnt use some of the repos code, i used the knowledge i could gather from study them.

My lovely Wife

Being patient while I tried to lock myself in my study for days leading up to the deadline and limiting other responsibilities.