Online Building Designer Demo

This is a project I have been working on when not busy at my day job.
It is a prototype online designer for small buildings. It provides easy to use controls to design a small building from within your web browser. As you change options, a 3D model and pricing updates in real time. If it was complete, there would be 'Buy Now' button.
It's the online Ikea kitchen designer for a whole building.
You can play with the demo here.
How do you use it?
You fill in forms like this:

Can drag doors and windows around on the plan like this:

And select options for windows and doors like this:

As you are doing all these things, the 3D model and price update:

You can move around the model to see the building from any angle:

And if you are interested in how the building is put together, you can see that by hiding and showing layers:

Now buildings are complex things, so you will at some point want assistance from the experts. It has build in video conferencing and works like a Google Doc - the designs can be viewed by multiple people across the internet - when one person makes a change, everyone sees it[1]:

Once you have committed to buying, the building designers at Hypothetical Construction Company, can add site specific information, and the system will generate the set of plans for consenting and the bill of materials for when work is to start:

(Bills of materials and generated plans is out there in the open in the demo. For a real system this functionality would only be available to the staff of Hypothetical Construction Company - as one builder I showed this said, "if you give them this, they have everything".)
[1]: This screen-shot is from an earlier prototype. If you hunt around you can find it in the online demo.
It is a proof of concept
And therefore is incomplete. I clarify this as this is not always clear to the casual viewer.
For example, the modelled building would fall down because of the lack of nails and other fasteners. There is not insulation or interior wall or ceiling linings. Water would get in because of the lack of window flashings. The plans would be summarily rejected by the consenting authority because of the lack of cross-sections and construction details.
Incompleteness aside, is it realistic? Construction details are from NZS3604 and E1/AS1. These two standards are the substantial part of the 'default' way to comply with the New Zealand Building Code that every carpenter knows. I am a software developer that has worked in building supply industry, done a lot of DIY and done some formal study in Architectural Drafting, I am not a building professional. The project is at the stage where if one was to take it further, one would want to be working heavily with Licenced Building Practitioners to fill in the gaps.
And whilst the scope of the demonstration building is limited - simple rectangular, one room cabins or sleepouts, the concept and techniques is readily applicable to larger more interesting buildings.
How does it work
It is called parametric modelling. The core of it is computer code, that takes the specification of the building as input and produces various outputs: a 3D model, a bill of materials, estimated price, and PDF plans.
The specification includes all the details you can enter into the user interface, the building width
and depth
, whether the foundation is timber
or concrete
, the positions and selected options for all the doors and windows. It also includes details like the wind zone
, soil class
and earthquake zone
which must be taken into account to comply with New Zealand's building regulations.
The modelling is very much divide and conquer. A cabin
consists of a foundation
, walls
and a roof
. The foundation
is either a timber-subfloor
or concrete-slab-on-ground
. A timber-subfloor
consists of a ... until you are dividing the width of the building by say 600mm to get the number of floor joists... Ultimately it is just a lot of boring maths. No AI sorry.
The internal model produced includes the position and dimensions of every component of the building, down to every piece of timber. Well almost, did I mention their are no nails or other fasteners yet:

This component list is key to how the pricing works. The system also has a database of material prices. It does the maths, just like a quantity surveyor or the quotes team at your builders merchant would do:

The prices are somewhat contrived - mostly what I could buy the materials for at the time I wrote the code. More realistically these would be updated regularly with contracted prices from suppliers.
In this demo, the total price is simply the total price of materials times 3. A more realistic pricing system would take into account fixed costs, labour, subcontractors... Essentially you automate what is commonly done with spreadsheets. Now anyone with first hand experience with this will tell you it's not that simple, I don't disagree. I have spent a fair amount of time talking to actual suppliers to understand this - it is not something that is going to come out fully formed first time through, but I think there is a clear path.
As with the generated plans, in a real system you probably wouldn't have all the intermediate figures out front for competitors to see.
The tech stack
The 3D model is produced from the internal model and rendered in the web browser with ThreeJS.
The 2D diagrams are also produced from the internal models. They are rendered in the web browser on HTML canvases, and on the server as Postscript which is converted to PDFs. The elevations in the PDFs are snapshots of orthographic projections of the 3D model rendered with ThreeJS in a headless web browser.
Both the front and back end are implemented in F#, which runs on the .NET runtime on the server and is transpiled by Fable to Javascript, to run in the web browser. F# is a functional language in the ML family. It is more like Haskell than Lisp - though evaluation is eager and there is a lot less talk in the F# community about monads and the lambda calculus. Whilst not a mainstream language, F# is backed by Microsoft and when run on .NET it integrates seamlessly with the C# ecosystem, allowing you to use any .Net package.
I could go on about F#, but this is not a blog post on the merits of different programming languages. I will add that I am very pleased with the choice - a bunch of problems I deal with with imperative languages in my day job just don't exist.
Using the same language for front and back end greatly simplified communicating between the two parts of the system. It also lends a lot of flexibility, for example, early on all the modelling logic was in the front end. That modelling logic is the secret sauce - you don't want that sitting in the web browser where it can be downloaded and decompiled by your competitors. The modelling code is now safe in the back end, inaccessible to the outside world.
Since the front and back end are written in the same language, code reuse and relocation between the two parts of the system is straightforward. In fact, when working on the modelling code during development, I usually have the modelling code running in the front end instead of the back end. Running it this was gives more immediate feedback, which significantly increases productivity. Changing where the modelling code runs is just a command line switch - that is pretty cool.
The system deployed in a container on a Linux VPS. Honestly there is nothing interesting about the way it is hosted. It could run almost anywhere.
What it could be?
Imagine the system has been completed for these simple rectangular buildings, i.e. has options for different exterior styles, i.e. cladding, roof, detailing etc, allows you to add internal walls, decorate, add furniture and fixtures. Then imagine it is extended to work for more complex floor plans. Change the controls so you can walk around it like a video game. Finally add a bunch of pre-designed buildings so people are not starting from scratch. And whilst doing all this you are keeping a laser focus on keeping it easy to use.
What you get to is my dream app for buying a new build house - the online kitchen designer for a whole house.
I am a building geek and love this kind of stuff. Do other people want to do the job of designing a house online? I think the answer is both yes and no.
Buildings are complex and expensive. Buyers both need the expertise of professions, and want some kind of face to face relationship with the company they are going to make a large financial transaction with. Even for people who have the skills and inclination to do it themselves, it is rarely practical from a regulatory point of view. I am not suggesting cutting the professionals out of the process.
What I think there is demand for, are ways for buyers to be more meaningful involved in the design the process. What this is all about, is making it easier for a potential buyer to try ideas out and more fully understand the implications of design options proposed by both themselves and the design professionals they work with.
The vagarities of pricing
In New Zealand, a builder's marketing material having indicative pricing sets them apart. Being able to immediately see how different design decisions affect upfront costs would be a game changer, for both customers and builders. Customers would be able to try out more ideas. Builders would be able to accommodate this trying out of idea with a lot less hassle and up-front cost.
Such an approach would also make early estimates significantly more accurate. Early in the design process, price are often very course, either 'how much it cost to build that design last time', simply based on square meter-age and building type, or in some cases just, 'I reckon we could build that for less than $xyz.'

Management of cost risk is important in construction. New Zealand has quite the history of insolvency in the construction market. Despite there being well established best practices and specific legislation, the same kinds of problems keep occurring. Whilst not particularly complex, in many cases problems occur simply because rigorous cost management processes are not followed. Often this is because processes are not understood or are considered to be to difficult. I believe that automation of quoting and project accounting, if done sensibly, would in many cases lead to more certainty and less risk for all parties involved.
The final thing I will say about pricing, is that if it was easier for buyers to explore options, they would be less likely to take the, "how much can I borrow", then "build to that price approach." More buyers will choose more affordable options if you make it easier for them to do so.
Not just aesthetics and price
So far I have focused on what the building looks like, and up front cost. Real time modelling also provide feedback on other factors that people should consider when building a house, like building performance and total cost of ownership:

The above is completely contrived, but you should be able to get the idea. I am particularly excited about the idea of hooking the system up to the PassiveHause planning package, or other building performance modelling software.
The experts know how to build better houses that are more comfortable, have a lower total cost of ownership and are better for the planet. Unfortunately, most new houses are built 'minimal to code' and whilst this is a lot better than it used to be, in most cases we are leaving a lot of potential building performance on the table. If we make it easier for buyers to consider better options, I think the demand for better houses will increase.
More agency
In summary, it is all about giving buyers, more agency. They will still be lead by design professionals that have the expertise and experience, but they will be able to try out more ideas and have a better understanding of what they are choosing. This would will lead to better outcomes for what are usually large expensive and important decisions.
And if you are the construction company giving prospective customers a better way, I think you are going to get a larger slice of the market.
It's just BIM
Building Information Modelling that is. Whether designs are produced on a drafting board or with CAD software, essentially you are producing diagrams and text on paper to be interpreted by people.
BIM takes it to the next level, as well as diagrams and text, you have "structured information" that can be shared and worked with digitally - this means worked on with more sophisticated automated tools and more easily shared between professionals.
What I am doing here is exploring what you can do if you extend that approach so the end customer can participate meaningfully.
I am not going to go into more detail now, but I do want to say that a lot of people believe that BIM is the key that makes feasible at scale a bunch of well understood engineering approaches that will lead to 'revolutionary better' housing.
Business model and path to market
This is where I get stuck, and if it is not obvious yet, it becomes clear I have bitten off more than I can chew.
My key problem is I am one step removed from the customers I am thinking of. I don't build houses for a living, I build software. So from a business model point of view my customers are not the people wanting a building, they are the people designing or building the buildings.
And the professionals designing or building buildings have much better software than this pokey little demo, in almost every way. The software they have doesn't let their customers explore design variations and get instant quotes in the comfort of their home, but that is not really a big deal for them as the volume of customers they deal with is very small. Most building professionals will be dealing with less than 20 projects a year.
I can see several incremental paths to take this to market. All these paths require working with licenced building designers who is seriously invested in the process. What I am blocked on is finding the professionals that share the vision and getting from my current situation onto one of those paths.
Ultimately I made the most basic mistake of this kind of speculative projects. I didn't talk to my customers early on, so I didn't build something I could sell, ultimately I was not working on a business, I was working on a hobby.
Conclusion
This is by far the coolest thing I have ever built, and I do get excited when I think of the possibilities, but it would be a self inflicted fools errand to continue with the resources I have at my disposal.
I have certainly learn't a lot. At this point it feels a lot like one of those DIY projects, like tiling the bathroom, where you have spent a lot of time learning new skills but wonder if you will ever use them again. I am sure that is not the case, skills are often transferable in ways one could never anticipate.
So, time to start that 'portfolio blog' I have been meaning to do for the last 10 years. If nothing else, this is a great demo of what I am capable of. Maybe it will open some doors next time I am in the job market. Here is blog post #1.