Design
Class Diagram
Components & Interfaces
Toolshed is a webapp that primarily uses ExpressJS, Sequelize, ReactJS, and PostgreSQL.
The primary component of Toolshed is the backend webserver. The backend server implements the data model in the previous section via the Sequelize ORM, which manages migrations (table creation/updates based on data model changes) & query generation. Each endpoint on the backend server serves an HTML page based on data it loads from the database.
The database is PostgreSQL, which uses a TCP protocol (not too dissimilar to a binary version of HTTP) to transmit queries and result sets. As mentioned before, Sequelize will manage the schema of the database.
The client/frontend is a non-single-page React app. About half of the frontend code is ready to be ported to single page, while some of it still uses HTTP forms.
Sequence Diagram 1 - Search for Tool Listings
Use Case Search for Tool Listings
A user wants to search their local neighborhood for a hedge trimmer. They use Tool Shed to find a tool so that they can get the job done today and not go over their budget to purchase a brand-new one.
The user navigates to http://toolshed.symer.io:5000/ and clicks on "Log In" to sign in to their account.
The user enters a tool (eg. hedge trimmer) into the Search Query
The user adjusts some of the filters (eg. Tool Category, Tool Maker, User Rating, Search Radius) to narrow down their search.
The user is presented with red pins on the map if there are any active tool listings that fit the search query.
The user can either click on the red pin to get the tool listing details or they can exit the website.
Sequence Diagram 2 - Find Nearby Tool Listings
Use Case Find Nearby Tool Listings
A user has an unexpected afternoon off from work and wants to see what tools are available now to see what projects they can complete around the house.
The homeowner visits the website, logs in to their account, and ends up on the homepage of the website.
The homeowner scrolls down to the map.
The homeowner is able to adjust the Search Radius.
The homeowner is presented with red pins on the map if there are any nearby listings.
The homeowner can click on any of the red pins to view the tool listing details or exit the website.
Sequence Diagram 3 - Edit Tool Details
Use Case Edit Tool Details
The user navigates to the website, logs in to their account, and ends up on the homepage of the website.
The user clicks on the "General" dropdown menu and clicks on "Tools".
The user sees all the tools they've added to the site.
The user clicks on the "Edit Tool" button of the tool they want to edit.
The user sees all the current information on the tool.
The user clicks on the textbox under description.
The user deletes the current text under description and enters new information.
The user then clicks the "Save" button.
The user clicks on the "General" dropdown menu and clicks on "Tools" where the user will see that the tool description has changed.
The user exits the website.
Sequence Diagram 4 - List a Tool
Use Case List a Tool
The user navigates to the website, logs in to their account, and ends up on the homepage of the website.
The user clicks on the "General" dropdown menu and clicks on "Add Tool".
The user fills out the form
Name of Tool
Description
Category
Maker
The user adds a YouTube video on how to use tool, photo and/or manual.
The user clicks the button "Create".
The user scrolls down to Listings and clicks "+ New Listings".
The user clicks "Active" and fills out price, max # of billing intervals and billing interval.
The user clicks "Create" to create a new listing.
The user can scroll down to Listings and click "+ New Listings" to create more listings of the same tool or exits the website.
Sequence Diagram 5 - Remove a Tool Listing
Use Case Remove a Tool Listing
The user navigates to the website, logs in to their account, and ends up on the homepage of the website.
The user clicks on the "General" dropdown menu and clicks on "Listings" to view their current listings.
The user selects a listing that they want to remove and clicks on "Edit".
The user scrolls down to "Listings" and sees the "Active" button which is blue to show it's active.
The user clicks on the "Active" button and it turns grey, which shows it's inactive now.
The user clicks on "Save".
The user exits the website.
Sequence Diagram 6 - Review Tool Owner
Use Case Review Tool Owner
A user wants to review their experience with the rented tool and the tool owner.
The user navigates to the website, logs in to their account, and ends up on the homepage of the website.
The user clicks on the "General" dropdown menu and clicks on "Create Review".
The user sees a list of users.
The user finds the user they want to review and clicks the button "Review User".
The user writes a review in the text box and selects a star rating.
The user clicks submit.
The user exits the website.
Algorithms
Tool Shed will constantly run and execute database queries to determine similar patterns and form submissions through known categories. Once jobs have been completed, Tool Shed will be able to recommend tools and supplies that are known to have successfully completed similar jobs in the past. Using Google YouTube API, search queries will be returned with instructional videos that are highly recommended in the how-to field.