Git Product home page Git Product logo

ci-pp4-booking-system's Introduction

Ironworks Booking System

Full-Stack Toolkit - Portfolio Project 4

Project Overview

Main Mockup

Link to live site


Table of Contents

UX

Project Goals

Primary goals of the website for site users are as follows:

  • To register for an account on the website and receive an email after successful registration
  • To login or logout from the website
  • To recover my password in case it is forgotten
  • To have a personalised user profile with showing booked classes
  • To post a comment on a blog post
  • To view website news, and comment on a news item

Primary goals of the website for the site owners are as follows:

  • To add, edit and delete PT sessions
  • To add, edit and delete website news and events information

User Stories

User

  1. As a User I can view what classes are taught so that I can attend a class.
  2. As a User I can book a fitness session so that I can attend a PT session.
  3. As a User I can find links to the gyms social media pages so that I can connect via social channels.
  4. As a User I can sign up to a newsletter so that keep up-to-date with whats happening at the gym.
  5. As a User I can log in to my account once I click on the verification link in the email I receive after sign up so that I can view my profile information and booked PT sessions.
  6. As a User I can comment on a news post so that I can engage with the site and staff members.
  7. As a User I can view pictures of gym and the various activities that happen within it so that I can get a feel for the place should I be thinking of joining.

Returning User

  1. As a Returning User I can log in and book another session so that continue with my fitness journey.
  2. As a Returning User I can log in and cancel a session and will be asked to confirm the cancellation so that I can update the PT if my plans change.
  3. As a Returning User I can log in and amend a session so that I can update the PT if my plans change.

User and Staff Member

  1. As a User/Staff member I can request a new password if I forget my current password via an email so that I can log into my account should I forget my password.

Staff Member

  1. As a Staff Member I can edit and/or delete news and event posts so that I can amend incorrect details or remove out of date posts.
  2. As a Staff Member I can add a new news and event post so that I can keep the site looking fresh with new updates.
  3. As a Staff Member I can confirm amendments/deletions so that I don’t make changes I can’t undo.
  4. As a Staff Member I can create a post and set it to draft so that Users cannot see the post until published.
  5. As a Staff Member I can create a post and set it to published so that Users can see the post when ready.
  6. As a Staff Member I can approve comments before they are viewable on the site so that inappropriate comments are not posted to the site.

Site Owner

  1. As a Site Owner I can view my site on different devices so that the users can interact no matter which device they use.
  2. As a Site Owner I can allow users to register with the site so that users can book classes online.
  3. As a Site Owner I can users be navigated to the applicable 400, 403, 404 or 500 error page if they encounter an error on the site so that they understand the error that has occurred and easily find their way back to the home page without using the browser buttons and don't leave the site.
  4. As a Site Owner I can have users verify their new accounts after registering via email so that I know they are a valid user of the site.

Design Choices

Colors

Colour Pallette

Fonts

I have used Sans Pro for the body text and Poppins for the headers. Both fonts are from google fonts and compliment each other well. I have used sans-serif as a back up font should the browser the user is using cannot load the google fonts.

Wireframes

The wireframes for the site were created in Adobe XD and are linked below for Desktop, Tablet and Mobile devices.

Homepage

  1. Desktop
  2. Tablet
  3. Mobile

Classes

  1. Desktop
  2. Tablet
  3. Mobile

About

  1. Desktop
  2. Tablet
  3. Mobile

Contact

  1. Desktop
  2. Tablet
  3. Mobile

Book a Session

  1. Desktop
  2. Tablet
  3. Mobile

Booked Sessions

  1. Desktop
  2. Tablet
  3. Mobile

Database

Physical database model

The below diagram shows all of the fields stored in the database, with details of their data types, and how it is structured.

Database model

Technologies Used

Languages

Frameworks, libraries and other tools

  • Git Used for version control of the site and push code from VScode to Github
  • Github Used as the remote repository to store the code. Github pages is also where the live site is hosted.
  • Visual Studio Code Used as the IDE for writing the code and file management
  • Adobe XD Used to create wireframes for the site
  • Adobe Photoshop Used to edit and crop all image sizes on the site as original filesize were too large and affected performance
  • Google Fonts Used for Spectral font throughout the site
  • Font Awesome Used for various icons throughout the site
  • Bootstrap Used for creating a responsive navigation bar used in every header of each page. Also used for creting a modal for a booking form used on each page. Modals were used for services page in which an accordion was created using bootstrap for each service category. Bootstrap also used for creating a carousel for the review section
  • jQuery Used for cleaner JavaScript code where necessary and datepicker function for booking form
  • Google Maps Used to embed a map to the salon located on the contact us page
  • Am I responsive Used to create a mulit-device mock-up that is shown at the top of the README file
  • YouTube Used to host a video of the salons work and create an embedded link to use on the site

Validation

HTML Validation

W3c Markup Validation Service has been used to validate all of the HTML code within the site. All pages have passed with 0 errors and 0 warnings. Click on the below to see each screenshot:

  1. Homepage
  2. About
  3. Classes
  4. Contact
  5. Login
  6. Sign Up
  7. Bookings

CSS Validation

W3c CSS Validation Service was used to validate the CSS of the site. The stylesheet.css file returned with 0 errors. When running on the whole page it returned with 17 errors all of which can be attributed to Bootstrap v5.0. See below link to screenshot:

  1. Whole Page
  2. Style.css Stylesheet
  3. Home.css Stylesheet

Accessibility Validation

WAVE WebAIM web accessibility evaluation tool has been used to validate the site to the recognised standards when it comes to accessibility. All pages have passed with 0 errors apart from 1 contrast error. Click on the below to see each screenshot:

  1. Homepage
  2. About
  3. Classes
  4. Contact
  5. Login

Pyhton - PEP8

PEP8 has been used to validate all of the python code within the site. All files have passed with 0 errors. Click on the below to see each screenshot:

  1. Home - Views
  2. PT Bookings - Forms
  3. PT Bookings - Models
  4. PT Bookings - Views

JavaScrtip - JSHint

JSHint has been used to validate all of the JavaScript code within the site. All files have passes with 0 errors. Click on the below to see each screenshot:

  1. email.js
  2. script.js

Testing of User Stories

1. As a User I can view what classes are taught so that I can attend a class

Feature Action Expected Result Actual Result
Open classes page Click on classes nav link in nav bar Classes page loads with class timetable Works as expected
Screenshot to show user story test

2. As a User I can book a fitness session so that I can attend a PT session.

Feature Action Expected Result Actual Result
Book a session on bookings page Login into account, click on PT sessions link in navbar, click on book a pt session in dropdown, fill out form, click book Booking is logged and confirmation noted back to user Works as expected
Screenshot to show user story test

3. As a User I can find links to the gyms social media pages so that I can connect via social channels.

Feature Action Expected Result Actual Result
Click social media links Scroll down to footer where social media links are Clicking a link takes user to that social media site Works as expected
Screenshot to show user story test

4. As a User I can sign up to a newsletter so that keep up-to-date with whats happening at the gym.

Feature Action Expected Result Actual Result
Sign up for newsletter Scroll down to footer, complete newsletter sign up form, click submit Clicking submit triggers an automatic email reply confirming they have signed up to newsletter Works as expected
Screenshot 1 to show user story test
Screenshot 2 to show user story test

5. As a User I can log in to my account once I click on the verification link in the email I receive after sign up so that I can view my profile information and booked PT sessions.

Feature Action Expected Result Actual Result
Login into account after email verifcation is completed At homepage click on Login/Sign Up, click on sign up link in blue, complete form and click sign up, check emails and click confirmation link, click confirm on opened page, sign in with new account details and recieve confirmation back New account will be created, confirmation via email and able to login in with new details Works as expected
Screenshot to show user story test

8. As a Returning User I can log in and book another session so that continue with my fitness journey.

Feature Action Expected Result Actual Result
Book a session on bookings page Login into account, click on PT sessions link in navbar, click on book a pt session in dropdown, fill out form, click book Booking is logged and confirmation noted back to user Works as expected
Screenshot to show user story test

9. As a Returning User I can log in and cancel a session and will be asked to confirm the cancellation so that I can update the PT if my plans change.

Feature Action Expected Result Actual Result
Cancel a booked session Login into account, click on PT sessions link in navbar, click on PT sessions then view booked sessions from dropdown, click cancel on the booking you want to cancel, confirm you want to proceed with the cancellation, confirmation given to user that booking is cancelled Booking is cancelled and confirmation noted back to user Works as expected
Screenshot to show user story test

10. As a Returning User I can log in and amend a session so that I can update the PT if my plans change.

Feature Action Expected Result Actual Result
Amend a booked session Login into account, click on PT sessions link in navbar, click on PT sessions then view booked sessions from dropdown, click amend on the booking you want to amend, change the details you want to on the form, click amend and confirmation given back that it has been updated Booking is amended and confirmation noted back to user Works as expected
Screenshot to show user story test

Bugs

  • Bug: Deployment to heroku did not work with a "auth_user" error.
  • Fix: Uninstall django-allauth and reset databases and mirgrations.
  • Bug: Forms not having labels for accessibility.
  • Fix: Add title property to input so labels don't need to be used and affect look of site.
  • Bug: Site not responsive when viewed on smaller screen.
  • Fix: Made use of more bootstrap classes and grid to make site responsive.
  • Bug: Bootstrap components not working.
  • Fix: Updated app to newest bootstrap version and all components now working.
  • Bug: Datepicker auto selecting random date when amneding a booking.
  • Fix: Updated view function so that correct date format was used.

Deployment

Creating an Application with Heroku

Code Institute tutorial and Django Blog cheatsheat were followed to complete deployment.

  • Enter following command in the terminal so that the relevant files needed for Heroku to install your project dependencies are created - pip3 freeze --local > requirements.txt. A Procfile is also required that specifies the commands that are executed by the app on startup.
  1. Go to Heroku.com and log in or create and account if you do not already have one.
  2. Click the New dropdown and select Create New App.
  3. Enter a name for your new project, all Heroku apps need to have a unique name, you will be prompted if you need to change it.
  4. Select the region you are working in.

Heroku Settings

Environment Variables need to be set up - this is key to make sure your application is deployed properly.

  • In the resources tab install 'Heroku Postgres'
  • In the Settings tab, click on Reveal Config Vars and set the following variables:
    • SECRET_KEY - your chosen key
    • CLOUDINARY_URL - your Cloudinary API environment variable

Heroku Deployment

In the Deploy tab:

  1. Connect your Heroku account to your Github Repository following these steps:
    1. Click the Deploy tab then Github-Connect to Github.
    2. Enter GitHub repository name and click Search.
    3. Choose the correct repository and click Connect.
  2. Choose to deploy the project manually whilst getting deployment correct. Automatic deployment can be set after and will generate a new application every time you push a change to Github.
  3. Click Deploy Branch your application will be built and once complete click open app to view deployed application.

Credit

  • Bootstrap for the following components: navbar, modals
  • Colormind for creating the colour pallette
  • YouTube for many tutorial videos on different javascript aspects.
  • w3school and mdn web docs for a great resource when stuck with how to get a specific piece of javascript code to work.
  • stackoverflow for various issues along the way
  • Simple is better than complex for datepicker

Acknowledgements

  • To Mo Shami, my mentor, for yet again getting me through this with great advice and support.
  • To the Code Institute slack community for finding out great advice, guidance and resources.

ci-pp4-booking-system's People

Contributors

charliewatson1504 avatar

Stargazers

 avatar

Watchers

 avatar

ci-pp4-booking-system's Issues

USER STORY: Gallery page set up for site

As a User I can view pictures of the gym and the various activities that happen within it so that I can get a feel for the place should I be thinking of joining.

USER STORY: Redirect of user if error page is found

As a Site Owner I can users be navigated to the applicable 400, 403, 404 or 500 error page if they encounter an error on the site so that they understand the error that has occurred and easily find their way back to the home page without using the browser buttons and don't leave the site.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.