# garze05/vpsentry architecture

> Architecture diagram of the GitHub repository garze05/vpsentry, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/garze05/vpsentry
- Repository: https://github.com/garze05/vpsentry

## Overview

VPSentry is an early-stage Go CLI for inspecting and eventually applying selected Ubuntu security-baseline changes. Today, an administrator supplies an account name; the CLI requests account state, reports lookup failures or missing/non-sudo status, and makes no changes. The documented future workflow separates inspection, planning, and authorized execution with verification. Planned account, SSH, updates, and firewall capabilities are documented but not implemented in the sampled code; planning and execution are placeholders. Edges for future stages reflect README documentation, not inspected runtime calls.

Main entry points: [`inspection.go`](https://github.com/garze05/vpsentry/blob/main/inspection.go) (Account inspection), [`main.go`](https://github.com/garze05/vpsentry/blob/main/main.go) (Account CLI), [`planning.go`](https://github.com/garze05/vpsentry/blob/main/planning.go) (Change planning), [`execution.go`](https://github.com/garze05/vpsentry/blob/main/execution.go) (Apply and verify)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI"]
  node_cli["Account CLI<br/>[main.go]"]
end

subgraph group_workflow["Baseline workflow"]
  node_inspect["Account inspection<br/>[inspection.go]"]
  node_plan["Change planning<br/>[planning.go]"]
  node_execute["Apply and verify<br/>[execution.go]"]
end

subgraph group_operations["Planned operations"]
  node_baseline["Security operations<br/>[README.md]"]
end

node_admin(("Administrator"))
node_osaccounts[("OS account lookup")]

node_admin -->|"selects account"| node_cli
node_cli -->|"requests state"| node_inspect
node_inspect -->|"looks up user/groups"| node_osaccounts
node_inspect -->|"informs &#40;planned&#41;"| node_plan
node_plan -->|"authorizes changes"| node_execute
node_execute -->|"applies selected changes"| node_baseline

click node_cli "https://github.com/garze05/vpsentry/blob/main/main.go"
click node_inspect "https://github.com/garze05/vpsentry/blob/main/inspection.go"
click node_plan "https://github.com/garze05/vpsentry/blob/main/planning.go"
click node_execute "https://github.com/garze05/vpsentry/blob/main/execution.go"
click node_baseline "https://github.com/garze05/vpsentry/blob/main/README.md"

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_cli toneBlue
class node_inspect,node_plan,node_execute,node_osaccounts toneAmber
class node_baseline toneMint
class node_admin toneIndigo
```

## Components

### CLI

- [Account CLI](https://github.com/garze05/vpsentry/blob/main/main.go): `main.go`

### Baseline workflow

- [Account inspection](https://github.com/garze05/vpsentry/blob/main/inspection.go): `inspection.go`
- [Change planning](https://github.com/garze05/vpsentry/blob/main/planning.go): `planning.go`
- [Apply and verify](https://github.com/garze05/vpsentry/blob/main/execution.go): `execution.go`

### Planned operations

- [Security operations](https://github.com/garze05/vpsentry/blob/main/README.md): `README.md`

### Other components

- **Administrator**
- **OS account lookup**

## Connections

- Administrator → Account CLI: selects account (evidence: `README.md`)
- Account CLI → Account inspection: requests state (evidence: `main.go`)
- Account inspection → OS account lookup: looks up user/groups (evidence: `inspection.go`)
- Account inspection → Change planning: informs (planned) (evidence: `README.md`)
- Change planning → Apply and verify: authorizes changes (evidence: `README.md`)
- Apply and verify → Security operations: applies selected changes (evidence: `README.md`)
