# shiwildy/gecko architecture

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

- Interactive diagram: https://gitdiagram.com/shiwildy/gecko
- Repository: https://github.com/shiwildy/gecko

## Overview

Gecko is a Windows-oriented CLI for managing a local web-development stack. The principal workflow is to launch the CLI, choose a service or project-management action, and have Gecko configure or operate local services and project files; PHP projects can also receive a local virtual host. Separate capabilities include PostgreSQL, security/development-mode controls, SSL certificates, port changes, and Ngrok/Cloudflare tunnels. The graph reflects sampled calls and README capabilities; some service internals and Cloudflare wiring were not excerpted, so uncertain links are omitted or marked unverified.

Main entry points: [`cmd/gecko/main.go`](https://github.com/shiwildy/gecko/blob/main/cmd/gecko/main.go) (Gecko entry), [`internal/service/config_manager.go`](https://github.com/shiwildy/gecko/blob/main/internal/service/config_manager.go) (Configuration), [`internal/service/security_manager.go`](https://github.com/shiwildy/gecko/blob/main/internal/service/security_manager.go) (Access settings), [`internal/service/port_manager.go`](https://github.com/shiwildy/gecko/blob/main/internal/service/port_manager.go) (Port settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI"]
  node_app["Gecko entry<br/>[main.go]"]
  node_menu["Terminal menu<br/>[menu.go]"]
end

subgraph group_stack["Local Stack"]
  node_config["Configuration<br/>[config_manager.go]"]
  node_apache["Apache control<br/>[apache.go]"]
  node_mysql["MySQL control<br/>[mysql.go]"]
  node_postgres["PostgreSQL control"]
  node_php["PHP information<br/>[php_manager.go]"]
  node_status["Service status<br/>[status.go]"]
  node_ports["Port settings<br/>[port_manager.go]"]
  node_security["Access settings"]
end

subgraph group_projects["Project Setup"]
  node_projects["Project manager<br/>[project_manager.go]"]
  node_templates["Project templates"]
  node_vhost["Virtual hosts<br/>[vhost.go]"]
end

subgraph group_network["Network Access"]
  node_openssl["SSL certificates<br/>[openssl_manager.go]"]
  node_ngrok["Ngrok tunnels<br/>[ngrok_manager.go]"]
  node_cloudflare["Cloudflare tunnels"]
end

node_operator(("Developer"))

node_operator -->|"runs"| node_app
node_app -.->|"presents"| node_menu
node_app -->|"loads"| node_config
node_menu -->|"queries"| node_status
node_menu -->|"reads"| node_config
node_app -->|"controls"| node_apache
node_app -->|"controls"| node_mysql
node_app -.->|"controls"| node_postgres
node_app -->|"starts or stops"| node_ngrok
node_app -->|"starts or stops"| node_cloudflare
node_app -->|"creates projects"| node_projects
node_projects -->|"dispatches creation"| node_templates
node_projects -->|"creates host"| node_vhost
node_projects -.->|"deletes database"| node_config
node_ports -->|"saves ports"| node_config
node_ports -->|"restarts if running"| node_apache
node_ports -->|"restarts if running"| node_mysql
node_ports -->|"restarts if running"| node_postgres
node_security -->|"updates mode"| node_config
node_security -->|"restarts if running"| node_apache
node_security -->|"restarts if running"| node_mysql
node_security -->|"restarts if running"| node_postgres
node_postgres -->|"applies settings"| node_security
node_ngrok -->|"forwards port"| node_apache
node_ngrok -->|"reads port"| node_config
node_vhost -.->|"uses certificates"| node_openssl

click node_app "https://github.com/shiwildy/gecko/blob/main/cmd/gecko/main.go"
click node_menu "https://github.com/shiwildy/gecko/blob/main/internal/cli/menu.go"
click node_config "https://github.com/shiwildy/gecko/blob/main/internal/service/config_manager.go"
click node_apache "https://github.com/shiwildy/gecko/blob/main/internal/service/apache.go"
click node_mysql "https://github.com/shiwildy/gecko/blob/main/internal/service/mysql.go"
click node_postgres "https://github.com/shiwildy/gecko/blob/main/internal/service/postgresql_manager.go"
click node_php "https://github.com/shiwildy/gecko/blob/main/internal/service/php_manager.go"
click node_status "https://github.com/shiwildy/gecko/blob/main/internal/service/status.go"
click node_ports "https://github.com/shiwildy/gecko/blob/main/internal/service/port_manager.go"
click node_security "https://github.com/shiwildy/gecko/blob/main/internal/service/security_manager.go"
click node_openssl "https://github.com/shiwildy/gecko/blob/main/internal/service/openssl_manager.go"
click node_projects "https://github.com/shiwildy/gecko/blob/main/internal/service/project_manager.go"
click node_templates "https://github.com/shiwildy/gecko/blob/main/internal/service/template_manager.go"
click node_vhost "https://github.com/shiwildy/gecko/blob/main/internal/service/vhost.go"
click node_ngrok "https://github.com/shiwildy/gecko/blob/main/internal/service/ngrok_manager.go"
click node_cloudflare "https://github.com/shiwildy/gecko/blob/main/internal/service/cloudflare_manager.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_app,node_menu toneBlue
class node_config,node_apache,node_mysql,node_postgres,node_php,node_status,node_ports,node_security toneAmber
class node_projects,node_templates,node_vhost toneMint
class node_openssl,node_ngrok,node_cloudflare toneRose
class node_operator toneIndigo
```

## Components

### CLI

- [Gecko entry](https://github.com/shiwildy/gecko/blob/main/cmd/gecko/main.go): `cmd/gecko/main.go`
- [Terminal menu](https://github.com/shiwildy/gecko/blob/main/internal/cli/menu.go): `internal/cli/menu.go`

### Local Stack

- [Configuration](https://github.com/shiwildy/gecko/blob/main/internal/service/config_manager.go): `internal/service/config_manager.go`
- [Apache control](https://github.com/shiwildy/gecko/blob/main/internal/service/apache.go): `internal/service/apache.go`
- [MySQL control](https://github.com/shiwildy/gecko/blob/main/internal/service/mysql.go): `internal/service/mysql.go`
- [PostgreSQL control](https://github.com/shiwildy/gecko/blob/main/internal/service/postgresql_manager.go): `internal/service/postgresql_manager.go`
- [PHP information](https://github.com/shiwildy/gecko/blob/main/internal/service/php_manager.go): `internal/service/php_manager.go`
- [Service status](https://github.com/shiwildy/gecko/blob/main/internal/service/status.go): `internal/service/status.go`
- [Port settings](https://github.com/shiwildy/gecko/blob/main/internal/service/port_manager.go): `internal/service/port_manager.go`
- [Access settings](https://github.com/shiwildy/gecko/blob/main/internal/service/security_manager.go): `internal/service/security_manager.go`

### Project Setup

- [Project manager](https://github.com/shiwildy/gecko/blob/main/internal/service/project_manager.go): `internal/service/project_manager.go`
- [Project templates](https://github.com/shiwildy/gecko/blob/main/internal/service/template_manager.go): `internal/service/template_manager.go`
- [Virtual hosts](https://github.com/shiwildy/gecko/blob/main/internal/service/vhost.go): `internal/service/vhost.go`

### Network Access

- [SSL certificates](https://github.com/shiwildy/gecko/blob/main/internal/service/openssl_manager.go): `internal/service/openssl_manager.go`
- [Ngrok tunnels](https://github.com/shiwildy/gecko/blob/main/internal/service/ngrok_manager.go): `internal/service/ngrok_manager.go`
- [Cloudflare tunnels](https://github.com/shiwildy/gecko/blob/main/internal/service/cloudflare_manager.go): `internal/service/cloudflare_manager.go`

### Other components

- **Developer**

## Connections

- Developer → Gecko entry: runs (evidence: `README.md`)
- Gecko entry → Terminal menu: presents
- Gecko entry → Configuration: loads (evidence: `cmd/gecko/main.go`)
- Terminal menu → Service status: queries (evidence: `internal/cli/menu.go`)
- Terminal menu → Configuration: reads (evidence: `internal/cli/menu.go`)
- Gecko entry → Apache control: controls (evidence: `cmd/gecko/main.go`)
- Gecko entry → MySQL control: controls (evidence: `cmd/gecko/main.go`)
- Gecko entry → PostgreSQL control: controls
- Gecko entry → Ngrok tunnels: starts or stops (evidence: `cmd/gecko/main.go`)
- Gecko entry → Cloudflare tunnels: starts or stops (evidence: `cmd/gecko/main.go`)
- Gecko entry → Project manager: creates projects (evidence: `cmd/gecko/main.go`)
- Project manager → Project templates: dispatches creation (evidence: `internal/service/project_manager.go`)
- Project manager → Virtual hosts: creates host (evidence: `internal/service/project_manager.go`)
- Project manager → Configuration: deletes database
- Port settings → Configuration: saves ports (evidence: `internal/service/port_manager.go`)
- Port settings → Apache control: restarts if running (evidence: `internal/service/port_manager.go`)
- Port settings → MySQL control: restarts if running (evidence: `internal/service/port_manager.go`)
- Port settings → PostgreSQL control: restarts if running (evidence: `internal/service/port_manager.go`)
- Access settings → Configuration: updates mode (evidence: `internal/service/security_manager.go`)
- Access settings → Apache control: restarts if running (evidence: `internal/service/security_manager.go`)
- Access settings → MySQL control: restarts if running (evidence: `internal/service/security_manager.go`)
- Access settings → PostgreSQL control: restarts if running (evidence: `internal/service/security_manager.go`)
- PostgreSQL control → Access settings: applies settings (evidence: `internal/service/postgresql_manager.go`)
- Ngrok tunnels → Apache control: forwards port (evidence: `internal/service/ngrok_manager.go`)
- Ngrok tunnels → Configuration: reads port (evidence: `internal/service/ngrok_manager.go`)
- Virtual hosts → SSL certificates: uses certificates
