Terraform Infrastructure Builder
Run ID: 69ccb37f3e7fb09ff16a45242026-04-01Infrastructure
PantheraHive BOS
BOS Dashboard

Generate production-ready Terraform configurations for cloud infrastructure including VPC, compute, storage, databases, and networking.

Step 1 of 3: Research & Design Requirements for Terraform Infrastructure Builder

This document outlines the comprehensive design specifications, wireframe descriptions, color palettes, and user experience (UX) recommendations for the "Terraform Infrastructure Builder" tool. The goal is to create an intuitive, powerful, and production-ready interface that empowers users to generate robust Terraform configurations for their cloud infrastructure needs.


1. Project Overview & Goals

The Terraform Infrastructure Builder aims to simplify and accelerate the process of defining and generating Terraform configuration files for cloud infrastructure. It will provide a guided, user-friendly interface to configure common cloud resources across various providers, reducing manual coding errors and ensuring adherence to best practices.

Key Goals:

  • Efficiency: Drastically reduce the time and effort required to write Terraform configurations from scratch.
  • Accuracy: Minimize human error through guided inputs and validation.
  • Consistency: Promote standardized infrastructure patterns and best practices.
  • Accessibility: Enable users with varying levels of Terraform expertise to build infrastructure.
  • Modularity: Allow users to select and configure only the components they need.
  • Transparency: Provide clear visibility into the generated Terraform code.

2. Detailed Design Specifications

2.1 Functional Requirements

  • Cloud Provider Selection:

* Ability to select a target cloud provider (e.g., AWS, Azure, GCP).

* Dynamic adaptation of available resources and configuration options based on the selected provider.

  • Core Infrastructure Component Configuration:

* Networking (VPC/VNet/VPC Network):

* Define primary CIDR blocks.

* Create public and private subnets with custom CIDR ranges.

* Configure Internet Gateways, NAT Gateways, Route Tables.

* Define Security Groups/Network Security Groups and associated rules.

* Compute (Instances/VMs/Kubernetes):

* Launch individual instances/VMs (OS, instance type, key pairs).

* Configure Auto Scaling Groups/VM Scale Sets (min/max/desired capacity, scaling policies).

* Provision Managed Kubernetes Clusters (EKS, AKS, GKE) with node pools.

* Storage (Object/Block/File):

* Create Object Storage Buckets (S3, Azure Blob, GCS) with versioning, lifecycle rules.

* Provision Block Storage Volumes (EBS, Azure Disks, Persistent Disks) with size, type.

* Configure File Storage (EFS, Azure Files, Filestore).

* Databases (Managed Relational/NoSQL):

* Provision Managed Relational Databases (RDS, Azure SQL DB, Cloud SQL) with engine, version, size, multi-AZ.

* Configure Managed NoSQL Databases (DynamoDB, Cosmos DB, Firestore).

* Load Balancing & DNS:

* Configure Application/Network Load Balancers.

* Integrate with DNS services (Route 53, Azure DNS, Cloud DNS).

  • Input Validation:

* Real-time validation of all user inputs (e.g., CIDR format, resource naming conventions, required fields).

* Clear error messages and suggestions for correction.

  • Configuration Review & Editing:

* A summary page displaying all selected components and their configurations.

* An integrated code editor to preview the generated Terraform HCL.

* Option to make minor edits directly to the HCL before export (with a warning about potential desynchronization from UI).

  • Export & Integration:

* Download generated Terraform files as a .zip archive.

* (Future) Direct integration with Git repositories (e.g., GitHub, GitLab) for push functionality.

* (Future) Generate backend.tf and provider.tf files based on user inputs (e.g., S3 backend, region).

  • Templates & Blueprints (Future):

* Ability to start from pre-defined architecture templates (e.g., "Web App with Database," "Basic Kubernetes Cluster").

* Option to save custom configurations as reusable templates.

2.2 Non-Functional Requirements

  • Performance: Fast loading times, responsive UI interactions.
  • Security: Input sanitization, no storage of sensitive credentials within the builder itself. Generated code should follow security best practices (e.g., least privilege for IAM).
  • Scalability: The underlying generation logic should be extensible to support new cloud resources and providers.
  • Usability: Intuitive workflow, clear navigation, minimal learning curve.
  • Maintainability: Modular code architecture for easy updates and feature additions.
  • Cross-Browser Compatibility: Support for modern web browsers (Chrome, Firefox, Edge, Safari).
  • Accessibility: Adherence to WCAG 2.1 guidelines for users with disabilities.

3. Wireframe Descriptions

The builder will follow a multi-step, wizard-like approach combined with an intuitive sidebar navigation for quick jumps between sections.

3.1 Screen 1: Welcome & Project Setup

  • Layout: Centered content with a clear call to action.
  • Elements:

* Header: "Terraform Infrastructure Builder"

* Project Name Input: Text field for "Project Name" (e.g., my-web-app-dev).

* Cloud Provider Selection: Dropdown or radio buttons for "Select Cloud Provider" (AWS, Azure, GCP).

* Region Selection: Dropdown for "Primary Region" (dynamically populated based on provider).

* Description (Optional): Textarea for project description.

* "Get Started" Button: Primary action button.

  • Interaction: Selecting a cloud provider will influence subsequent available options.

3.2 Screen 2: Infrastructure Components Selection

  • Layout: Two-column layout with a fixed left sidebar for navigation and the main content area on the right.
  • Elements:

* Left Sidebar Navigation:

* Project Setup (Completed)

* Networking (Active)

* Compute

* Storage

* Databases

* Load Balancers

* Review & Generate

* Main Content Area:

* Header: "Networking Configuration"

* VPC/VNet Creation:

* "Create New VPC/VNet?" Toggle (Yes/No).

* If Yes: "CIDR Block" input, "Number of Public Subnets" selector, "Number of Private Subnets" selector.

* Automatic CIDR allocation suggestions for subnets.

* Security Groups/Network Security Groups:

* "Add Security Group" button.

* For each SG: Name, Description, Ingress Rules (Source, Port, Protocol), Egress Rules.

* Navigation Buttons: "Previous," "Next: Compute" (or "Next: [Next Active Section]").

  • Interaction: As users configure components, a visual summary or a "resource count" might update in the sidebar.

3.3 Screen 3-5: Compute, Storage, Databases Configuration (Similar Pattern)

  • Layout: Consistent two-column layout with sidebar navigation.
  • Elements (Example for Compute):

* Left Sidebar Navigation: Highlighting "Compute."

* Main Content Area:

* Header: "Compute Configuration"

* "Add EC2 Instance" / "Add VM" / "Add Kubernetes Cluster" Buttons.

* Component Cards/Panels:

* Each added component (e.g., "Web Server EC2 Instance") gets an expandable card.

* Card Elements: Name, Instance Type, AMI/Image, Key Pair, Security Groups, User Data, Auto Scaling options (min/max, desired, health checks).

* Actions: Edit, Duplicate, Delete.

* Navigation Buttons: "Previous," "Next: Storage."

  • Interaction: Adding a component reveals a detailed configuration form. Users can add multiple instances of each component type.

3.6 Screen 6: Review & Generate

  • Layout: Three-column layout or two-column with a split right pane.
  • Elements:

* Left Sidebar Navigation: Highlighting "Review & Generate."

* Middle Pane: Configuration Summary:

* Hierarchical list or accordion view of all configured resources.

* Clicking a resource shows its key properties.

* "Edit" button next to each resource to jump back to its configuration screen.

* Right Pane: Terraform Code Preview:

* Read-only code editor displaying the generated HCL.

* Syntax highlighting.

* Tabbed view for main.tf, variables.tf, outputs.tf (if applicable).

* "Copy All Code" button.

* Bottom Actions:

* "Download .zip" Button: Primary action.

* (Future) "Connect to Git & Push" Button: Secondary action.

* "Previous" Button.

  • Interaction: Users can review the full configuration and the resulting Terraform code before downloading.

4. Color Palettes

A professional, clean, and cloud-provider-agnostic palette will be used, with subtle accents to guide the user.

  • Primary Palette (Neutrals):

* #FFFFFF (White): Backgrounds, cards.

* #F8F9FA (Light Grey): Subtle section backgrounds, hover states.

* #E9ECEF (Border Grey): Dividers, borders.

* #CED4DA (Input Border Grey): Form input borders.

* #495057 (Dark Grey): Primary text.

* #6C757D (Medium Grey): Secondary text, labels.

  • Accent Palette:

* #007BFF (Primary Blue): Buttons, links, active navigation items.

* #0056B3 (Darker Blue): Hover state for primary actions.

* #28A745 (Success Green): Positive feedback, success messages.

* #DC3545 (Danger Red): Error messages, destructive actions.

* #FFC107 (Warning Yellow): Warning messages, important notices.

* #17A2B8 (Info Teal): Informational messages, hints.

  • Typography:

* Font Family: A clean, modern sans-serif font like Inter, Roboto, or Open Sans.

* Headings: Bold, slightly larger font sizes for H1, H2, H3.

* Body Text: Readable font size (e.g., 16px).

5. UX Recommendations

  • Clear Visual Hierarchy: Use consistent headings, spacing, and card layouts to group related information and guide the user's eye.
  • Progressive Disclosure: Only show information or options when they are relevant. For example, advanced options can be hidden behind toggles or "Show Advanced" links.
  • Inline Validation & Feedback: Provide immediate feedback on input errors, rather than waiting for form submission. Use clear error messages that explain what went wrong and how to fix it.
  • Contextual Help & Tooltips: For complex fields or concepts, offer small info icons (i) that reveal tooltips with brief explanations or links to documentation.
  • "Save Draft" / Auto-Save: For longer configurations, implement an auto-save feature or a prominent "Save Draft" button to prevent loss of work.
  • Keyboard Accessibility: Ensure all interactive elements are reachable and operable via keyboard navigation.
  • Responsive Design: The interface should be fully functional and aesthetically pleasing on various screen sizes, from desktops to tablets.
  • Undo/Redo (Consideration): For highly complex configurations, an undo/redo history could be valuable, though it adds significant complexity to implementation.
  • Consistent Iconography: Use a clear and consistent set of icons to represent actions (e.g., add, edit, delete) and categories.
  • Visual Indicators for State: Use color, icons, and text to clearly indicate the status of an item (e.g., "Configured," "Pending," "Error").
  • Empty States: Design friendly and informative empty states for sections where no components have been added yet, guiding the user on how to proceed.
  • Confirmation Dialogs: For destructive actions (e.g., deleting a component), always provide a clear confirmation dialog.

This detailed design specification provides a robust foundation for the development of the Terraform Infrastructure Builder, ensuring a user-centric, efficient, and professional tool.

gemini Output

Terraform Infrastructure Builder: Design Specifications

This document outlines the detailed design specifications, wireframe descriptions, color palettes, and user experience (UX) recommendations for the "Terraform Infrastructure Builder" tool. The goal is to create an intuitive, powerful, and production-ready interface that empowers users to generate, manage, and validate Terraform configurations for various cloud providers.


1. Project Overview & Core Objectives

The "Terraform Infrastructure Builder" aims to streamline the creation of cloud infrastructure by providing a guided, visual, and intelligent interface to generate Terraform configurations. This tool will abstract away some of the initial complexities of writing Terraform from scratch, while still providing the flexibility and power required for production-grade deployments.

Core Objectives:

  • Simplify Terraform Generation: Reduce the learning curve for new users and accelerate development for experienced users.
  • Ensure Production Readiness: Incorporate best practices, modularity, and security considerations by default.
  • Support Multi-Cloud: Offer comprehensive support for major cloud providers (AWS, Azure, GCP).
  • Enhance Collaboration: Facilitate team-based infrastructure design and version control integration.
  • Provide Transparency: Allow users to view and understand the generated Terraform code.

2. Detailed Design Specifications

2.1. Core Functionality

The builder will encompass the following key capabilities:

  • Cloud Provider Selection:

* Action: User selects target cloud provider (AWS, Azure, GCP).

* Impact: Dynamically loads provider-specific resources, attributes, and best practices.

  • Project & Environment Management:

* Action: Define project name, environment (dev, staging, prod), and target region(s).

* Impact: Establishes naming conventions, resource tagging, and potentially different configurations (e.g., instance sizes per environment).

  • Resource Catalog & Selection:

* Action: Browse and select infrastructure components (VPC, EC2/VM, S3/Blob Storage, RDS/SQL DB, Load Balancers, Security Groups, DNS, Kubernetes clusters).

* Impact: Adds chosen resources to the configuration workspace. The catalog will be categorized logically (e.g., Networking, Compute, Storage, Database, Security).

  • Resource Configuration Panel:

* Action: For each selected resource, users input specific parameters (e.g., VPC CIDR, EC2 instance type, disk size, database engine version, security group rules).

* Impact: Configures the attributes of the Terraform resource block. Intelligent defaults and input validation will guide users.

  • Module/Template Management:

* Action: Utilize pre-built, opinionated modules (e.g., a "secure web server stack" module) or integrate custom modules.

* Impact: Promotes reusability, consistency, and adherence to organizational standards. Users can import existing modules or save their configurations as new modules.

  • Dependency Management & Visualization:

* Action: The tool will automatically detect and suggest dependencies (e.g., an EC2 instance needs a VPC and a subnet). Users can visually link resources.

* Impact: Ensures correct depends_on relationships and resource ordering in the generated Terraform.

  • Output Generation:

* Action: On completion, generate a complete set of Terraform files (main.tf, variables.tf, outputs.tf, providers.tf, versions.tf).

* Impact: Provides production-ready Terraform code that can be directly applied.

  • Code Preview & Editing (Optional/Limited):

* Action: View the generated Terraform code in a read-only or limited-edit text editor within the UI.

* Impact: Offers transparency and allows for quick, minor manual adjustments if permitted.

  • Validation & Linting:

* Action: Automatically run terraform validate and terraform fmt (or similar internal checks) against the generated code. Linting against best practices (e.g., terraform-docs compatibility, resource tagging).

* Impact: Catches syntax errors, formatting issues, and flags potential security or configuration anti-patterns before deployment.

  • Version Control Integration:

* Action: Push generated configurations directly to a Git repository (GitHub, GitLab, Bitbucket) as a new branch or pull request.

* Impact: Seamlessly integrates with existing CI/CD pipelines and team collaboration workflows.

  • Cost Estimation (Future Enhancement):

* Action: Provide an estimated cost breakdown based on the selected resources and their configurations.

* Impact: Helps users make cost-aware infrastructure decisions.

2.2. User Flow

The primary user flow for creating a new infrastructure configuration will be:

  1. Start New Configuration: User clicks "Create New Infrastructure" from the dashboard.
  2. Define Project & Cloud Provider:

* Select Cloud Provider (AWS/Azure/GCP).

* Enter Project Name, Description.

* Select Environment (Dev/Staging/Prod).

* Choose primary Region(s).

  1. Build Infrastructure (Iterative Process):

* Add Networking:

* Select VPC/VNet.

* Configure CIDR, subnets (public/private), NAT Gateways, Internet Gateways.

* Add DNS zones.

* Add Compute:

* Select EC2/VM instances or Auto Scaling Groups, Kubernetes clusters.

* Configure instance type, AMI/Image, disk size, security groups, key pairs.

* Add Storage:

* Select S3 buckets/Blob containers, EBS volumes/Managed Disks.

* Configure name, encryption, lifecycle rules.

* Add Database:

* Select RDS/Azure SQL DB/Cloud SQL.

* Configure engine, version, instance size, storage, backups, security group.

* Add Security & Load Balancing:

* Define Security Groups/Network Security Groups.

* Add Application Load Balancers/Azure Application Gateways.

* Review & Refine:

* Review the list of added resources.

* Adjust dependencies or relationships if needed.

* Utilize visual representation (if implemented) to understand the architecture.

  1. Validate Configuration:

* Click "Validate" to run internal checks and linting.

* Address any warnings or errors.

  1. Generate & Export/Push:

* Click "Generate Terraform" to create .tf files.

* Preview the generated code.

* Choose export option:

* Download as ZIP.

* Push to Git repository (select branch, commit message, create PR).

  1. Confirmation & Next Steps:

* Confirmation of successful export/push.

* Guidance on how to terraform init, plan, and apply.


3. Wireframe Descriptions

The user interface will be structured around a clean, multi-panel layout to provide both context and detail.

3.1. Dashboard / Project List

  • Layout: Full-width, responsive.
  • Components:

* Header: Logo, User Profile, "New Project" button.

* Sidebar (Optional/Filter): Filters for Cloud Provider, Environment, Status.

* Main Content Area:

* Project Cards/Table: Each card/row represents an existing infrastructure configuration.

* Displays Project Name, Cloud Provider, Environment, Last Modified, Status (e.g., "Draft", "Generated", "Deployed" - if integrated with CI/CD).

* Action buttons: "Edit", "Duplicate", "Delete", "View Code".

* "Create New Infrastructure" CTA: Prominently displayed.

3.2. New Project / Configuration Wizard (Step-by-step)

  • Layout: Centralized modal or a multi-step form occupying the main content area.
  • Steps (Tabs/Progress Bar):

1. Project Details:

* Input fields: Project Name, Description, Cloud Provider dropdown, Environment dropdown, Region multi-select.

* "Next" button.

2. Naming Conventions (Optional):

* Input fields for prefix, suffix, tagging strategy.

* "Next" button.

3. Review & Confirm:

* Summary of selections.

* "Start Building" button.

3.3. Resource Builder Interface (Main Workspace)

  • Layout: Three-panel layout (Left Nav, Central Canvas/Form, Right Details Panel).
  • Components:

* Top Header Bar:

* Project Name & Cloud Provider.

* Action buttons: "Save Draft", "Validate", "Generate Terraform", "Export/Push to Git".

* Contextual help/documentation link.

* Left Navigation (Resource Catalog):

* Collapsible sections: "Networking", "Compute", "Storage", "Database", "Security", "Other".

* Within each section: List of available resources (e.g., "VPC", "EC2 Instance", "S3 Bucket", "RDS Database").

* Drag-and-drop functionality or click-to-add.

* Search bar for resources.

* Central Canvas / Workspace:

* Option A (Form-based): A list of added resources. Clicking on a resource highlights it and populates the Right Details Panel.

* Option B (Visual Diagram - Advanced): A canvas where resources can be dragged, dropped, and visually linked. Clicking on a resource selects it and populates the Right Details Panel. This would show relationships (e.g., EC2 inside a Subnet).

* "Add Resource" button: Prominent, often "+" icon.

* Right Details Panel (Resource Configuration):

* Displays detailed configuration forms for the currently selected resource.

* Sections: "Basic Settings", "Network Configuration", "Security", "Advanced Options", "Tags".

* Input fields (text, dropdowns, toggles, multi-selects) with clear labels, default values, and inline validation.

* Contextual tooltips for complex parameters.

* "Remove Resource" button.

* "Apply Changes" or auto-save.

3.4. Code Preview Panel

  • Layout: A modal dialog or a dedicated full-screen view.
  • Components:

* File Tabs: main.tf, variables.tf, outputs.tf, providers.tf, versions.tf.

* Code Editor: Read-only syntax-highlighted code editor (e.g., Monaco Editor).

* Copy to Clipboard button.

* Close button.

3.5. Export / Push to Git Dialog

  • Layout: Modal dialog.
  • Components:

* Download Option: "Download as ZIP" button.

* Git Integration Option:

* Dropdown for connected Git providers (GitHub, GitLab, Bitbucket).

* Repository selector.

* Branch name input (suggest default like feature/terraform-builder-<project-name>).

* Commit message input.

* Checkbox for "Create Pull Request".

* "Push to Git" button.

* Success/Error messages.


4. Color Palettes

A professional, clean, and trustworthy color scheme will be used, with clear distinctions for interactive elements and feedback.

4.1. Primary Palette

  • Deep Blue / Teal (Brand Accent): #007BFF (or a slightly darker shade like #0056B3) - Used for primary CTAs, active states, important headers. Represents trust, technology, clarity.
  • Dark Gray (Text & Primary UI): #343A40 - Main text color, strong UI elements.
  • Light Gray (Backgrounds & Borders): #F8F9FA / #E9ECEF - For page backgrounds, card backgrounds, subtle borders. Provides a clean, spacious feel.
  • White (Content Areas): #FFFFFF - For main content panels, forms, and cards to ensure readability.

4.2. Accent & Feedback Palette

  • Success Green: #28A745 - For successful operations, positive feedback.
  • Warning Yellow/Orange: #FFC107 (or #FFA000) - For warnings, attention-required messages.
  • Error Red: #DC3545 - For critical errors, destructive actions.
  • Information Blue: #17A2B8 - For informational messages, secondary actions.

4.3. UI Element Colors

  • Buttons (Primary): Background: Primary Blue, Text: White.
  • Buttons (Secondary): Background: Light Gray, Text: Dark Gray, Border: Medium Gray.
  • Hover States: Slightly darker shade of the primary color, or a subtle background change for neutral elements.
  • Active States: Primary Blue, with a distinct outline or bolder text.
  • Icons: Dark Gray by default, Primary Blue when active/hovered.

5. UX Recommendations

5.1. Clarity & Simplicity

  • Intuitive Labeling: Use clear, concise labels for all fields, buttons, and sections. Avoid technical jargon where simpler terms suffice.
  • Contextual Help: Implement tooltips (on hover) for complex fields or concepts,
gemini Output

This document details the design specifications, wireframe descriptions, color palettes, and user experience (UX) recommendations for a "Terraform Infrastructure Builder" application. This application aims to provide a intuitive graphical user interface (GUI) for users to design, visualize, generate, and manage their cloud infrastructure using Terraform.


Terraform Infrastructure Builder: Design Assets & UX Strategy

This deliverable outlines the comprehensive design strategy for a user-friendly and powerful "Terraform Infrastructure Builder" interface. The goal is to abstract the complexity of raw HCL (HashiCorp Configuration Language) while providing robust control and visibility over infrastructure provisioning.


1. Detailed Design Specifications

The "Terraform Infrastructure Builder" is envisioned as a web-based application or a rich desktop client designed for cloud architects, DevOps engineers, and developers. It will empower users to visually construct, validate, and deploy their cloud infrastructure across various providers (AWS, Azure, GCP, etc.) using a guided, intelligent approach.

1.1. Overall Vision & Goals

  • Simplify Terraform Adoption: Lower the barrier to entry for new Terraform users and accelerate development for experienced users.
  • Visual Infrastructure Design: Provide a drag-and-drop interface for constructing infrastructure visually, mapping directly to Terraform resources and modules.
  • Intelligent Configuration Generation: Automatically generate production-ready HCL based on user selections and best practices.
  • Version Control Integration: Seamlessly integrate with Git repositories for configuration management.
  • Real-time Feedback & Validation: Offer immediate validation of configurations against cloud provider schemas and best practices.
  • Deployment Workflow Management: Facilitate planning, applying, and destroying infrastructure directly from the UI.
  • Modularity & Reusability: Encourage the use and creation of reusable Terraform modules.

1.2. Key Features & Modules

  • Dashboard: Overview of projects, recent activities, and infrastructure status.
  • Visual Builder Canvas: Interactive workspace for dragging, dropping, and connecting infrastructure components.
  • Resource/Module Catalog: A searchable library of pre-defined Terraform resources and custom modules.
  • Property Panel: Context-sensitive panel for configuring resource attributes.
  • Code Editor/Viewer: Integrated editor for viewing and optionally editing generated HCL, tfvars, and state files.
  • Validation & Linting Engine: Real-time feedback on HCL syntax, best practices, and potential issues.
  • Deployment Workflow: Interface for terraform plan, apply, destroy operations, with clear output and approval mechanisms.
  • State Management: Visualization and management of Terraform state files.
  • Version Control Integration: Connect to Git repositories (GitHub, GitLab, Bitbucket, Azure DevOps) for pushing/pulling configurations.
  • Cloud Provider Integration: Configure credentials and target specific cloud environments.
  • Templating & Blueprints: Ability to save and reuse common infrastructure patterns as templates.

1.3. Interaction Patterns

  • Drag-and-Drop: Primary interaction for placing resources and modules on the canvas.
  • Contextual Menus: Right-click actions for resources (e.g., duplicate, delete, group, connect).
  • Form-based Input: Detailed configuration of resource properties via structured forms with intelligent defaults and validation.
  • Live Feedback: Instant visual cues for valid/invalid connections, resource states, and configuration errors.
  • Modal Dialogs: For critical actions like deployment confirmation, module creation, or project settings.
  • Search & Filter: Efficiently locate resources, modules, and project components.
  • Version Control UI: Clear indicators for uncommitted changes, branches, and commit history.

1.4. Technical Considerations (Relevant to Design)

  • Responsive Design: Adaptability for various screen sizes (though primarily targeting desktop).
  • Client-Side Rendering: Utilize modern JavaScript frameworks (React, Vue, Angular) for a dynamic and responsive UI.
  • API-Driven Backend: The UI will interact with a robust backend API for Terraform execution, state management, and cloud provider interactions.
  • WebSockets: Potentially for real-time terraform plan/apply output streaming.

2. Wireframe Descriptions

The following wireframe descriptions outline the key screens and their primary components.

2.1. Dashboard (Home Screen)

  • Layout: Two-column layout. Left sidebar for navigation, main content area for dashboard widgets.
  • Left Sidebar:

* Logo & Application Name.

* Navigation: Dashboard, Projects, Modules, Cloud Providers, Settings.

* User Profile/Account.

  • Main Content:

* "My Projects" Card: List of recently accessed or favorited projects. Each item shows Project Name, Cloud Provider, Last Modified, Status (e.g., "Deployed", "Draft"). "Create New Project" button.

* "Activity Feed" Card: Chronological list of recent actions (e.g., "Project X deployed by User Y", "Module Z updated").

* "Resource Usage Overview" Card (Optional): High-level summary of provisioned resources across projects (e.g., "5 VPCs, 20 EC2 instances").

* "Quick Links" Card: Buttons for common actions like "Browse Modules," "Connect Cloud Provider."

2.2. Project Builder Canvas

  • Layout: Primary canvas area, left resource panel, right property panel, top toolbar, bottom console.
  • Top Toolbar:

* Project Name & Status.

* Save, Undo/Redo.

* Zoom controls (in/out, fit to view).

* Layout options (auto-arrange).

* "Generate HCL," "Plan," "Apply," "Destroy" buttons.

* Cloud Provider Selector.

  • Left Resource Panel (Collapsible):

* Search bar for resources/modules.

* Categories: Compute, Networking, Storage, Database, Security, Custom Modules.

* Draggable icons/names for each resource (e.g., AWS VPC, EC2 Instance, S3 Bucket).

  • Central Canvas:

* Large, interactive grid/blank area.

* Drag-and-drop resources onto the canvas.

* Visual connections between resources (e.g., EC2 instance to VPC subnet).

* Grouping mechanisms (e.g., visually group resources within a VPC).

* Contextual right-click menu on resources.

  • Right Property Panel (Collapsible):

* Appears when a resource/module is selected on the canvas.

* Tabbed interface: "Configuration," "Outputs," "Dependencies."

* "Configuration" tab: Form fields for resource attributes (e.g., instance type, region, CIDR block). Intelligent defaults, validation errors.

* "Outputs" tab: Define Terraform outputs for the selected resource/module.

* "Dependencies" tab: Visualize and manage explicit/implicit dependencies.

  • Bottom Console/Output Panel (Collapsible):

* Tabbed interface: "HCL Code," "Plan Output," "Apply Logs," "Errors/Warnings."

* "HCL Code" tab: Read-only (or editable with warning) view of the generated main.tf, variables.tf, outputs.tf. Syntax highlighting.

* "Plan Output" tab: Displays the terraform plan output in a scrollable, formatted text area.

* "Apply Logs" tab: Displays real-time terraform apply logs.

2.3. Module/Resource Catalog

  • Layout: Main content area with search, filters, and a grid/list of modules/resources.
  • Top Bar: Search input, "Create New Module" button, Filter options (Cloud Provider, Category, Tag).
  • Module/Resource Cards:

* Each card displays: Name, Description, Cloud Provider, Version, Author, Usage Count (if applicable).

* "View Details" button, "Add to Project" button.

  • Module Detail View (Modal or New Page):

* Overview: Name, Description, README.md content.

* Inputs: List of required/optional variables with descriptions and types.

* Outputs: List of exposed outputs.

* Resources: List of Terraform resources contained within the module.

* Example Usage.

2.4. Code Editor/Viewer

  • Layout: Split panel. Left: File tree (main.tf, variables.tf, outputs.tf, terraform.tfvars). Right: Code editor.
  • File Tree: Standard directory structure, allowing users to switch between configuration files.
  • Code Editor:

* Monaco Editor (VS Code editor component) or similar.

* Syntax highlighting for HCL.

* Basic auto-completion (for Terraform keywords, resource names).

* Read-only by default, with an "Edit Mode" toggle that warns users about potential desynchronization with the visual builder.

* Save/Discard changes buttons.

2.5. Deployment & Plan Review

  • Layout: A modal dialog or a dedicated full-screen view.
  • Header: "Review and Deploy Infrastructure for [Project Name]".
  • Summary Panel:

* Current Git Branch.

* Last Plan Run Timestamp.

* Summary of changes: X to add, Y to change, Z to destroy (visualized with icons/colors).

  • Detailed Plan Output:

* Scrollable text area displaying the full terraform plan output.

* Syntax highlighting for resource changes (+/-/~) for clarity.

* Filtering options (e.g., show only additions, show only changes).

  • Action Buttons:

* "Cancel"

* "Rerun Plan"

* "Apply Changes" (with a confirmation step, potentially requiring typing project name)

* "Destroy Infrastructure" (highly visible warning, requires confirmation)

  • Deployment Progress: Real-time log output during apply/destroy operations.

3. Color Palettes

A professional, modern, and trustworthy color palette is crucial for a technical application. We'll leverage a combination of cool blues, neutral grays, and clear semantic colors.

3.1. Primary Palette

  • Primary Blue (#007bff / rgb(0, 123, 255)): Used for primary actions, active states, main navigation elements, and branding. Represents trust and professionalism.
  • Dark Blue (#0056b3 / rgb(0, 86, 179)): Hover/active state for primary elements.
  • Light Blue (#e0f2ff / rgb(224, 242, 255)): Backgrounds for selected items, subtle highlights.

3.2. Neutral Palette (Grayscale)

  • Text Dark (#212529 / rgb(33, 37, 41)): Primary text, headings.
  • Text Medium (#495057 / rgb(73, 80, 87)): Secondary text, labels.
  • Text Light (#6c757d / rgb(108, 117, 125)): Placeholder text, disabled states.
  • Background Light (#f8f9fa / rgb(248, 249, 250)): Main application background.
  • Background Medium (#e9ecef / rgb(233, 236, 239)): Card backgrounds, subtle section dividers.
  • Border/Divider (#dee2e6 / rgb(222, 226, 230)): Borders, lines.
  • Input Background (#ffffff / rgb(255, 255, 255)): Form input fields, main canvas background.

3.3. Accent & Semantic Palette

  • Success Green (#28a745 / rgb(40, 167, 69)): Positive feedback, successful deployments, resource additions (+).
  • Warning Orange (#ffc107 / rgb(255, 193, 7)): Cautions, minor issues, resource changes (~).
  • Danger Red (#dc3545 / rgb(220, 53, 69)): Errors, critical failures, resource deletions (-), destructive actions.
  • Info Teal (#17a2b8 / rgb(23, 162, 184)): Informational messages, non-critical alerts.

3.4. Iconography & Visuals

  • Icons: Utilize a consistent icon library (e.g., Font Awesome, Material Icons) for clarity and visual shorthand.
  • Cloud Provider Logos: Integrate official logos for AWS, Azure, GCP, etc., where appropriate.
  • Resource Icons: Simple, recognizable icons for common resources (e.g., server for EC2, database cylinder for RDS, storage bucket for S3).

4. UX Recommendations

User experience is paramount for a tool designed to manage complex infrastructure. These recommendations focus on usability, efficiency, and error prevention.

4.1. User Flow Optimization

  • Guided Onboarding: For first-time users, provide a quick tour or a "create your first project" wizard to introduce core functionalities.
  • Clear Call-to-Actions (CTAs): Ensure primary actions (e.g., "Create New Project," "Apply Changes") are prominently displayed and easily identifiable.
  • Contextual Help: Integrate tooltips, inline help text, and links to documentation for complex concepts or resource attributes.
  • Workflow Consistency: Maintain consistent interaction patterns and UI elements across different sections of the application.
  • Keyboard Shortcuts: Implement common keyboard shortcuts for power users (e.g
terraform_infrastructure_build.md
Download as Markdown
Copy all content
Full output as text
Download ZIP
IDE-ready project ZIP
Copy share link
Permanent URL for this run
Get Embed Code
Embed this result on any website
Print / Save PDF
Use browser print dialog
"); var hasSrcMain=Object.keys(extracted).some(function(k){return k.indexOf("src/main")>=0;}); if(!hasSrcMain) zip.file(folder+"src/main."+ext,"import React from 'react' import ReactDOM from 'react-dom/client' import App from './App' import './index.css' ReactDOM.createRoot(document.getElementById('root')!).render( ) "); var hasSrcApp=Object.keys(extracted).some(function(k){return k==="src/App."+ext||k==="App."+ext;}); if(!hasSrcApp) zip.file(folder+"src/App."+ext,"import React from 'react' import './App.css' function App(){ return(

"+slugTitle(pn)+"

Built with PantheraHive BOS

) } export default App "); zip.file(folder+"src/index.css","*{margin:0;padding:0;box-sizing:border-box} body{font-family:system-ui,-apple-system,sans-serif;background:#f0f2f5;color:#1a1a2e} .app{min-height:100vh;display:flex;flex-direction:column} .app-header{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:40px} h1{font-size:2.5rem;font-weight:700} "); zip.file(folder+"src/App.css",""); zip.file(folder+"src/components/.gitkeep",""); zip.file(folder+"src/pages/.gitkeep",""); zip.file(folder+"src/hooks/.gitkeep",""); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+" Generated by PantheraHive BOS. ## Setup ```bash npm install npm run dev ``` ## Build ```bash npm run build ``` ## Open in IDE Open the project folder in VS Code or WebStorm. "); zip.file(folder+".gitignore","node_modules/ dist/ .env .DS_Store *.local "); } /* --- Vue (Vite + Composition API + TypeScript) --- */ function buildVue(zip,folder,app,code,panelTxt){ var pn=pkgName(app); var C=cc(pn); var extracted=extractCode(panelTxt); zip.file(folder+"package.json",'{ "name": "'+pn+'", "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vue-tsc -b && vite build", "preview": "vite preview" }, "dependencies": { "vue": "^3.5.13", "vue-router": "^4.4.5", "pinia": "^2.3.0", "axios": "^1.7.9" }, "devDependencies": { "@vitejs/plugin-vue": "^5.2.1", "typescript": "~5.7.3", "vite": "^6.0.5", "vue-tsc": "^2.2.0" } } '); zip.file(folder+"vite.config.ts","import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import { resolve } from 'path' export default defineConfig({ plugins: [vue()], resolve: { alias: { '@': resolve(__dirname,'src') } } }) "); zip.file(folder+"tsconfig.json",'{"files":[],"references":[{"path":"./tsconfig.app.json"},{"path":"./tsconfig.node.json"}]} '); zip.file(folder+"tsconfig.app.json",'{ "compilerOptions":{ "target":"ES2020","useDefineForClassFields":true,"module":"ESNext","lib":["ES2020","DOM","DOM.Iterable"], "skipLibCheck":true,"moduleResolution":"bundler","allowImportingTsExtensions":true, "isolatedModules":true,"moduleDetection":"force","noEmit":true,"jsxImportSource":"vue", "strict":true,"paths":{"@/*":["./src/*"]} }, "include":["src/**/*.ts","src/**/*.d.ts","src/**/*.tsx","src/**/*.vue"] } '); zip.file(folder+"env.d.ts","/// "); zip.file(folder+"index.html"," "+slugTitle(pn)+"
"); var hasMain=Object.keys(extracted).some(function(k){return k==="src/main.ts"||k==="main.ts";}); if(!hasMain) zip.file(folder+"src/main.ts","import { createApp } from 'vue' import { createPinia } from 'pinia' import App from './App.vue' import './assets/main.css' const app = createApp(App) app.use(createPinia()) app.mount('#app') "); var hasApp=Object.keys(extracted).some(function(k){return k.indexOf("App.vue")>=0;}); if(!hasApp) zip.file(folder+"src/App.vue"," "); zip.file(folder+"src/assets/main.css","*{margin:0;padding:0;box-sizing:border-box}body{font-family:system-ui,sans-serif;background:#fff;color:#213547} "); zip.file(folder+"src/components/.gitkeep",""); zip.file(folder+"src/views/.gitkeep",""); zip.file(folder+"src/stores/.gitkeep",""); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+" Generated by PantheraHive BOS. ## Setup ```bash npm install npm run dev ``` ## Build ```bash npm run build ``` Open in VS Code or WebStorm. "); zip.file(folder+".gitignore","node_modules/ dist/ .env .DS_Store *.local "); } /* --- Angular (v19 standalone) --- */ function buildAngular(zip,folder,app,code,panelTxt){ var pn=pkgName(app); var C=cc(pn); var sel=pn.replace(/_/g,"-"); var extracted=extractCode(panelTxt); zip.file(folder+"package.json",'{ "name": "'+pn+'", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test" }, "dependencies": { "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", "@angular/core": "^19.0.0", "@angular/forms": "^19.0.0", "@angular/platform-browser": "^19.0.0", "@angular/platform-browser-dynamic": "^19.0.0", "@angular/router": "^19.0.0", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.15.0" }, "devDependencies": { "@angular-devkit/build-angular": "^19.0.0", "@angular/cli": "^19.0.0", "@angular/compiler-cli": "^19.0.0", "typescript": "~5.6.0" } } '); zip.file(folder+"angular.json",'{ "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "projects", "projects": { "'+pn+'": { "projectType": "application", "root": "", "sourceRoot": "src", "prefix": "app", "architect": { "build": { "builder": "@angular-devkit/build-angular:application", "options": { "outputPath": "dist/'+pn+'", "index": "src/index.html", "browser": "src/main.ts", "tsConfig": "tsconfig.app.json", "styles": ["src/styles.css"], "scripts": [] } }, "serve": {"builder":"@angular-devkit/build-angular:dev-server","configurations":{"production":{"buildTarget":"'+pn+':build:production"},"development":{"buildTarget":"'+pn+':build:development"}},"defaultConfiguration":"development"} } } } } '); zip.file(folder+"tsconfig.json",'{ "compileOnSave": false, "compilerOptions": {"baseUrl":"./","outDir":"./dist/out-tsc","forceConsistentCasingInFileNames":true,"strict":true,"noImplicitOverride":true,"noPropertyAccessFromIndexSignature":true,"noImplicitReturns":true,"noFallthroughCasesInSwitch":true,"paths":{"@/*":["src/*"]},"skipLibCheck":true,"esModuleInterop":true,"sourceMap":true,"declaration":false,"experimentalDecorators":true,"moduleResolution":"bundler","importHelpers":true,"target":"ES2022","module":"ES2022","useDefineForClassFields":false,"lib":["ES2022","dom"]}, "references":[{"path":"./tsconfig.app.json"}] } '); zip.file(folder+"tsconfig.app.json",'{ "extends":"./tsconfig.json", "compilerOptions":{"outDir":"./dist/out-tsc","types":[]}, "files":["src/main.ts"], "include":["src/**/*.d.ts"] } '); zip.file(folder+"src/index.html"," "+slugTitle(pn)+" "); zip.file(folder+"src/main.ts","import { bootstrapApplication } from '@angular/platform-browser'; import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; bootstrapApplication(AppComponent, appConfig) .catch(err => console.error(err)); "); zip.file(folder+"src/styles.css","* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: system-ui, -apple-system, sans-serif; background: #f9fafb; color: #111827; } "); var hasComp=Object.keys(extracted).some(function(k){return k.indexOf("app.component")>=0;}); if(!hasComp){ zip.file(folder+"src/app/app.component.ts","import { Component } from '@angular/core'; import { RouterOutlet } from '@angular/router'; @Component({ selector: 'app-root', standalone: true, imports: [RouterOutlet], templateUrl: './app.component.html', styleUrl: './app.component.css' }) export class AppComponent { title = '"+pn+"'; } "); zip.file(folder+"src/app/app.component.html","

"+slugTitle(pn)+"

Built with PantheraHive BOS

"); zip.file(folder+"src/app/app.component.css",".app-header{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:60vh;gap:16px}h1{font-size:2.5rem;font-weight:700;color:#6366f1} "); } zip.file(folder+"src/app/app.config.ts","import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; import { provideRouter } from '@angular/router'; import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { providers: [ provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes) ] }; "); zip.file(folder+"src/app/app.routes.ts","import { Routes } from '@angular/router'; export const routes: Routes = []; "); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+" Generated by PantheraHive BOS. ## Setup ```bash npm install ng serve # or: npm start ``` ## Build ```bash ng build ``` Open in VS Code with Angular Language Service extension. "); zip.file(folder+".gitignore","node_modules/ dist/ .env .DS_Store *.local .angular/ "); } /* --- Python --- */ function buildPython(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^```[w]* ?/m,"").replace(/ ?```$/m,"").trim(); var reqMap={"numpy":"numpy","pandas":"pandas","sklearn":"scikit-learn","tensorflow":"tensorflow","torch":"torch","flask":"flask","fastapi":"fastapi","uvicorn":"uvicorn","requests":"requests","sqlalchemy":"sqlalchemy","pydantic":"pydantic","dotenv":"python-dotenv","PIL":"Pillow","cv2":"opencv-python","matplotlib":"matplotlib","seaborn":"seaborn","scipy":"scipy"}; var reqs=[]; Object.keys(reqMap).forEach(function(k){if(src.indexOf("import "+k)>=0||src.indexOf("from "+k)>=0)reqs.push(reqMap[k]);}); var reqsTxt=reqs.length?reqs.join(" "):"# add dependencies here "; zip.file(folder+"main.py",src||"# "+title+" # Generated by PantheraHive BOS print(title+" loaded") "); zip.file(folder+"requirements.txt",reqsTxt); zip.file(folder+".env.example","# Environment variables "); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. ## Setup ```bash python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt ``` ## Run ```bash python main.py ``` "); zip.file(folder+".gitignore",".venv/ __pycache__/ *.pyc .env .DS_Store "); } /* --- Node.js --- */ function buildNode(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^```[w]* ?/m,"").replace(/ ?```$/m,"").trim(); var depMap={"mongoose":"^8.0.0","dotenv":"^16.4.5","axios":"^1.7.9","cors":"^2.8.5","bcryptjs":"^2.4.3","jsonwebtoken":"^9.0.2","socket.io":"^4.7.4","uuid":"^9.0.1","zod":"^3.22.4","express":"^4.18.2"}; var deps={}; Object.keys(depMap).forEach(function(k){if(src.indexOf(k)>=0)deps[k]=depMap[k];}); if(!deps["express"])deps["express"]="^4.18.2"; var pkgJson=JSON.stringify({"name":pn,"version":"1.0.0","main":"src/index.js","scripts":{"start":"node src/index.js","dev":"nodemon src/index.js"},"dependencies":deps,"devDependencies":{"nodemon":"^3.0.3"}},null,2)+" "; zip.file(folder+"package.json",pkgJson); var fallback="const express=require("express"); const app=express(); app.use(express.json()); app.get("/",(req,res)=>{ res.json({message:""+title+" API"}); }); const PORT=process.env.PORT||3000; app.listen(PORT,()=>console.log("Server on port "+PORT)); "; zip.file(folder+"src/index.js",src||fallback); zip.file(folder+".env.example","PORT=3000 "); zip.file(folder+".gitignore","node_modules/ .env .DS_Store "); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. ## Setup ```bash npm install ``` ## Run ```bash npm run dev ``` "); } /* --- Vanilla HTML --- */ function buildVanillaHtml(zip,folder,app,code){ var title=slugTitle(app); var isFullDoc=code.trim().toLowerCase().indexOf("=0||code.trim().toLowerCase().indexOf("=0; var indexHtml=isFullDoc?code:" "+title+" "+code+" "; zip.file(folder+"index.html",indexHtml); zip.file(folder+"style.css","/* "+title+" — styles */ *{margin:0;padding:0;box-sizing:border-box} body{font-family:system-ui,-apple-system,sans-serif;background:#fff;color:#1a1a2e} "); zip.file(folder+"script.js","/* "+title+" — scripts */ "); zip.file(folder+"assets/.gitkeep",""); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. ## Open Double-click `index.html` in your browser. Or serve locally: ```bash npx serve . # or python3 -m http.server 3000 ``` "); zip.file(folder+".gitignore",".DS_Store node_modules/ .env "); } /* ===== MAIN ===== */ var sc=document.createElement("script"); sc.src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"; sc.onerror=function(){ if(lbl)lbl.textContent="Download ZIP"; alert("JSZip load failed — check connection."); }; sc.onload=function(){ var zip=new JSZip(); var base=(_phFname||"output").replace(/.[^.]+$/,""); var app=base.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")||"my_app"; var folder=app+"/"; var vc=document.getElementById("panel-content"); var panelTxt=vc?(vc.innerText||vc.textContent||""):""; var lang=detectLang(_phCode,panelTxt); if(_phIsHtml){ buildVanillaHtml(zip,folder,app,_phCode); } else if(lang==="flutter"){ buildFlutter(zip,folder,app,_phCode,panelTxt); } else if(lang==="react-native"){ buildReactNative(zip,folder,app,_phCode,panelTxt); } else if(lang==="swift"){ buildSwift(zip,folder,app,_phCode,panelTxt); } else if(lang==="kotlin"){ buildKotlin(zip,folder,app,_phCode,panelTxt); } else if(lang==="react"){ buildReact(zip,folder,app,_phCode,panelTxt); } else if(lang==="vue"){ buildVue(zip,folder,app,_phCode,panelTxt); } else if(lang==="angular"){ buildAngular(zip,folder,app,_phCode,panelTxt); } else if(lang==="python"){ buildPython(zip,folder,app,_phCode); } else if(lang==="node"){ buildNode(zip,folder,app,_phCode); } else { /* Document/content workflow */ var title=app.replace(/_/g," "); var md=_phAll||_phCode||panelTxt||"No content"; zip.file(folder+app+".md",md); var h=""+title+""; h+="

"+title+"

"; var hc=md.replace(/&/g,"&").replace(//g,">"); hc=hc.replace(/^### (.+)$/gm,"

$1

"); hc=hc.replace(/^## (.+)$/gm,"

$1

"); hc=hc.replace(/^# (.+)$/gm,"

$1

"); hc=hc.replace(/**(.+?)**/g,"$1"); hc=hc.replace(/ {2,}/g,"

"); h+="

"+hc+"

Generated by PantheraHive BOS
"; zip.file(folder+app+".html",h); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. Files: - "+app+".md (Markdown) - "+app+".html (styled HTML) "); } zip.generateAsync({type:"blob"}).then(function(blob){ var a=document.createElement("a"); a.href=URL.createObjectURL(blob); a.download=app+".zip"; a.click(); URL.revokeObjectURL(a.href); if(lbl)lbl.textContent="Download ZIP"; }); }; document.head.appendChild(sc); }function phShare(){navigator.clipboard.writeText(window.location.href).then(function(){var el=document.getElementById("ph-share-lbl");if(el){el.textContent="Link copied!";setTimeout(function(){el.textContent="Copy share link";},2500);}});}function phEmbed(){var runId=window.location.pathname.split("/").pop().replace(".html","");var embedUrl="https://pantherahive.com/embed/"+runId;var code='';navigator.clipboard.writeText(code).then(function(){var el=document.getElementById("ph-embed-lbl");if(el){el.textContent="Embed code copied!";setTimeout(function(){el.textContent="Get Embed Code";},2500);}});}