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.
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.
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.
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.
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.
| 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) |
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 ```
| 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 |
```bash
npm install -g pnpm@latest ```
```bash
git clone https://github.com/DOWNEY7/terrabuilder.git cd terrabuilder
pnpm install
pnpm dev ```
The app will be running at http://localhost:5173 🎉
```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 ```
- 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
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
git checkout -b feat/your-feature-name
pnpm test && pnpm type-check git commit -m "feat: describe your change" git push origin feat/your-feature-name
```
We follow Conventional Commits for all commit messages.
Distributed under the MIT License. See `LICENSE` for details.
- React Flow — the node-based canvas library
- Monaco Editor — VS Code's editor, in the browser
- Turborepo — high-performance monorepo build system
- Zustand — lightweight state management
- Lucide React — beautiful open-source icon library
Made with ❤️ by Farid Downey and contributors


