Skip to content

Repository files navigation

TerraBuilder Logo

TerraBuilder v0.4.0

Visual Infrastructure-as-Code Compiler & Cyber Security Guardrail Engine
Drag-and-drop your cloud architecture — get production-ready, security-hardened Terraform, CloudFormation, Bicep, Pulumi, or Ansible output instantly.

CI Status MIT License Node ≥ 20 pnpm ≥ 9 TypeScript 5.9 24+ Security Rules Compliance Badges


What is TerraBuilder?

TerraBuilder is an open-source, browser-based visual infrastructure compiler that bridges the gap between cloud architecture diagrams and enterprise-grade 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 automatically analyzes security guardrails, estimates live monthly costs, and generates production-ready code with automated CI/CD deployment pipelines.


📸 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, Pulumi TS, and Ansible 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 Support AWS, Azure, and GCP resource schemas with secure defaults
🔄 5 Multi-Format Emitters Generate Terraform HCL, CloudFormation YAML, Azure Bicep, Pulumi TypeScript, or Ansible Playbooks
🛡️ Enterprise Cyber Security Engine 24+ built-in security rules mapped to CIS Benchmarks, SOC 2, NIST SP 800-53, and PCI-DSS
🔑 Secret & Credential Scanner Automatic detection of hardcoded plaintext secrets, API keys, passwords, and tokens (SEC-001)
📋 Security Audit Report Export One-click export of comprehensive Markdown Cybersecurity & Compliance Audit Reports
📦 Project Bundle Exporter Export complete multi-file project archives with automated Trivy / Checkov security scanning CI/CD pipelines
📸 Architecture Diagram Export Export architecture diagrams directly to SVG/PNG for GitHub READMEs & documentation
💰 Live Cost Estimator Real-time monthly pricing calculations per resource with visual cost breakdown charts
🔗 Topological Dependency Resolution Directed acyclic graph (DAG) resolution automatically wires resource references (vpc_id, subnet_id, etc.)
Instant Auto-Fix One-click auto-remediation for detected infrastructure vulnerabilities and misconfigurations
📝 Monaco Editor Syntax-highlighted code preview with copy-to-clipboard and multi-file project switching
Undo / Redo Full history stack (Ctrl+Z / Ctrl+Y) across the canvas
🗑️ Delete Key Select any node and press Delete or Backspace to remove it
💾 Auto-Save Canvas state persisted to localStorage — your work survives page refreshes
🔔 Toast Notifications Slide-in notifications for exports, imports, template loads, and deletes
🗂️ Template Gallery Pre-built architecture templates (3-tier web app, serverless pipeline, GKE/EKS clusters, and more)

🏗️ 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
  • Ansible Playbook emitter
  • Architecture Diagram image export
  • Multi-file project bundler
  • Cost estimation engine with breakdown panel
  • LocalStorage auto-save persistence
  • Toast notification system
  • Delete key keyboard shortcut
  • Azure Container Apps schema
  • 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

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages