StevenWeir038 / Kennel39

A CRUD based booking site for a small dog grooming business
2 stars 2 forks source link
django

Kennel39

Welcome to Kennel 39! A booking site for a small dog grooming business.

Click here to view the live site.

Mockup

Scenario

A business tends to perform better with a steady stream of customers. It can accept walk ins and/or utilise some sort of appointment booking system. At its simplest, this could be using a phone with a handwritten diary to record client names and their booking times.

Consider Kennel39, a hypothetical startup business whose only employee is its sole trader/owner. Phone calls to book appointments can occur at anytime during business hours. Such calls can be inconvenient when lathering shampoo into someone's pet.

It could help the business if customers book an appointment using a webform. This method has the advantage that appointments can also be made outside standard working hours. In theory, this increases accessibility to business thus improving productivity and turnover.

Another valid concern is that some people prefer to book a service passively using the web as opposed to making a phonecall, especially those of a shy disposition or from a younger generation as they are accustomed to this way of working.

A business with a well developed website tends to do better than its peers. Customers can gain a better insight of its ethos, facilities and services on offer. In theory this fosters confidence and leads to greater engagement.

With the above in mind, let's build a site to help The Kennel!

Design Thinking

Applying a Design Thinking approach, what features would users find most useful on the developed site? How feasible is it for an inexperienced student developer to deliver prioritised features given the time constraints of a hard deadline?

As per assessment criteria, this project must utilise CRUD functionality. This provides a broad outline of what is needed. A brief though shower offered the following:

Feature Importance Feasability
View available services 4 5
Create personal account 5 5
Update account information 5 5
Able to cancel account 5 5
Make an appoinment 5 5
Review latest appointment date/time 3 4
Able to change/cancel an appointment 3 4
Send client booking detail via email 2 4
View history of all appointments made 2 3
View costs of previous appointments 2 1
Owner has calendar view of daily clients 4 3
Overall Score 40 44

The above exercise indicates that overall importance/feasability scores were similar. Therefore the project should be deliverable.

User Stories

Following an Agile paradigm, user stories will target customer needs and reduce embelishments on the part of the developer. These non technical statements will aid with the incremental changes needed to build the application.

Site user needs have been arbitrarily split into 4 categories or epics:

NAVIGATION

ACCOUNT MANAGEMENT

BOOKINGS MANAGEMENT

OTHER

Agile use has been documented in a separate file.

It became something of learning aid/development tracker for this project.

Wireframes

Several wireframes were created to target user requirements. This provided an overall feel of the project before starting to code. Some alterations will likely take place as the project develops.

index-desktop

our-services-desktop

join-us-desktop

my-account-desktop

book-now-desktop-1

book-now-desktop-2

daily-calendar-desktop

Colour Schema

The colour schema was selected from Adobe Color and the accessibility was checked using the contrast grid tool from Eightshapes.

The developed site should appear bright to contrast with the negative space.

In keeping with the dog theme, colours are based of the Mystery Machine as seen in Scooby-Doo.

colour-accessibility

Database Design

Entity Relationship Diagrams help to visualise database architecture before creating models in Django. Understanding the relationships between different tables can save time recoding later in the project. Fortunately this system is quite simple so only 4 tables are required.

Update - by mid project, research showed there was no need for a calendar table. This was omitted from the ERD.

kennel39-erd-v1

Deployment

The site was deployed early closely following Code Institute guides.

This process has been documented separately in DEPLOYMENT.md

Update - More dependancies were added after deployment. WhiteNoise was used instead of Cloudinary.

For a small site, it's better for the web app to serve its own static files rather than rely on a 3rd party API. It was also much easier to setup.

Update - there was an unforseen deployment issue with Heroku. As described by the link this was to prevent unauthorised access to gitHub repositories.

This was resolved by deploying to Heroku via the CLI in Gitpod.

  1. Login to heroku and enter your details. command: heroku login -i
  2. Get your app name from heroku. command: heroku apps
  3. Set the heroku remote. (Replace with your actual app name) command: heroku git:remote -a <app_name>
  4. Add, commit and push to github command: git add . && git commit -m "Deploy to Heroku via CLI"
  5. Push to both github and heroku command: git push command: git push heroku main

If MFA/2FA is enabled:

  1. Click on Account Settings (under the avatar menu)
  2. Scroll down to the API Key section and click Reveal. Copy the key.
  3. Enter the command: heroku_config , and enter your api key you copied when prompted
  4. Complete the steps above, if you see an input box at the top middle of the editor...
    • enter your heroku username
    • enter the api key you just copied

Features

The style of the site is intended to convey a cartoonish/minimalist quality using the colour schema with thicker border around elements and plenty of negative space. It's an interpretation.

Landing page

The user understands the site's purpose on arrival.

landing

Minimised navigation

The whole site uses a collapsable menu to save screen real estate on all resolutions.

It occupies the whole screen to encourage the user to make a decision where to navigate to.

The basic black against white contrast works well with the general site theme.

Menu options also change depending on whether or not the user is logged in.

dynamic-menu-options-1

dynamic-menu-options-2

Footer

Social media links and developers identity are available at the bottom of the page for all viewscreen sizes.

It has been intentionally omitted from the landing page for styling purposes.

To assist user, link elements change colour when hovering.

footer

CTA buttons on landing page

If user is logged in, an additional Book Now button becomes available. This is a short cut to the view booking template.

cta-not-logged-in

Additionally the registration and logon CTA buttons are hidden when a user is authenticated. They aren't required in this context.

To enhance user experience, buttons change style when hovering.

cta-logged-in

Services page

Contains a brief synopsis of the services offered, drawn from the backend Services table.

A carousel element with 3 images has been included to make the site feel more dynamic (on higher resolutions only).

Service section stacks on lower resolutions.

Depending on user authentication CTA buttons change at the bottom of the page for easier navigation.

services

Registration page

Standard allauth signup page adapted to the site's theme.

registration

Login page

Standard allauth signup page adapted to the site's theme.

login

View bookings page

This shows the user all existing bookings. It is intended that that they use this information to book an appointment that doesn't overlap with an existing one.

All accounts can:

jquery-datepicker

view-booking-table

Superuser and staff accounts have:

view-booking-full-crud-access

Standard user accounts have:

view-booking-anonymize-other-users

Create booking page

There is no need to ask the user for their name when they are signed into their account.

To simplify data entry, the form contains an html datepicker and dropdown menus whose options are based on the booking model.

create-booking

Edit booking page

The edit booking follows the same conventions as the create booking page and is prepopulated with the record the user chose to edit.

edit-booking

Cancel booking modal

This serves as a defensive programming feature for the user asking if they really wish to cancel their booking.

The title and message body are personalised and the buttons have the same hover effects in keeping with the rest of the site.

cancel-booking-modal

Help using our site

help-modal

Customised alerts

The Django framework has been used to apply messages throughout the site to give the user useful feedback. To do this a messages.html template was included in the base.html, Alerts can be seen at the top of the page for:

Post Registration / Logging in

sign-in-msg

Logging out

sign-out-msg

Creating/editing a valid booking

confirm-booking-msg

change-booking-msg

Preventing a booking clash

If unsuccessful, the page redirects back to edit booking to try again.

If successful, the page redirects back to view bookings.

prevent-booking-clash-msg

Future adaptations

This was the first occasion using allauth which more than met most of the project needs.

It is possible to extend allauth forms to include the Profile model though this will have to be an item for the future due to time constraints.

The Profile model has(with address and phone number fields) a 1-1 relationship with the user table. They are not crucial for the process of logging in/out but can serve other business needs such as marketing.

CRUD functionality for the full user account including address and phone number fields cannot be realised in the front-end without the above.

A good source to aid with this expansion is by Vitor Freitas.

It would be preferable to give a user their own page to view appointments to replace the filter workaround solution in view bookings.

Within that area, discrete option buttons representing a time could to work in conjunction with a datepicker.

Javascript would be needed to manipulate the DOM dependent on the result of a queryset of existing Booking table records.

The state of these buttons may be changed by adding a class to give a muted style or even hide.

Testing

Refer to TESTING.md for details on:

Technologies Used

Credits

Content

People

My thanks to: