Clear Road Driving
What it is
A website for a made-up driving instructor in a made-up town. The whole home page is one drive: a road winds down from the pupil’s front door, every section stands beside it as a road sign, and a little learner car follows the road as you scroll until it reverses into a bay next to the booking form.
Why I built it
Most driving instructor sites are a price list and a phone number. What an instructor actually sells is a calm hour in a car, so I wanted the page to feel like a short lesson. The car indicates before bends, gives way at a roundabout and finishes with a bay park, which felt like the right ending for this trade.
How it works
The page measures where each section sits and builds the road around them in SVG, with S-bends in the gaps. The car has its own track offset into the left lane, and a hand-made one round the roundabout so it keeps the island on its right.
The hard part was speed. If scroll position maps straight to height on the page, the car crawls down the straights and then shoots across every bend. So the scroll is matched to the track at the ends of each straight, and in between the car moves at a steady rate along the curve. The give way sits on top of that: the car slows to the line, waits while you keep scrolling, then pulls away slightly faster until it has caught up. A blue car is timed to cross in front of it before it goes. The indicators come from looking 150 px down the road and checking which way it turns.
On phones the road runs straight down the left edge and the roundabout becomes a crossroads. Bookings, edits and photos from the demo admin stay in the visitor’s own browser.
What I’d change
The cross traffic is tied to the scroll too, so if you scroll back up the blue car reverses all the way round the roundabout. It makes me laugh but it is plainly wrong, and it should probably just drive off.
ReactTypeScriptViteSVGlocalStorage
This one is for sale. The demo runs in your browser with made-up data, so try anything. There are two ways to have it:
Either way I can host it and look after it for a monthly fee, or hand everything over. Ask for a price.