# karthikeyan-karuppiah/home-lab architecture

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

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

## Overview

This is a declarative home-infrastructure repository for a TerraMaster NAS. The documented request path is remote/LAN client → WireGuard → Nginx ingress, with Authelia authentication and protected services; DNS and observability form supporting branches. The README also documents Doco-CD reconciliation. No source excerpts were provided, so relationships below rely on the README’s architecture diagram and statements; backup details are omitted because no implementation path for them appears in the tree.

Main entry points: [`apps/tnas/infrastructure/network/nginx/docker-compose.yml`](https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/network/nginx/docker-compose.yml) (Nginx Proxy Manager), [`apps/tnas/infrastructure/telemetry/observability/docker-compose.yml`](https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/telemetry/observability/docker-compose.yml) (Grafana Alloy), [`apps/tnas/infrastructure/vpn/wireguard/docker-compose.yml`](https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/vpn/wireguard/docker-compose.yml) (WireGuard), [`apps/tnas/infrastructure/identity/authelia/docker-compose.yml`](https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/identity/authelia/docker-compose.yml) (Authelia)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_perimeter["Network Perimeter"]
  node_wireguard["WireGuard<br/>[docker-compose.yml]"]
  node_blocky["Blocky DNS<br/>[docker-compose.yml]"]
  node_nginx["Nginx Proxy Manager<br/>[docker-compose.yml]"]
end

subgraph group_identity["Identity and Apps"]
  node_authelia["Authelia<br/>[docker-compose.yml]"]
  node_redis[("Authelia Redis<br/>[docker-compose.yml]")]
  node_navidrome["Navidrome<br/>[docker-compose.yml]"]
end

subgraph group_observability["Observability"]
  node_prometheus["Prometheus<br/>[docker-compose.yml]"]
  node_alloy["Grafana Alloy<br/>[docker-compose.yml]"]
  node_loki[("Grafana Loki<br/>[docker-compose.yml]")]
  node_grafana["Grafana<br/>[docker-compose.yml]"]
end

subgraph group_gitops["GitOps"]
  node_dococd["Doco-CD<br/>[docker-compose.yml]"]
  node_repository["Git repository"]
end

node_client(("Remote / LAN Client"))

node_client -->|"opens tunnel"| node_wireguard
node_wireguard -->|"queries DNS"| node_blocky
node_wireguard -->|"routes requests"| node_nginx
node_nginx -->|"checks access"| node_authelia
node_authelia -->|"looks up session"| node_redis
node_nginx -->|"forwards authorized traffic"| node_navidrome
node_nginx -->|"forwards authorized traffic"| node_grafana
node_blocky -->|"exposes metrics"| node_prometheus
node_prometheus -->|"supplies SLO results"| node_grafana
node_nginx -->|"emits request logs"| node_alloy
node_authelia -->|"emits request logs"| node_alloy
node_navidrome -->|"emits request logs"| node_alloy
node_alloy -->|"pushes logs"| node_loki
node_loki -->|"serves trace queries"| node_grafana
node_dococd -->|"reconciles main branch"| node_repository

click node_wireguard "https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/vpn/wireguard/docker-compose.yml"
click node_blocky "https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/networksecurity/blocky/docker-compose.yml"
click node_nginx "https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/network/nginx/docker-compose.yml"
click node_authelia "https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/identity/authelia/docker-compose.yml"
click node_redis "https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/identity/authelia/docker-compose.yml"
click node_navidrome "https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/audioservices/navidrome/docker-compose.yml"
click node_prometheus "https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/telemetry/observability/docker-compose.yml"
click node_alloy "https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/telemetry/observability/docker-compose.yml"
click node_loki "https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/telemetry/observability/docker-compose.yml"
click node_grafana "https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/telemetry/observability/docker-compose.yml"
click node_dococd "https://github.com/karthikeyan-karuppiah/home-lab/blob/main/.doco-cd/docker-compose.yml"

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_wireguard,node_blocky,node_nginx,node_client toneBlue
class node_authelia,node_redis,node_navidrome toneAmber
class node_prometheus,node_alloy,node_loki,node_grafana toneMint
class node_dococd,node_repository toneRose
```

## Components

### Network Perimeter

- [WireGuard](https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/vpn/wireguard/docker-compose.yml): `apps/tnas/infrastructure/vpn/wireguard/docker-compose.yml`
- [Blocky DNS](https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/networksecurity/blocky/docker-compose.yml): `apps/tnas/infrastructure/networksecurity/blocky/docker-compose.yml`
- [Nginx Proxy Manager](https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/network/nginx/docker-compose.yml): `apps/tnas/infrastructure/network/nginx/docker-compose.yml`

### Identity and Apps

- [Authelia](https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/identity/authelia/docker-compose.yml): `apps/tnas/infrastructure/identity/authelia/docker-compose.yml`
- [Authelia Redis](https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/identity/authelia/docker-compose.yml): `apps/tnas/infrastructure/identity/authelia/docker-compose.yml`
- [Navidrome](https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/audioservices/navidrome/docker-compose.yml): `apps/tnas/audioservices/navidrome/docker-compose.yml`

### Observability

- [Prometheus](https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/telemetry/observability/docker-compose.yml): `apps/tnas/infrastructure/telemetry/observability/docker-compose.yml`
- [Grafana Alloy](https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/telemetry/observability/docker-compose.yml): `apps/tnas/infrastructure/telemetry/observability/docker-compose.yml`
- [Grafana Loki](https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/telemetry/observability/docker-compose.yml): `apps/tnas/infrastructure/telemetry/observability/docker-compose.yml`
- [Grafana](https://github.com/karthikeyan-karuppiah/home-lab/blob/main/apps/tnas/infrastructure/telemetry/observability/docker-compose.yml): `apps/tnas/infrastructure/telemetry/observability/docker-compose.yml`

### GitOps

- [Doco-CD](https://github.com/karthikeyan-karuppiah/home-lab/blob/main/.doco-cd/docker-compose.yml): `.doco-cd/docker-compose.yml`
- **Git repository**

### Other components

- **Remote / LAN Client**

## Connections

- Remote / LAN Client → WireGuard: opens tunnel (evidence: `README.md`)
- WireGuard → Blocky DNS: queries DNS (evidence: `README.md`)
- WireGuard → Nginx Proxy Manager: routes requests (evidence: `README.md`)
- Nginx Proxy Manager → Authelia: checks access (evidence: `README.md`)
- Authelia → Authelia Redis: looks up session (evidence: `README.md`)
- Nginx Proxy Manager → Navidrome: forwards authorized traffic (evidence: `README.md`)
- Nginx Proxy Manager → Grafana: forwards authorized traffic (evidence: `README.md`)
- Blocky DNS → Prometheus: exposes metrics (evidence: `README.md`)
- Prometheus → Grafana: supplies SLO results (evidence: `README.md`)
- Nginx Proxy Manager → Grafana Alloy: emits request logs (evidence: `README.md`)
- Authelia → Grafana Alloy: emits request logs (evidence: `README.md`)
- Navidrome → Grafana Alloy: emits request logs (evidence: `README.md`)
- Grafana Alloy → Grafana Loki: pushes logs (evidence: `README.md`)
- Grafana Loki → Grafana: serves trace queries (evidence: `README.md`)
- Doco-CD → Git repository: reconciles main branch (evidence: `README.md`)
