Granny Flat Company
Granny flat builder website
A website for a range of six granny flats from Marksman Build, a building company in Selwyn, Canterbury, New Zealand. Each design can be read as a floor plan, seen from above or turned around in 3D, and then placed on an aerial photo of your own section to see if it fits.
Visit Live Site

A granny flat is a big decision about a small space. Before anyone picks up the phone they want to know two things: what it is like inside, and whether it will actually fit in their backyard. A price list and a few photos can’t answer either.
Top highlights

Six designs, drawn to one scale
From a one-bedroom studio to a three-bedroom family home, every design sits in the same grid at the same scale, so a bigger plan really looks bigger. Filter by bedrooms, sort by size, and hover a tile to swap its floor plan for a 3D view from above.

Floor plans checked at 1:100
The plans come from the builder’s own drawing set. Each one was checked at 1:100 against the footprint on the sheet, and the room sizes on every page are copied from the drawings, never recalculated. Under the plan sit the concept drawings: section and elevations, opened full size with a tap.

Plan, top view or 3D model
A switch on each design page moves between the drawn plan, a cutaway view from above and a 3D model you can turn with a finger. The views are built from the same drawings, so the walls, doors and windows are where the plan puts them. The furniture is only there to give a sense of size, and the page says so.

Measure it: try it on your own section
Type your address, pick a design, and the plan appears on an aerial photo of your property at true size. Drag it into place, turn it with a handle or a slider, and tap two points to measure a distance. It checks the address is in Canterbury, says plainly that it is a guide and not a survey, and a placement can be shared as a link or sent with an enquiry.

Enquiries that arrive with the details
“Ask about this design” opens the contact form with that design already chosen, and an enquiry from Measure it brings the address and the exact placement with it. The builder knows which home and which section they are talking about before calling back.

Made for a phone in the backyard
Plenty of people will look at this standing on their own section. Plans pinch to zoom, the 3D model turns with a finger, the map controls are big enough for a thumb, and the phone number is one tap away on every page.
Behind the site, for the builder
Every placement on a map
In the admin, a Measure it enquiry shows the granny flat where the visitor put it, next to their message, status and notes.
Prices changed without a developer
The owner can update a design’s price or hide a design from the admin, and every page picks up the change within a minute.
Visitors counted without cookies
Page views, clicks and referral links in one place, with no cookies and no stored IP addresses, so no consent banner.
Project overview
- Client
- Granny Flat Company, a range of granny flats from Marksman Build Ltd, a building company based in Selwyn, Canterbury, New Zealand.
- My role
- Design and development of the whole website: the design pages, the top views and 3D models, Measure it, the enquiry flow, email and the admin.
- Deliverables
- Home, Getting started and Our team pages
- Six design pages with plan, top view, 3D model and drawings
- Measure it: place a design on an aerial photo of your section
- Contact form that carries over the design and address
- Enquiry emails, with optional confirmations sent from Gmail
- Admin for enquiries, design prices, analytics and reports
- Status
- Live at grannyflatcompany.co.nz.
Build homes or run a trade business in Australia or New Zealand? See my websites for tradies.
Technical details for developers
Stack, architecture and how it is built.
Stack
Architecture
Plans read from the drawing set
A PyMuPDF script reads the vector drawing PDF and sorts every mark by colour, line weight and shape: walls, windows, sliding and hinged doors, benches, showers, beds. It fails loudly unless the footprint matches the design data within 2 cm and every room matches its printed area within 0.11 m². Blender then renders the top view from that geometry and exports the same scene as a glTF model, so the 2D plan, the top view and the 3D model can’t disagree.
A plan that stays to scale on the map
In Measure it the plan is not a picture laid over the map but a shape on the ground: Turf.js works out its four corners in latitude and longitude from the centre, width, depth and bearing, and MapLibre draws the plan image onto them, so zooming can never change its real size. Address search goes through the Worker so no key reaches the browser, and a point-in-polygon test against the Canterbury region boundary decides whether an address is in the service area. Property boundaries from LINZ are wired in; where no boundary is available, the tool says the placement is approximate. The whole state lives in the URL, so a refresh or a shared link opens the same placement.
One data file, with overrides from the admin
The six designs live in one TypeScript file that feeds the tiles, the design pages, Measure it, the contact form and the admin. The site is a static export, so every value is in the HTML for search engines. When the owner changes a price or hides a design in the admin, the change is saved in D1 and the pages apply it over the built-in values from a small cached endpoint, with no rebuild.
Highlights
Saved Before Emailed
Every enquiry is written to Cloudflare D1 first, then emailed through Cloudflare Email Routing, with a connected Gmail account as the fallback. If a send fails the enquiry is still there, and the admin settings say why.
Locked-Down Admin
The admin password is stored only as a PBKDF2 hash, sessions are signed HttpOnly cookies, and changes must come from the site’s own origin. Gmail is connected with send-only access and its token is stored encrypted. Forms, sign-in and map lookups are rate-limited per IP.
Want something like this?
I build websites that answer a customer’s real questions before they call, with the enquiry tools a small business needs behind them.