petrugio / lovely-smiles-dental

0 stars 1 forks source link

Lovely Smiles Dental

Lovely Smiles Dental


View the repository in GitHub here

View the live project here

Table of Contents


User Experience

Goals

The goal of this website is to provide information about dental practice services offered, location, contact information also users and staff with the ability to create an account for the purpose of creating, viewing, updating and deleting appointments.

Planning

Significant amount of time was devoted to planing the layout and structure of the agile board.
Having a meeting by myself and changing the hat from product owner to user and then to developer was decided to use Github projects as a agile tool for the Lovely smiles dental PP4 project. From the time remaining to submit a working project was decided to split the development into 5 iteration each lasting 1 week.

After the project scope was clearly defined, following the process of creating milestones/epics, I added User Stories and Tasks to the Backlog and prioritized them using M.o.S.C.o.W prioritization technique and assigned them to the appropriate milestone/epic and iteration.

Lovely Smiles Dental Github project

Bellow are screenshots of Agile planing, prioritization and development:

Screenshots
![Backlog_1](documentation/agile/backlog_1.jpg) ![Backlog](documentation/agile/backlog.jpg) ![Current iteration](documentation/agile/current.jpg) ![Status](documentation/agile/status.jpg) ![Epics](documentation/agile/epics.jpg) ![M.o.S.C.o.W](documentation/agile/moscow.jpg)

Epics and User Stories


Epic: Create initial Django Setup


Epic: Create App and pages

USER STORY: Pages

As a user I can view site content so that what is the purpose of the site and what benefits it can offer

Acceptance Criteria:


Epic: Navigation

USER STORY: Site navigation

As a user I can navigate to different pages so that I can see the content on that page

Acceptance Criteria:

USER STORY: Footer and social media

As a user I can find links to social media sites so that I can engage with service provider on popular social media sites

Acceptance Criteria:


Epic: Pages content

USER STORY: Contact information

As a user I can easily find contact information so that I can contact the owner if I am interested in the services offered

Acceptance Criteria:

USER STORY: Specific benefits

As a user I can find specific benefits offered by this particular service provider so that receive those benefits

Acceptance Criteria:

USER STORY: Services offered

As a user I can find services offered page so that I can decide if I need those services

Acceptance Criteria:

USER STORY: Map

As a user I can find service provider on a map so that easily find my way to specified address

Acceptance Criteria:

USER STORY: Opening hours

As a user I can find opening hours for service provider so that I can know when to make an appointment

Acceptance Criteria:


Epic: Authentication

USER STORY: Registration

As a user I can register an account so that I can access the full range of features on the site

Acceptance Criteria:

USER STORY: Login and Logout

As a registered user I can login and logout of the site so that I can access manage my appointments

Acceptance Criteria:


Epic: Appointment management

USER STORY: Make appointment

As a logged-in user I can make an appointment so that I can receive the services offered by the service provider

Acceptance Criteria:

USER STORY: Manage appointment

As a logged-in user I can manage an appointment (CRUD functionality) so that I can receive the services offered by the service provider at a convenient time

Acceptance Criteria:

USER STORY: View alerts

As a user I can view alerts and feedback messages so that I can be sure when task/action has been completed successfully or not

Acceptance Criteria:


Epic: Testing and Deployment

USER STORY: Website works as intended

As a user/logged-in user/admin I can use the website for its intended purpose so that I accomplish the required task/goal

Acceptance Criteria:

Issues:


Epic: Documentation

Issues:

Features

Landing page

USER STORY: Pages

This page welcomes any potential user. It has a hero image of a woman smiling - hinting to the user that the user may have this as well if he/ she decides to avail of the services offered by this dental practice. In the center of the page there is a jumbotron with a greeting message and a call to action - to make an appointment (consultation is free).

Screenshots
![Home page](documentation/features/home_desk.jpg) ![Home page tablet](documentation/features/home_tab.jpg) ![Home page mobile](documentation/features/home_mob.jpg)

Navigation menu

USER STORY: Site navigation

At the top of the page the user can find the navbar. On the left the logo of the practice is displayed. If clicked - takes the user to homepage. And on the right the navigation links. Navigation menu is visible on all pages. Navigation links change depending on user's logged in status:

The navigation links available for guest (not logged in):

Screenshots
![Nav guest](documentation/features/nav_outside.jpg)

The navigation links that are available for logged in users and staff:

Screenshots
![Nav logged in user](documentation/features/nav_inside.jpg)

Contact details

USER STORY: Contact information

Bellow the jumbotron the user can see contact details: email, phone and address. If the user clicks on any of them he/she will be redirected to specific app (both on desktop or mobile):

Screenshots
![Contact](documentation/features/contact.jpg)

Specific Benefits

USER STORY: Specific benefits

Below the contact section the user can find Specific Benefits section. The user may decide to avail of these benefits if making an appointment.

Screenshots
![Benefits](documentation/features/benefit.jpg)

Map and opening hours

USER STORY: Map

USER STORY: Opening hours

A mini-map with dental practice location and a table with opening hours is displayed on the homepage.

Screenshots
![Map and opening hours](documentation/features/map_hours.jpg)

Footer

USER STORY: Footer and social media

And lastly in the bottom of the page ( footer) the user can see who developed this site and find different social links of the developer. Footer is visible on all pages.

Screenshots
![Footer](documentation/features/footer.jpg)

Services page

USER STORY: Services offered

On the services page the user can find out more information about services offered by the dental practice. Each service offered has a short description, an image associated with that service and a button that takes the user to the Make Appointment page. Services are available as an drop down option when making an appointment. All services are:

Screenshots
![Services page](documentation/features/services_desk.jpg) ![Services tablet](documentation/features/services_tab.jpg) ![Services mobile](documentation/features/services_mob.jpg)

Register Page

USER STORY: Registration

Due to the fact that this is a demo website, I decided to go for a simpler registration process. Registration is handled by Django library Allauth and it is done using username and password. Email is optional and back-end functionality to receive emails was not activated.

Screenshots
![Register page](documentation/features/register_desk.jpg) ![Register tablet](documentation/features/register_tab.jpg) ![Register mobile](documentation/features/register_mob.jpg)

Upon successful registration the user is redirected to services page.

Screenshots
![Registered](documentation/features/registered.jpg)

Login Page

USER STORY: Login and Logout

Login page requires username and password that were selected/provided during registration. Upon successful registration user is redirected to services page. If the user pressed Appointments link in the Navigation menu prior to be logged in or registered - the user will be redirected to the appointments page after successful registration or sign in.

Screenshots
![Login page](documentation/features/sign_in_desk.jpg) ![Login tablet](documentation/features/sign_in_tab.jpg) ![Login mobile](documentation/features/sign_in_mob.jpg)

Make Appointments Page

USER STORY: Make appointment

Make Appointments Page can be view by a logged in user. Here the user can make an appointment that he/she may need. Placeholders are in place to aid the user in filling out the form correctly. Form validation is in place for each input option.

The user is presented with a form that takes some basic information:

Screenshots
![Make Appointments page](documentation/features/make_desk.jpg) ![Make Appointments tablet](documentation/features/make_tab.jpg) ![Make Appointments mobile](documentation/features/make_mob.jpg)

Appointments Page

USER STORY: Manage appointment

Appointments Page can be view by a logged in user. Here the user can see the upcoming appointments that he/she may have. The user can see the appointment up until present day, if the appointment is past due the user cannot longer see it.

Screenshots
![Appointments page](documentation/features/app_desk.jpg) ![Appointments tablet](documentation/features/app_tab.jpg) ![Appointments mobile](documentation/features/app_mob.jpg)

A user with staff status (which can be assigned to any registered user from the Django Admin panel) can see future appointments for all users and also can see past due appointments up to 5 days in the past for the purpose of editing or deleting them.

Screenshots
![Staff assign](documentation/features/staff_assign.jpg) ![Staff view](documentation/features/staff_view.jpg) ![Staff confirm](documentation/features/staff_confirm.jpg) ![Staff delete](documentation/features/staff_delete.jpg)

Feedback messages

USER STORY: View alerts

A feedback message is displayed for 2 seconds at the top of the page to let the user know that action was successful. If for any reason the javascript code will not work and the feedback message will not be dismissed automatically then the user can manually disable the message by pressing the X button on the right side of the message.

Feedback messages that disappear automatically:

Screenshots
![Message sign in/register](documentation/features/mess_sign_in.jpg) ![Message sign in out ](documentation/features/mess_sign_out.jpg) ![Message created](documentation/features/mess_created.jpg) ![Message updated](documentation/features/mess_updated.jpg) ![Message deleted](documentation/features/mess_deleted.jpg)

Feedback messages that stay on until user closes them by pressing X button:

Screenshots
![Invalid date](documentation/features/invalid_date.jpg) ![Invalid time](documentation/features/invalid_time.jpg)

Design

Wireframes

Wireframes were made using Balsamiq. During development effort was put in to make the final website look and function as described in wireframe.

Screenshots
Homepage ![Homepage](documentation/wireframes/Homepage.png) Services ![Services](documentation/wireframes/Services.png) Register ![Register](documentation/wireframes/Register.png) Login ![Login](documentation/wireframes/Login.png) Logout ![Logout](documentation/wireframes/Logout.png) Make appointment ![Make appointment](documentation/wireframes/Make_appointment.png) Appointments ![Appointments](documentation/wireframes/Appointments.png)

Database

A custom data model for Appointments was set up. Bellow is the data model and Entity Relationship Diagram created with DBeaver Universal Database Tool:

Screenshots
![Data model](documentation/db/data_model.jpg) ![ER Diagram](documentation/db/er_diagram.jpg)

After the initial Django setup, database was migrated to Heroku Postgres.

Fonts

Google font Latto was used for the website.

Color Scheme

Contrast checker tool from monsido.com was used to find a good contrast ratio (Contrast Ratio: 8.16 / 1).

Screenshots
![Contrast checker tool](documentation/features/contrast.jpg)

Testing

USER STORY: Website works as intended

Responsive Design

Chrome Developer Tools and Pesticide Chrome extension was regularly used during development to test responsiveness on different screen sizes.
To make the website responsive Bootstrap 4 and CSS was used. Responsiveness for different screen sizes can be seen in the features section above.

Validator Testing

HTML5

Code passed official W3C Validator testing.

Screenshots
![homepage](documentation/testing/w3c/home.jpg) ![sevices](documentation/testing/w3c/services.jpg) ![signup](documentation/testing/w3c/signup.jpg) ![login](documentation/testing/w3c/login.jpg)

CSS3

Css passed official W3C Validator testing. There were no mistakes in my CSS.

Due to the fact that CSS is stored on Cloudinary when testing the CSS by URI a cloudinary Bad Request comes out. If you click on the cloudinary link -> copy CSS and then test by pasting the code directly in W3C validator then no mistakes are found, only some warnings relating to bootstrap.

Screenshots
By direct input ![CSS](documentation/testing/w3c/css.jpg) By URI ![CSS link](documentation/testing/w3c/css_link.jpg)

Javascript

The alert function was tested with jshint.com. No mistakes found.

Screenshots
![JS](documentation/testing/js/js.jpg)

Python

The code was tested with pycodestyle extension in Gitpod. No mistakes found. Few generic Django lines of code are showing a warning of "Line too long". When i tied to make the lines shorter by indenting them with \ or "" python methods - Django breaks and cannot run any code.
Same with cloudinary code on line 141. Since this is generic Django code it was left as it is.

Screenshots
![Python](documentation/testing/python/pycodestyle.jpg)

Lighthouse

Pages were tested with Chrome Developer Tools using the Lighthouse resource.

Screenshots
![Homepage](documentation/testing/lighthouse/lighthouse_home.jpg) ![Sevices](documentation/testing/lighthouse/lighthouse_services.jpg) ![Make](documentation/testing/lighthouse/lighthouse_make.jpg) ![Delete](documentation/testing/lighthouse/lighthouse_delete.jpg)

Accessibility

Accessibility was tested during development using Wave Chrome extension and after final deployment was tested with accessibilitytest.org

Accessibility test result

Screenshots
![Accessibility score](documentation/testing/accessability/accessibility_score.jpg)

Functional Testing

Functional Testing can be view in Functional_Testing.md

Browser Testing

Pages behave as expected in all browsers tested. The website was tested in Chrome, Firefox, Brave Browser, Edge and Opera.

Bugs

Fixed Bugs

Error: That port is already in use Fix

Error during migration. Was fixed by moving allauth installed apps to the bottom of the list in settings.py:

Screenshots
Bug ![Allauth bug](documentation/testing/bugs/migration_bug.jpg) Fix ![Allauth bug fix](documentation/testing/bugs/migration_bug_fix.jpg)

Bug fix during testing:

Screenshots
Bug ![Sign up bug](documentation/testing/bugs/allauth_signup_bug.jpg) Fix ![Sign up bug fix](documentation/testing/bugs/allauth_signup_bug_fix.jpg)
Screenshots
Bug ![Iframe bug](documentation/testing/bugs/iframe_bug.jpg) Fix ![Iframe bug fix](documentation/testing/bugs/iframe_bug_fix.jpg)

Unfixed Bugs

Screenshots
![Table](documentation/testing/bugs/table.gif)

Deployment

Following the advice of our instructor 'deploy early to avoid problems down the line' the website was deployed to Heroku after initial installation. Steps taken are described here:

Epic: Create initial Django Setup

By mistake I installed Django 4 and started to have some dependencies issues and installed Django 3.2 instead.

Heroku

The site was deployed to Heroku. The steps to deploy are as follows:

Version Control

gitpod.io was used as IDE and for Git version control.

After the initial Django setup a Git branch called develop was used as development branch.

Code was regularly committed to the develop branch and only after a user story or a acceptance criteria was working locally a Pull Request was opened on Github.com and code from develop branch was merged into main branch.

Screenshots
![Pull Requests](documentation/agile/pr.jpg)

How to Clone this repository

Here's few steps how to clone the repository:

Or if you wan to fork it, straight from the repository - go to the top right corner and press - Fork

Technologies used

Frameworks

Django 3.2

Tools and tips

What's the best way to store a phone number in Django models?

Credits

Images were taken from Pexels.com

A list of dental procedures were taken from www.nhs.uk

Contact

My name is Petru Chelban I am a full-stack software developer student at Code Institute, where I am pursuing Diploma in Full Stack Software Development.

Please do not hesitate to contact me if you require any additional information about this project or wish to discuss work/collaboration opportunities.

Acknowledgments

A big shout out to Code Institute for providing me with the opportunity to create this project.

I'd like to thank my mentor Daisy McGirr for invaluable guidance and for reviewing my website.