# phsaurav/home-lab architecture

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

- Interactive diagram: https://gitdiagram.com/phsaurav/home-lab
- Repository: https://github.com/phsaurav/home-lab

## Overview

This repository describes a homelab infrastructure managed as code: Terraform provisions environments on Proxmox, Ansible configures hosts, and ArgoCD deploys Kubernetes applications. Its documented capabilities also include secret management, monitoring, self-hosted services, and network ingress. The README is the only relationship evidence available here; links below reflect documented relationships, not inspection of implementation details.

Main entry points: [`argocd/apps`](https://github.com/phsaurav/home-lab/tree/main/argocd/apps) (Kubernetes Applications), [`ansible/playbooks`](https://github.com/phsaurav/home-lab/tree/main/ansible/playbooks) (Ansible Configuration), [`proxmox/environments`](https://github.com/phsaurav/home-lab/tree/main/proxmox/environments) (Terraform), [`argocd`](https://github.com/phsaurav/home-lab/tree/main/argocd) (ArgoCD GitOps)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_provision["Infrastructure Provisioning"]
  node_terraform["Terraform"]
  node_proxmox["Proxmox VE"]
  node_assets["VMs and Containers"]
end

subgraph group_clusters["Hosts and Clusters"]
  node_devhosts["Dev Ubuntu Hosts"]
  node_prodhosts["Prod Hosts"]
  node_talos["Talos Kubernetes"]
end

subgraph group_delivery["Configuration and GitOps"]
  node_ansible["Ansible Configuration"]
  node_argocd["ArgoCD GitOps"]
  node_k8sapps["Kubernetes Applications"]
end

subgraph group_services["Services and Networking"]
  node_monitoring["Prometheus and Grafana"]
  node_gitea["Gitea"]
  node_harbor["Harbor"]
  node_dwc["DWC App and MySQL"]
  node_traefik["Traefik Proxy"]
  node_cloudflare["Cloudflare DNS and Tunnel"]
end

subgraph group_security["Secrets"]
  node_vault[("HashiCorp Vault")]
  node_ansiblevault[("Ansible Vault<br/>[secret.yaml]")]
  node_sops["SOPS Encryption<br/>[.sops.yaml]"]
end

node_operator(("Homelab Operator"))

node_operator -->|"provisions with"| node_terraform
node_terraform -->|"provisions assets"| node_proxmox
node_terraform -->|"creates environments"| node_assets
node_operator -->|"configures with"| node_ansible
node_ansible -->|"configures hosts"| node_devhosts
node_ansible -->|"configures hosts"| node_prodhosts
node_operator -->|"deploys through"| node_argocd
node_argocd -->|"deploys apps"| node_k8sapps
node_argocd -->|"integrates via plugin"| node_vault
node_ansiblevault -->|"protects credentials"| node_ansible
node_sops -->|"protects credentials"| node_vault
node_k8sapps -->|"includes monitoring"| node_monitoring
node_k8sapps -->|"includes hosting"| node_gitea
node_k8sapps -->|"includes registry"| node_harbor
node_k8sapps -->|"includes application"| node_dwc
node_operator -->|"deploys workloads"| node_talos
node_operator -->|"uses proxy"| node_traefik
node_operator -->|"uses DNS and tunnel"| node_cloudflare

click node_terraform "https://github.com/phsaurav/home-lab/tree/main/proxmox/environments"
click node_assets "https://github.com/phsaurav/home-lab/tree/main/proxmox/modules"
click node_devhosts "https://github.com/phsaurav/home-lab/tree/main/ansible/inventories/dev"
click node_prodhosts "https://github.com/phsaurav/home-lab/tree/main/ansible/inventories/prod"
click node_talos "https://github.com/phsaurav/home-lab/tree/main/talos"
click node_ansible "https://github.com/phsaurav/home-lab/tree/main/ansible/playbooks"
click node_argocd "https://github.com/phsaurav/home-lab/tree/main/argocd"
click node_k8sapps "https://github.com/phsaurav/home-lab/tree/main/argocd/apps"
click node_monitoring "https://github.com/phsaurav/home-lab/tree/main/argocd/apps/monitoring"
click node_gitea "https://github.com/phsaurav/home-lab/tree/main/argocd/apps/gitea"
click node_harbor "https://github.com/phsaurav/home-lab/tree/main/argocd/apps/harbor"
click node_dwc "https://github.com/phsaurav/home-lab/tree/main/argocd/apps/dwc-app"
click node_traefik "https://github.com/phsaurav/home-lab/tree/main/traefik"
click node_vault "https://github.com/phsaurav/home-lab/tree/main/vault"
click node_ansiblevault "https://github.com/phsaurav/home-lab/blob/main/ansible/secret.yaml"
click node_sops "https://github.com/phsaurav/home-lab/blob/main/.sops.yaml"

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_terraform,node_proxmox,node_assets toneBlue
class node_devhosts,node_prodhosts,node_talos toneAmber
class node_ansible,node_argocd,node_k8sapps toneMint
class node_monitoring,node_gitea,node_harbor,node_dwc,node_traefik,node_cloudflare toneRose
class node_vault,node_ansiblevault,node_sops,node_operator toneIndigo
```

## Components

### Infrastructure Provisioning

- [Terraform](https://github.com/phsaurav/home-lab/tree/main/proxmox/environments): `proxmox/environments`
- **Proxmox VE**
- [VMs and Containers](https://github.com/phsaurav/home-lab/tree/main/proxmox/modules): `proxmox/modules`

### Hosts and Clusters

- [Dev Ubuntu Hosts](https://github.com/phsaurav/home-lab/tree/main/ansible/inventories/dev): `ansible/inventories/dev`
- [Prod Hosts](https://github.com/phsaurav/home-lab/tree/main/ansible/inventories/prod): `ansible/inventories/prod`
- [Talos Kubernetes](https://github.com/phsaurav/home-lab/tree/main/talos): `talos`

### Configuration and GitOps

- [Ansible Configuration](https://github.com/phsaurav/home-lab/tree/main/ansible/playbooks): `ansible/playbooks`
- [ArgoCD GitOps](https://github.com/phsaurav/home-lab/tree/main/argocd): `argocd`
- [Kubernetes Applications](https://github.com/phsaurav/home-lab/tree/main/argocd/apps): `argocd/apps`

### Services and Networking

- [Prometheus and Grafana](https://github.com/phsaurav/home-lab/tree/main/argocd/apps/monitoring): `argocd/apps/monitoring`
- [Gitea](https://github.com/phsaurav/home-lab/tree/main/argocd/apps/gitea): `argocd/apps/gitea`
- [Harbor](https://github.com/phsaurav/home-lab/tree/main/argocd/apps/harbor): `argocd/apps/harbor`
- [DWC App and MySQL](https://github.com/phsaurav/home-lab/tree/main/argocd/apps/dwc-app): `argocd/apps/dwc-app`
- [Traefik Proxy](https://github.com/phsaurav/home-lab/tree/main/traefik): `traefik`
- **Cloudflare DNS and Tunnel**

### Secrets

- [HashiCorp Vault](https://github.com/phsaurav/home-lab/tree/main/vault): `vault`
- [Ansible Vault](https://github.com/phsaurav/home-lab/blob/main/ansible/secret.yaml): `ansible/secret.yaml`
- [SOPS Encryption](https://github.com/phsaurav/home-lab/blob/main/.sops.yaml): `.sops.yaml`

### Other components

- **Homelab Operator**

## Connections

- Homelab Operator → Terraform: provisions with (evidence: `README.md`)
- Terraform → Proxmox VE: provisions assets (evidence: `README.md`)
- Terraform → VMs and Containers: creates environments (evidence: `README.md`)
- Homelab Operator → Ansible Configuration: configures with (evidence: `README.md`)
- Ansible Configuration → Dev Ubuntu Hosts: configures hosts (evidence: `README.md`)
- Ansible Configuration → Prod Hosts: configures hosts (evidence: `README.md`)
- Homelab Operator → ArgoCD GitOps: deploys through (evidence: `README.md`)
- ArgoCD GitOps → Kubernetes Applications: deploys apps (evidence: `README.md`)
- ArgoCD GitOps → HashiCorp Vault: integrates via plugin (evidence: `README.md`)
- Ansible Vault → Ansible Configuration: protects credentials (evidence: `README.md`)
- SOPS Encryption → HashiCorp Vault: protects credentials (evidence: `README.md`)
- Kubernetes Applications → Prometheus and Grafana: includes monitoring (evidence: `README.md`)
- Kubernetes Applications → Gitea: includes hosting (evidence: `README.md`)
- Kubernetes Applications → Harbor: includes registry (evidence: `README.md`)
- Kubernetes Applications → DWC App and MySQL: includes application (evidence: `README.md`)
- Homelab Operator → Talos Kubernetes: deploys workloads (evidence: `README.md`)
- Homelab Operator → Traefik Proxy: uses proxy (evidence: `README.md`)
- Homelab Operator → Cloudflare DNS and Tunnel: uses DNS and tunnel (evidence: `README.md`)
