← work

2014 · work

Damage reports and repair bids for Deukweg.nl

Drupal developer, Deukweg, via Itsavirus

A marketplace for car body damage: photograph the dent, type the licence plate, and FOCWA repair shops near you bid within 24 hours; you pick one on price, distance and reviews.

Drupal 7 · PHP · LESS · jQuery · Leaflet · RDW open data · ctools

Deukweg.nl was a marketplace for car body damage. You photographed the dent, typed in your licence plate, and repair shops near you bid on the job. The promise on the front page was at least three offers within 24 hours, from FOCWA-certified companies, with four years of guarantee, and you compared them on price, distance and reviews. It was free for the car owner; the shop paid. I worked on it in 2014 as a freelancer at Itsavirus, the Amsterdam agency that built it, as one of the developers on a Drupal 7 site with a custom theme and a handful of custom modules.

The site is gone. There were also native apps for Android and iOS, and their code is not at hand, so what follows is what the website’s modules and theme show, plus what the Internet Archive kept of the pages.

The Deukweg.nl front page: a blurred road with three circles reading Upload photos and describe damage, Receive offers within 24 hours, Choose an offer and save time and money, a yellow Start now button, a list of five benefits, a yellow box asking Are you a repair shop, a download box with Android and Apple logos, and the FOCWA guarantee fund mark.
The front page: three steps, the promise, and the app for Android and iOS.
The three-step explainer on a grey band, and under it a wall of grey logos: Radio 538, Emerce, Automobiel Management, Autoschadeportaal, Twente, iCulture, Sprout, BNR Nieuwsradio, Autoblog and Qmusic.
The explainer and the press it was covered by.
Step one of the damage report form: three step tabs, a yellow Dutch licence plate reading ZT-095-J, disabled fields for make, year and type with loading dots, yes/no toggles for courtesy car and pick-up service, a title field, a description box, a promo code field and a greyed-out button reading fill in the fields.
Step one. The plate goes in first; the car fills itself in.

3 images — swipe or scroll sideways

The plate goes first

A report starts with a licence plate. The make, model and year fields under it are disabled. On leaving the plate field the page asks the site for /rdw/<plate>, the site asks the RDW’s open vehicle register, then published as an OData feed on Azure DataMarket, and the three fields fill themselves in from the make, the trade name and the year of first registration. A plate the register does not know produces one message, asking you to type the three fields yourself, and unlocks them. There is a leftover file in the module from the route tried first: a script posting to the RDW’s own lookup form with a copied ASP.NET viewstate. The open-data feed replaced it before it went anywhere.

The rest of the report is Drupal’s node form, taken apart into steps. Step one is the plate, the description, whether you want a courtesy car and whether the shop should collect the car, and a promo code. Step two is photographs: exactly four, dropped onto the page, with a guide beside them saying which four (the whole car, the damage head-on from at least a metre, at 45 degrees, and from the other side), because the shops price the job from those pictures and nothing else. The next button is hidden until the fourth photo is in. Step three is your contact details and postcode, and for someone without an account the registration fields are injected into the same form, so the account is created on the last click rather than before the first. Validation is limited to the fields of the current step, and the button reads “vul de velden in” and stays grey until they are.

The pieces and how they talk. The report is the only object everything hangs off; a bid points at it, the chosen bid is a field on it, and the review points at it too.

Two clocks on every report

When a report is saved, the module stamps it with two deadlines. The first is 24 hours after creation and closes the bidding: a shop looking at the report sees a clock counting down in the sidebar, in hours and minutes, and once it passes the bid form is simply not rendered. The second is 24 hours after the first and closes the choosing: until then the owner can accept a bid, after it the accept button is gone and the owner’s page carries a notice that the report has lapsed. Both numbers are settings, editable by an administrator, and administrators are exempt from the stamping so that a deadline can be set by hand when something needs debugging. The owner’s dashboard reduces all of this to three labels: actief, afgerond, niet afgerond.

The two windows, and what a report looks like from the shop’s side. The title of a report carries a coloured square for the state, so a dashboard of open reports reads at a glance.

What a shop sees, and what it does not

A bid is three amounts: the repair, collection and return, and a courtesy car. The last two only appear on the form when the owner asked for them. The total is added up on save, and while the shop types, the page shows each amount split into net and 21 per cent VAT, because the owner sees a price including VAT and a shop thinks without it. A bid also has a start and an end date, and the end may not come before the start.

What a shop cannot see is the other bids. A price is shown only to the owner of the report, the shop that made that bid, and an administrator. And what an owner cannot see, unless a flag on their profile says otherwise, is who is bidding: the shop’s name, logo and description are stripped from the comparison, so the choice is made on the amount, the distance and the star rating. Only once a bid is accepted does the chosen shop get the owner’s phone number, on the report itself, which is when the site says the shop will ring to plan the job. Questions are comments on a bid: the owner may ask, the shop may answer only once something has been asked, and the owner is mailed when the answer arrives.

One bug is worth telling because it is in its own module, named after itself. An impatient shop clicking “Plaats bod” twice saved the bid twice, and the owner then compared a shop with itself. The fix is two lines of defence: the button hides itself on the first click, and the server refuses a second node from the same session within five seconds of the last one.

Reviews and the seven per cent

The review form on a report only appears after the end date of the chosen bid has passed, and only once. Each review updates the shop’s running average, kept twice: as a float for the ordering and as a rounded integer for the stars. The profile page of a shop shows the stars, the number of reviews, its opening hours, the FOCWA logo and a Leaflet map on OpenStreetMap tiles; the overview page clusters every shop on one map and filters by postcode and distance. In June 2014 that map held 261 shops. By March 2016 the site listed 234 reviews, the oldest dated 2 May 2014, and since a review can only be written once a repair is finished, that is 234 repairs that went through the site.

The business model is one template. A completed report can be printed as a PDF invoice addressed to the shop: one line, “Lead” followed by the licence plate, seven per cent of the repair amount excluding VAT, plus VAT on that. The owner never paid anything.

The app, seen from the server

Itsavirus also shipped a native app: version 2.0.3 for iPhone was updated on 22 September 2014, and the Android package was nl.deukweg.app. The app’s own code I do not have, and I cannot say what it was written in. What the website’s code shows is the shape of the seam: a hidden app-token field on the report; a rule that the form alterations above are skipped on any path containing api, with a comment in Dutch saying this is needed to make the app work; and a node-access rule letting the app keep editing a report until it has its four photos, so the pictures could be uploaded one at a time from a phone. The module that served that API is not in my copy either.

The Internet Archive’s last capture of the site with this theme is from 15 January 2016. By November 2016 it wore a different theme, and the app links were gone from the front page.