# yashchokhat/vertex-on-edge-cli architecture

> Architecture diagram of the GitHub repository yashchokhat/vertex-on-edge-cli, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yashchokhat/vertex-on-edge-cli
- Repository: https://github.com/yashchokhat/vertex-on-edge-cli

## Overview

Vertex-on-Edge is a Go CLI that turns a local project into a cloud deployment. The primary workflow selects a project, detects its stack, gathers provider settings, generates container and CI files, provisions infrastructure, then configures GitHub and pushes the source to trigger deployment. The README also describes lifecycle commands and the downstream GitHub Actions → GHCR → EC2 flow. Edges are grounded in the deploy excerpt, source-index references, or README; downstream workflow and unsampled subsystems are documented rather than verified from source.

Main entry points: [`internal/cli/deploy.go`](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/cli/deploy.go) (Deploy orchestrator), [`internal/detector/detector.go`](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/detector/detector.go) (Stack detection), [`internal/github/repo.go`](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/github/repo.go) (GitHub repository setup), [`cmd/vertex-on-edge/main.go`](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/cmd/vertex-on-edge/main.go) (CLI entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI workflow"]
  node_entry["CLI entry<br/>[main.go]"]
  node_deploy["Deploy orchestrator<br/>[deploy.go]"]
  node_lifecycle["Lifecycle commands"]
  node_auth["Cloud and GitHub auth"]
  node_installer["Dependency installer<br/>[installer.go]"]
  node_prompts["Project and cloud prompts<br/>[prompt.go]"]
  node_cloudprompts["Provider prompts<br/>[cloud_prompt.go]"]
end

subgraph group_project["Project preparation"]
  node_detector["Stack detection<br/>[detector.go]"]
  node_detectionrules["Detection rules<br/>[rules.go]"]
  node_filesystem["Project scanning<br/>[filesystem.go]"]
  node_stackmodel["Stack data model<br/>[stack.go]"]
  node_docker["Dockerfile generation<br/>[generator.go]"]
end

subgraph group_provision["Cloud provisioning"]
  node_terraformrender["Terraform rendering<br/>[renderer.go]"]
  node_ec2templates["AWS EC2 templates<br/>[embed.go]"]
  node_terraformrun["Terraform execution<br/>[runner.go]"]
end

subgraph group_delivery["GitHub delivery"]
  node_workflowgen["Workflow generation<br/>[actions.go]"]
  node_githubrepo["GitHub repository setup<br/>[repo.go]"]
  node_githubssh["SSH host verification<br/>[ssh.go]"]
end

subgraph group_runtime["Deployed application"]
  node_github["GitHub Actions"]
  node_ghcr[("GitHub Container Registry")]
  node_ec2["AWS EC2"]
  node_application(("Deployed application"))
end

node_developer(("Developer"))

node_developer -->|"runs CLI"| node_entry
node_entry -->|"dispatches deploy"| node_deploy
node_deploy -->|"checks tools"| node_installer
node_deploy -->|"authenticates"| node_auth
node_deploy -->|"prompts project"| node_prompts
node_deploy -->|"selects provider"| node_cloudprompts
node_deploy -->|"detects stack"| node_detector
node_detector -.->|"evaluates rules"| node_detectionrules
node_detector -.->|"scans files"| node_filesystem
node_detector -->|"returns stack"| node_stackmodel
node_deploy -->|"generates Dockerfile"| node_docker
node_deploy -->|"generates workflows"| node_workflowgen
node_deploy -->|"renders templates"| node_terraformrender
node_terraformrender -->|"copies templates"| node_ec2templates
node_deploy -->|"applies infrastructure"| node_terraformrun
node_deploy -->|"configures and pushes"| node_githubrepo
node_githubrepo -.->|"verifies SSH host"| node_githubssh
node_githubrepo -->|"triggers pipeline"| node_github
node_github -->|"pushes image"| node_ghcr
node_github -->|"deploys over SSH"| node_ec2
node_ec2 -->|"pulls image"| node_ghcr
node_ec2 -->|"runs container"| node_application

click node_entry "https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/cmd/vertex-on-edge/main.go"
click node_deploy "https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/cli/deploy.go"
click node_lifecycle "https://github.com/yashchokhat/vertex-on-edge-cli/tree/main/internal/cli"
click node_auth "https://github.com/yashchokhat/vertex-on-edge-cli/tree/main/internal/auth"
click node_installer "https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/dependencies/installer.go"
click node_prompts "https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/ui/prompt.go"
click node_cloudprompts "https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/ui/cloud_prompt.go"
click node_detector "https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/detector/detector.go"
click node_detectionrules "https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/detector/rules.go"
click node_filesystem "https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/detector/filesystem.go"
click node_stackmodel "https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/pkg/models/stack.go"
click node_docker "https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/docker/generator.go"
click node_workflowgen "https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/github/actions.go"
click node_terraformrender "https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/terraform/renderer.go"
click node_ec2templates "https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/terraform/aws/ec2/embed.go"
click node_terraformrun "https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/terraform/runner.go"
click node_githubrepo "https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/github/repo.go"
click node_githubssh "https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/github/ssh.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_deploy,node_lifecycle,node_auth,node_installer,node_prompts,node_cloudprompts toneBlue
class node_detector,node_detectionrules,node_filesystem,node_stackmodel,node_docker toneAmber
class node_terraformrender,node_ec2templates,node_terraformrun toneMint
class node_workflowgen,node_githubrepo,node_githubssh toneRose
class node_github,node_ghcr,node_ec2,node_application,node_developer toneIndigo
```

## Components

### CLI workflow

- [CLI entry](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/cmd/vertex-on-edge/main.go): `cmd/vertex-on-edge/main.go`
- [Deploy orchestrator](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/cli/deploy.go): `internal/cli/deploy.go`
- [Lifecycle commands](https://github.com/yashchokhat/vertex-on-edge-cli/tree/main/internal/cli): `internal/cli`
- [Cloud and GitHub auth](https://github.com/yashchokhat/vertex-on-edge-cli/tree/main/internal/auth): `internal/auth`
- [Dependency installer](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/dependencies/installer.go): `internal/dependencies/installer.go`
- [Project and cloud prompts](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/ui/prompt.go): `internal/ui/prompt.go`
- [Provider prompts](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/ui/cloud_prompt.go): `internal/ui/cloud_prompt.go`

### Project preparation

- [Stack detection](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/detector/detector.go): `internal/detector/detector.go`
- [Detection rules](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/detector/rules.go): `internal/detector/rules.go`
- [Project scanning](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/detector/filesystem.go): `internal/detector/filesystem.go`
- [Stack data model](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/pkg/models/stack.go): `pkg/models/stack.go`
- [Dockerfile generation](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/docker/generator.go): `internal/docker/generator.go`

### Cloud provisioning

- [Terraform rendering](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/terraform/renderer.go): `internal/terraform/renderer.go`
- [AWS EC2 templates](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/terraform/aws/ec2/embed.go): `internal/terraform/aws/ec2/embed.go`
- [Terraform execution](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/terraform/runner.go): `internal/terraform/runner.go`

### GitHub delivery

- [Workflow generation](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/github/actions.go): `internal/github/actions.go`
- [GitHub repository setup](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/github/repo.go): `internal/github/repo.go`
- [SSH host verification](https://github.com/yashchokhat/vertex-on-edge-cli/blob/main/internal/github/ssh.go): `internal/github/ssh.go`

### Deployed application

- **GitHub Actions**
- **GitHub Container Registry**
- **AWS EC2**
- **Deployed application**

### Other components

- **Developer**

## Connections

- Developer → CLI entry: runs CLI (evidence: `README.md`)
- CLI entry → Deploy orchestrator: dispatches deploy (evidence: `cmd/vertex-on-edge/main.go`)
- Deploy orchestrator → Dependency installer: checks tools (evidence: `internal/cli/deploy.go`)
- Deploy orchestrator → Cloud and GitHub auth: authenticates (evidence: `internal/cli/deploy.go`)
- Deploy orchestrator → Project and cloud prompts: prompts project (evidence: `internal/cli/deploy.go`)
- Deploy orchestrator → Provider prompts: selects provider (evidence: `README.md`)
- Deploy orchestrator → Stack detection: detects stack (evidence: `internal/cli/deploy.go`)
- Stack detection → Detection rules: evaluates rules
- Stack detection → Project scanning: scans files
- Stack detection → Stack data model: returns stack
- Deploy orchestrator → Dockerfile generation: generates Dockerfile (evidence: `internal/cli/deploy.go`)
- Deploy orchestrator → Workflow generation: generates workflows (evidence: `README.md`)
- Deploy orchestrator → Terraform rendering: renders templates (evidence: `README.md`)
- Terraform rendering → AWS EC2 templates: copies templates (evidence: `internal/terraform/renderer.go`)
- Deploy orchestrator → Terraform execution: applies infrastructure (evidence: `internal/cli/deploy.go`)
- Deploy orchestrator → GitHub repository setup: configures and pushes (evidence: `README.md`)
- GitHub repository setup → SSH host verification: verifies SSH host
- GitHub repository setup → GitHub Actions: triggers pipeline (evidence: `README.md`)
- GitHub Actions → GitHub Container Registry: pushes image (evidence: `README.md`)
- GitHub Actions → AWS EC2: deploys over SSH (evidence: `README.md`)
- AWS EC2 → GitHub Container Registry: pulls image (evidence: `README.md`)
- AWS EC2 → Deployed application: runs container (evidence: `README.md`)
