tpt-building-designer
JavaScriptA 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.
Languages
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
| Module | What it does | |--------|-------------| | Structural Engine | Core wall tapering, column sizing, wind & seismic load calculations (NZS 1170) | | Facade Designer | Parametric curtain-wall grid, glass performance, thermal bridging analysis | | MEP System | Mechanical, electrical, and plumbing services sizing and routing | | Fire Engineering | Egress travel distances, evacuation modelling, smoke management | | Energy Modelling | HVAC loads, envelope U-values, annual energy use intensity (EUI) | | Acoustics | Inter-tenancy separation, impact noise, mechanical noise paths | | Lift Traffic Analysis | Passenger demand, handling capacity, wait-time simulation |
Cost & Carbon
| Module | What it does | |--------|-------------| | Cost Estimation Engine | Elemental cost plan from first principles, rate libraries (NZ/AU) | | Carbon Footprint Calculator | Embodied carbon (A1–A5) from material quantities, transport, and plant | | Carbon Budget Monitor | Live comparison of actual vs. target with presets (NZ Pathway, Green Star 6★, LEED Platinum, Net Zero) and substitution suggestions | | Climate Scenario Modeller | 100-year lifecycle carbon projection under IPCC 1.5 °C / 2.0 °C / 3.0 °C scenarios with NZ grid decarbonisation | | Quantity Surveyor Benchmark | Benchmarks elemental costs against published NZ market data |
Construction & Logistics
| Module | What it does |
|--------|-------------|
| Construction Logistics Planner | Programme, crane positioning, site hoarding, delivery sequencing |
| Trade Pack Generator | Eight discipline work packs (Groundworks, Structural, Steel, Facade, Mechanical, Electrical, Plumbing, Finishes) |
| Subcontractor Tender Engine | Generates self-contained HTML tender packages per trade; subcontractors fill rates in-browser, save portable .subprofile files and export .tenderreturn JSON for comparison |
| Construction Sequence Animator | In-browser timeline animation of the build sequence in the 3D viewer |
| Construction Risk Assessment | Programme risk register with probability/consequence matrix |
Compliance & Documentation
| Module | What it does | |--------|-------------| | Code Compliance Checker | NZS 3101, NZS 1170.2/1170.5, NZBC clause-by-clause checks | | Accessibility Compliance Auditor | NZS 4121 accessible path, sanitary facilities, signage | | Emergency Evacuation Modelling | Stair capacity, travel time, occupant load per floor | | Report Generator | PDF design reports, Excel BoQ, climate scenario tables | | BCF Export Engine | BIM Collaboration Format issue export for coordination | | Specification Writer | NatSpec-style specification clauses per trade |
Visualisation & Export
| Module | What it does | |--------|-------------| | 3D Viewer | Three.js real-time viewer with floor-by-floor material states | | Floor Plan Generator | 2D SVG plans per level with layered MEP overlays | | DXF Exporter | AutoCAD-compatible DXF R2000 floor plans and site plans (no paid library) | | IFC BIM Exporter | IFC4 model for Revit / Navisworks / OpenBIM workflows | | Rendering Engine | Ambient-occlusion style SVG/PNG elevation renderings |
Optional Integrations
| Module | Status | Requires | |--------|--------|---------| | AI Assistant | Stubbed — activates with API key | Anthropic / OpenRouter / xAI key in browser localStorage | | GIS Context Loader | Full (free, no key) | OpenStreetMap Nominatim + Overpass API | | EPD Integration | Stub | Environdec API key | | Live Pricing Integration | Stub | Rawlinsons/Cordell API key | | Primavera Exporter | Stub (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
- Adjust building parameters in the left sidebar (storeys, dimensions, floor-to-floor height, etc.)
- Click Update Building Model — all outputs cascade automatically
- Explore the 3D viewer and use ▶ Animate to play the construction sequence
- 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
- Carbon Budget panel (left sidebar) — set a target or choose a preset; the progress bar turns amber/red as you exceed it
- GIS Site Context panel — enter an address to load nearby buildings, streets, and amenities from OpenStreetMap
- ⚙️ 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.
| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | /api/generate | Generate full building model from parameters |
| POST | /api/generate-trade-report | Trade-specific report |
| POST | /api/generate-trade-work-pack | Structured trade work pack |
| GET | /api/trades | List of trade codes and names |
| POST | /api/export-trade-pdf | Trade pack as PDF download |
| POST | /api/v1/generate-tender-html | Self-contained HTML tender package (download) |
| POST | /api/v1/parse-tender-return | Parse a .tenderreturn JSON submission |
| POST | /api/v1/carbon-budget | Carbon budget status for given parameters |
| POST | /api/v1/climate-scenarios | 100-year climate scenario projections |
| POST | /api/v1/export-dxf | DXF floor plan or site plan (text download) |
| POST | /api/v1/gis-context | Site 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
| Parameter | Default | Range | Description |
|-----------|---------|-------|-------------|
| storeys | 60 | 10–150 | Number of occupied floors |
| buildingWidth | 42 m | 20–80 m | Tower footprint width |
| buildingDepth | 42 m | 20–80 m | Tower footprint depth |
| typicalFloorHeight | 3.9 m | 2.7–6.0 m | Slab-to-slab height |
| coreRatio | 0.22 | 0.15–0.35 | Core area as fraction of GFA |
| glassRatio | 0.7 | 0.3–0.95 | Vision glass fraction of facade |
| region | NZ | NZ, AU, US, EU | Sets applicable standards and cost rates |
Subcontractor Tender Workflow
- In the Tender tab, click Generate Tender Pack for any trade.
- The browser downloads a self-contained HTML file — no server required for the subcontractor.
- The subcontractor opens the file in any browser, sees pre-filled quantities and locked item codes, and enters their rates.
- They can Save Profile → exports a
.subprofileJSON file (portable across projects). - They click Export Tender Return → downloads a
.tenderreturnJSON file. - Back in the main app, click Import Tender Return to load it into the comparison table.
- Import multiple returns to compare rates line-by-line; the lowest rate per item is highlighted automatically.
Carbon Budget Presets
| Preset | Target | Based on | |--------|--------|---------| | NZ Pathway | 600 kgCO₂e/m² | NZ Climate Commission 2050 pathway | | Green Star 6★ | 500 kgCO₂e/m² | NZGBC Green Star rating threshold | | LEED Platinum | 450 kgCO₂e/m² | LEED v4 Platinum material credit | | Net Zero Embodied | 0 kgCO₂e/m² | Shows gap to full net-zero embodied carbon |
Compliance Standards
| Standard | Region | Coverage | |----------|--------|---------| | NZS 3101 | NZ | Concrete structures | | NZS 1170.2 | NZ | Wind actions | | NZS 1170.5 | NZ | Seismic actions | | NZS 4211 | NZ | Windows and glazed facades | | NZS 4121 | NZ | Accessibility (DDA) | | NZBC Clause G | NZ | Means of escape, lighting, ventilation | | ASHRAE 90.1 | US/International | Energy 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