← Contractor Recommender Library entry

Inside the contractor recommender

The 2023 Python routes named five page templates. Their HTML and styles are missing. Follow the routes below, then try the screens the design proposed.

The first contractor is the prototype’s test fixture. Other names, locations, reviews and ratings are fictional examples.

Route reconstruction /

Contractor Recommender

Recommended contractors

Log out

What survives. The signed-in home route passes a list to home.html. The recommender requests up to five contractors ordered by predicted score. Here the order is illustrative and the numbers are contractor ratings. The card contents follow the written UI design.

Route reconstruction /contractor/<int:contractor_id>

Contractor Recommender

testcontractor

plumbing · 4.5 / 5

Test description

Reviews

Test review

testuser · 4.5 / 5

What survives. The handler retrieves one contractor. The model links it to reviews and the brief calls for ratings and reviews on screen. The original test records are testcontractor, testuser and “Test review”.

Route reconstruction /review/<int:contractor_id>

Contractor Recommender

Write a review

Contractor · testcontractor

Content
Test review
Rating
4.5

What survives. ReviewForm requires text and a numeric rating. The handler builds a review for the signed-in user and the chosen contractor, then redirects to the profile with a success message. Follow the link to see that response for the fixed example.

Route reconstruction /register

Contractor Recommender

Register

Username 4–25 characters
testuser
Email
testuser@example.com
Password At least 8 characters
••••••••

What survives. These are the three required fields in RegistrationForm. The example account comes from the unit tests. The registration handler sends a successful registration to the login page.

Route reconstruction /login

Contractor Recommender

Log in

Username
testuser
Password
••••••••

What survives. A matching username and password lead to the home feed. A rejected login shows a flash message here. The separate /logout route returns here too. All example credentials are fixed display text.

Defined form · no screen route

Contractor Recommender

Enter a contractor

Name
testcontractor
Specialty
plumbing
Rating
4.5
Description
Test description

What survives. ContractorForm declares these four required fields. The API document also specifies a JSON contractor-creation operation. The Python routes never display this form. The values shown are the ones the original contractor test used.

Design proposal · feed filters

Contractor Recommender

Filter the feed

3 matches

  • testcontractor · Bristol · 4.5 / 5
  • Example Brickwork Co. · Leeds · 4.2 / 5
  • Example Joinery Co. · Bristol · 4.8 / 5

What the brief proposed. The UI draft names location, specialty and rating as filters. The contractor model includes the last two fields. The locations are supplied solely to let you try the proposed filter here.

Design proposal · shortlist

Contractor Recommender

Saved contractors

Choose contractors to save

2 contractors saved

Compare saved contractors

What the design specified. The user model has a saved-contractor relationship. The design sequence shows saving, retrieving and removing a contractor. The controls illustrate that sequence using choices held only while this page is open.

Design proposal · comparison

Contractor Recommender

Compare contractors

Saved contractors side by side
FieldtestcontractorExample Joinery Co.
SpecialtyplumbingJoinery
Rating4.5 / 54.8 / 5
DescriptionTest descriptionMakes and fits timber windows and doors.

Change the shortlist

What the brief proposed. “Save and compare” was a user story and a P1 requirement. This reconstruction arranges the existing contractor fields side by side. The brief leaves the comparison layout open.

Design proposal · recommendation feedback

Contractor Recommender

Rate a recommendation

Example Joinery Co. · Joinery

Did this suggestion fit your project?

What the brief proposed. Users could rate a recommendation’s accuracy. That asks a different question from a contractor review. The code trains on review ratings. The wording and two choices illustrate the missing feedback interaction.