tpt-building-designer

JavaScript

A parametric high-rise building design system. Structural, cost, carbon, compliance, and construction outputs are derived mathematically from a small set of inputs. Includes a 3D viewer, IFC/DXF export, subcontractor tender workflow, IPCC climate scenario modelling, and NZ/AU/US/EU code compliance checks.

4 stars0 forks4 watchersMIT License
architecturebimbuilding-designcarbon-footprintconstructioncost-estimationexpressjsifcjavascriptparametric-designstructural-engineeringsustainabilitytailwindcssthreejs

Languages

JavaScript87.7%HTML11.7%CSS0.6%
README

TPT Building Designer

A parametric, end-to-end high-rise building design system. All structural, cost, carbon, compliance, and construction outputs are derived mathematically from a small set of input parameters — no manual configuration required.

Web GUI (browser) · CLI (Node.js) · REST API (Express) · MIT Licensed


Features

Core Engineering

ModuleWhat it does
Structural EngineCore wall tapering, column sizing, wind & seismic load calculations (NZS 1170)
Facade DesignerParametric curtain-wall grid, glass performance, thermal bridging analysis
MEP SystemMechanical, electrical, and plumbing services sizing and routing
Fire EngineeringEgress travel distances, evacuation modelling, smoke management
Energy ModellingHVAC loads, envelope U-values, annual energy use intensity (EUI)
AcousticsInter-tenancy separation, impact noise, mechanical noise paths
Lift Traffic AnalysisPassenger demand, handling capacity, wait-time simulation

Cost & Carbon

ModuleWhat it does
Cost Estimation EngineElemental cost plan from first principles, rate libraries (NZ/AU)
Carbon Footprint CalculatorEmbodied carbon (A1–A5) from material quantities, transport, and plant
Carbon Budget MonitorLive comparison of actual vs. target with presets (NZ Pathway, Green Star 6★, LEED Platinum, Net Zero) and substitution suggestions
Climate Scenario Modeller100-year lifecycle carbon projection under IPCC 1.5 °C / 2.0 °C / 3.0 °C scenarios with NZ grid decarbonisation
Quantity Surveyor BenchmarkBenchmarks elemental costs against published NZ market data

Construction & Logistics

ModuleWhat it does
Construction Logistics PlannerProgramme, crane positioning, site hoarding, delivery sequencing
Trade Pack GeneratorEight discipline work packs (Groundworks, Structural, Steel, Facade, Mechanical, Electrical, Plumbing, Finishes)
Subcontractor Tender EngineGenerates self-contained HTML tender packages per trade; subcontractors fill rates in-browser, save portable .subprofile files and export .tenderreturn JSON for comparison
Construction Sequence AnimatorIn-browser timeline animation of the build sequence in the 3D viewer
Construction Risk AssessmentProgramme risk register with probability/consequence matrix

Compliance & Documentation

ModuleWhat it does
Code Compliance CheckerNZS 3101, NZS 1170.2/1170.5, NZBC clause-by-clause checks
Accessibility Compliance AuditorNZS 4121 accessible path, sanitary facilities, signage
Emergency Evacuation ModellingStair capacity, travel time, occupant load per floor
Report GeneratorPDF design reports, Excel BoQ, climate scenario tables
BCF Export EngineBIM Collaboration Format issue export for coordination
Specification WriterNatSpec-style specification clauses per trade

Visualisation & Export

ModuleWhat it does
3D ViewerThree.js real-time viewer with floor-by-floor material states
Floor Plan Generator2D SVG plans per level with layered MEP overlays
DXF ExporterAutoCAD-compatible DXF R2000 floor plans and site plans (no paid library)
IFC BIM ExporterIFC4 model for Revit / Navisworks / OpenBIM workflows
Rendering EngineAmbient-occlusion style SVG/PNG elevation renderings

Optional Integrations

ModuleStatusRequires
AI AssistantStubbed — activates with API keyAnthropic / OpenRouter / xAI key in browser localStorage
GIS Context LoaderFull (free, no key)OpenStreetMap Nominatim + Overpass API
EPD IntegrationStubEnvirondec API key
Live Pricing IntegrationStubRawlinsons/Cordell API key
Primavera ExporterStub (valid XML shell)P6 XML schema implementation

Quick Start

Prerequisites

  • Node.js 18+
  • A modern browser (Chrome, Firefox, Edge)

Install & Run

git clone https://github.com/PhillipT1/tpt-building-designer.git
cd tpt-building-designer
npm install
npm run web        # Start web GUI at http://localhost:3737

CLI (no browser)

npm start          # Generate 60-storey Auckland tower, print all reports to console

Run tests

npm test

Web Interface

  1. Adjust building parameters in the left sidebar (storeys, dimensions, floor-to-floor height, etc.)
  2. Click Update Building Model — all outputs cascade automatically
  3. Explore the 3D viewer and use ▶ Animate to play the construction sequence
  4. Right sidebar tabs:
    • Summary — key statistics and compliance flags
    • Trades — per-discipline scope and quantities
    • Reports — export PDF / Excel / IFC / DXF
    • Tender — generate HTML tender packs and import tender returns for comparison
  5. Carbon Budget panel (left sidebar) — set a target or choose a preset; the progress bar turns amber/red as you exceed it
  6. GIS Site Context panel — enter an address to load nearby buildings, streets, and amenities from OpenStreetMap
  7. ⚙️ AI Settings — configure an optional API key for AI-assisted brief interpretation, compliance Q&A, and report narrative generation

REST API

Server runs on port 3737. All endpoints accept and return JSON unless noted.

MethodEndpointDescription
POST/api/generateGenerate full building model from parameters
POST/api/generate-trade-reportTrade-specific report
POST/api/generate-trade-work-packStructured trade work pack
GET/api/tradesList of trade codes and names
POST/api/export-trade-pdfTrade pack as PDF download
POST/api/v1/generate-tender-htmlSelf-contained HTML tender package (download)
POST/api/v1/parse-tender-returnParse a .tenderreturn JSON submission
POST/api/v1/carbon-budgetCarbon budget status for given parameters
POST/api/v1/climate-scenarios100-year climate scenario projections
POST/api/v1/export-dxfDXF floor plan or site plan (text download)
POST/api/v1/gis-contextSite context from OpenStreetMap (lat/lng or address)

Project Structure

tpt-building-designer/
├── src/
│   ├── core/
│   │   ├── BuildingModel.js          # Central parametric model (single source of truth)
│   │   ├── MaterialsRegistry.js      # Material database + BoQ generator
│   │   ├── StandardsRegistry.js      # Regional building codes (NZ/AU/US/EU)
│   │   └── ModuleManager.js          # Dependency-ordered module cascade
│   ├── modules/                      # 50+ engineering discipline modules
│   │   ├── StructuralEngine.js
│   │   ├── FacadeDesigner.js
│   │   ├── MEPSystem.js
│   │   ├── FireEngineering.js
│   │   ├── CostEstimationEngine.js
│   │   ├── CarbonFootprintCalculator.js
│   │   ├── CarbonBudgetMonitor.js    # NEW — live carbon budget comparison
│   │   ├── SubcontractorTenderEngine.js  # NEW — HTML tender packages
│   │   ├── ConstructionSequenceAnimator.js  # NEW — 3D build animation
│   │   ├── ClimateScenarioModeller.js   # NEW — IPCC scenario projections
│   │   ├── DXFExporter.js            # NEW — DXF R2000 export
│   │   ├── AIAssistant.js            # NEW — optional AI integration
│   │   ├── GISContextLoader.js       # NEW — OpenStreetMap site context
│   │   └── ... (40+ more)
│   ├── output/
│   │   ├── ReportGenerator.js        # PDF + Excel exports
│   │   └── TradePackGenerator.js     # Trade work packs + tender delegation
│   └── index.js                      # CLI entry point
├── public/
│   └── index.html                    # Single-file web GUI
├── server.js                         # Express REST server
├── output/                           # Generated files land here
├── CLAUDE.md                         # Developer reference (architecture, patterns)
├── TODO.md                           # Task backlog
└── package.json

Key Parameters

ParameterDefaultRangeDescription
storeys6010–150Number of occupied floors
buildingWidth42 m20–80 mTower footprint width
buildingDepth42 m20–80 mTower footprint depth
typicalFloorHeight3.9 m2.7–6.0 mSlab-to-slab height
coreRatio0.220.15–0.35Core area as fraction of GFA
glassRatio0.70.3–0.95Vision glass fraction of facade
regionNZNZ, AU, US, EUSets applicable standards and cost rates

Subcontractor Tender Workflow

  1. In the Tender tab, click Generate Tender Pack for any trade.
  2. The browser downloads a self-contained HTML file — no server required for the subcontractor.
  3. The subcontractor opens the file in any browser, sees pre-filled quantities and locked item codes, and enters their rates.
  4. They can Save Profile → exports a .subprofile JSON file (portable across projects).
  5. They click Export Tender Return → downloads a .tenderreturn JSON file.
  6. Back in the main app, click Import Tender Return to load it into the comparison table.
  7. Import multiple returns to compare rates line-by-line; the lowest rate per item is highlighted automatically.

Carbon Budget Presets

PresetTargetBased on
NZ Pathway600 kgCO₂e/m²NZ Climate Commission 2050 pathway
Green Star 6★500 kgCO₂e/m²NZGBC Green Star rating threshold
LEED Platinum450 kgCO₂e/m²LEED v4 Platinum material credit
Net Zero Embodied0 kgCO₂e/m²Shows gap to full net-zero embodied carbon

Compliance Standards

StandardRegionCoverage
NZS 3101NZConcrete structures
NZS 1170.2NZWind actions
NZS 1170.5NZSeismic actions
NZS 4211NZWindows and glazed facades
NZS 4121NZAccessibility (DDA)
NZBC Clause GNZMeans of escape, lighting, ventilation
ASHRAE 90.1US/InternationalEnergy efficiency

Development

npm run web        # Web GUI on port 3737
npm start          # CLI full report
npm test           # Vitest unit tests
npm run test:watch # Watch mode
npm run build:css  # Compile Tailwind CSS → public/dist/
npm run watch:css  # Watch CSS changes

See CLAUDE.md for architecture details, module patterns, and contribution guidelines.


License

MIT — free to use, modify, and distribute.


Last updated: 2026-05-22