Paws for Consideration

Paws for Consideration is a fictitious pet rescue operation specializing in placing dogs and cats for adoption. The website will serve as the front-end tool that the staff of Paws for Consideration may use in order to:

  • add/insert new dogs and cats into the database.
  • browse/select the list of animals available for adoption. Enable staff to browse by animal type (cats or dogs only in current deployment).
  • edit/update details about each animal.
  • delete animals from the database.
  • view where animals are housed (in the description of an animal’s detail).
  • view/select a list of staff.
  • view animals by their status.
  • due to many-to-many relationship between staff and locations, a staff_location table will be used as a composite entity.
  • view staff-location assignments.
  • add/insert new status options into the database.

Application Framework and Design Decision Summary

For the back-end, this site utilizes JawsDB (running MySQL) and Node.js. JawsDB is a Heroku add-on for providing a MySQL Database server for use with the Heroku instance. JawsDB was chosen over ClearDB as it allows for usage of a more up to date version of MySQL, which is necessary in order to utilize CTEs. Node.js is utilizing express for the web server and is using EJS for displaying the front-end views. The front-end styling is a combination of Bootstrap and custom CSS.

The ability to browse by animal status is included on the Homepage, enabling a filter option that queries the database for cats and dogs based on a specific status value. Incorporating photo insertion into the database was a hurdle at the start, but this challenge was tackled by including a path for the photo rather than the actual file.

“CTEs” (Common Table Expressions) were leveraged to make some of the advanced staff-location queries. This made it easier to display a list of staff (first names and last names) by each location in the front-end views. A “case when” statement is used in Homepage queries in order to customize the data that is served on the client-side, enabling easier formats of dynamic URLs. 

Entity Relationship Diagram

Paws for Consideration ERDTo view the full project code, visit the Paws for Consideration repository on Github.