Skip to content

Repository files navigation

TerraBuilder Logo

TerraBuilder v0.2.0

Visual Infrastructure-as-Code Compiler
Drag-and-drop your cloud architecture — get production-ready Terraform, CloudFormation, Bicep, or Pulumi output instantly.

CI Status MIT License Node ≥ 20 pnpm ≥ 9 TypeScript 5.9 PRs Welcome


What is TerraBuilder?

TerraBuilder is an open-source, browser-based tool that lets you visually design cloud infrastructure and compile it directly to Infrastructure-as-Code. Instead of hand-writing HCL, YAML, Bicep, or TypeScript from scratch, you drag resources onto a canvas, connect them, configure their properties, and TerraBuilder generates valid, production-ready code in seconds.


📸 Screenshots

Real-Time Stock Market Pipeline (AWS)

10 Resources · 6 Connections · $44.00/mo estimated · 🟢 100/100 Security Score
AWS Lambda processing, S3 raw data lake, DynamoDB tables, CloudWatch monitoring — all auto-wired with topological dependency resolution. Terraform HCL generated instantly with provider blocks, resource references, and tags.

TerraBuilder — Real-Time Stock Pipeline


3-Tier AWS Web Application

5 Resources · 3 Connections · $39.90/mo estimated · 🟢 100/100 Security Score
Application Load Balancer → EC2 web server → RDS PostgreSQL database with S3 assets bucket and Security Group. All resources secured by default (encryption at rest, deletion protection, HTTPS enforcement). Output switches between Terraform HCL, CloudFormation, Azure Bicep, and Pulumi TS with one click.

TerraBuilder — 3-Tier AWS Web App


GCP ML Pipeline (Multi-Service)

5 Resources · 4 Connections · $22.50/mo estimated · 🟢 100/100 Security Score
Google Cloud Storage data lake → Cloud Functions data processor → Cloud Run ML API → BigQuery dataset — a complete ML inference pipeline visually designed in seconds. Live cost estimation and security scanning run on every canvas change.

TerraBuilder — GCP ML Pipeline


✨ Features

Feature Description
🎨 Visual Canvas Node-based drag-and-drop canvas powered by React Flow
☁️ Multi-Cloud AWS, Azure, and GCP resource schemas included
🔄 4 Multi-Format Emitters Generate Terraform HCL, CloudFormation YAML, Azure Bicep, or Pulumi TypeScript
📦 Project Bundle Exporter Export multi-file project bundles (`main.tf`, `variables.tf`, `outputs.tf`, `provider.tf`, CI Workflows, `Pulumi.yaml`)
📸 Architecture Screenshot Export Export architecture diagrams directly to SVG/PNG for GitHub READMEs & docs
💰 Live Cost Estimator Real-time monthly pricing calculations per resource & canvas total
🔗 Smart Dependency Resolution Topological sort (Kahn's algorithm) auto-wires resource references
🛡️ Security Scanning Built-in static analysis flags misconfigurations before deployment
📝 Monaco Editor Syntax-highlighted code preview with copy-to-clipboard
Undo / Redo Full history stack (`Ctrl+Z` / `Ctrl+Y`) across the canvas
🗂️ Template Gallery Pre-built architecture templates (VPC, serverless pipeline, and more)
Field Validation Per-resource validation with clear inline error messages

🏗️ Architecture

TerraBuilder is a Turborepo monorepo structured as follows:

``` terrabuilder/ ├── apps/ │ └── web/ # Vite 6 + React 19 frontend ├── packages/ │ ├── engine/ # Graph resolver, validator, history stack, cost estimator │ ├── schemas/ # AWS / Azure / GCP resource schemas & types │ ├── emitters/ # Code generators: Terraform, CloudFormation, Bicep, Pulumi & Zip Bundler │ └── security/ # Static security analysis & auto-fix rules ├── turbo.json └── pnpm-workspace.yaml ```

Tech Stack

Layer Technologies
Frontend React 19, TypeScript, Zustand, React Flow, Monaco Editor
Styling Vanilla CSS (custom design system)
Build Vite 6, Turborepo 2, pnpm workspaces
Testing Vitest
Quality TypeScript strict mode, ESLint

🚀 Getting Started

Prerequisites

```bash

Install pnpm if you don't already have it

npm install -g pnpm@latest ```

Installation

```bash

1. Clone the repository

git clone https://github.com/DOWNEY7/terrabuilder.git cd terrabuilder

2. Install workspace dependencies

pnpm install

3. Start the development server

pnpm dev ```

The app will be running at http://localhost:5173 🎉

Available Scripts

```bash pnpm dev # Start the development server pnpm build # Build all packages and the web app pnpm test # Run all tests (Vitest) pnpm type-check # TypeScript strict type-check across the monorepo pnpm lint # ESLint across all packages pnpm clean # Remove all dist/ and .turbo/ caches ```


🗺️ Roadmap

  • Terraform HCL emitter
  • CloudFormation YAML emitter
  • Azure Bicep emitter
  • Pulumi TypeScript emitter
  • Architecture Diagram image export
  • Multi-file project bundler
  • Cost estimation engine
  • Ansible playbook emitter
  • Real-time collaboration (WebSockets / CRDTs)
  • Import existing Terraform state into the canvas
  • VS Code extension

🤝 Contributing

Contributions of all kinds are welcome — bug fixes, new features, documentation, new resource schemas, or new emitters.

Please read the Contributing Guide before submitting a pull request.

```bash

Quick contributor workflow

git checkout -b feat/your-feature-name

make your changes

pnpm test && pnpm type-check git commit -m "feat: describe your change" git push origin feat/your-feature-name

open a Pull Request on GitHub

```

We follow Conventional Commits for all commit messages.


📄 License

Distributed under the MIT License. See `LICENSE` for details.


🙏 Acknowledgements


Made with ❤️ by Farid Downey and contributors

About

Visual Infrastructure-as-Code Compiler — drag-and-drop Terraform, CloudFormation & Bicep builder

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages