# tailscale-dev/video-code-snippets architecture

> Architecture diagram of the GitHub repository tailscale-dev/video-code-snippets, 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/tailscale-dev/video-code-snippets
- Repository: https://github.com/tailscale-dev/video-code-snippets

## Overview

This repository is a collection of independent Tailscale YouTube supporting snippets, not one integrated application. Its visible runtime workflow is the metrics load generator: a user starts it, and it repeatedly sends queries to a configured Prometheus service. Other directories provide separate deployment and configuration examples; the supplied README does not describe their internal workflows or connect them to one another, so those examples are represented as independent capabilities. The only source excerpt is the load generator, so relationships for unsampled examples are not inferred.

Main entry points: [`2025/2025-02-metrics/loadgen/highload.py`](https://github.com/tailscale-dev/video-code-snippets/blob/main/2025/2025-02-metrics/loadgen/highload.py) (Metrics load generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_monitoring["Monitoring example"]
  node_loadgen["Metrics load generator<br/>[highload.py]"]
  node_prometheus["Prometheus"]
  node_metrics_stack["Metrics stack<br/>[compose.yaml]"]
end

subgraph group_infrastructure["Infrastructure examples"]
  node_cloud_init["Cloud-init examples"]
  node_nix_llm["Nix NVIDIA Ollama"]
  node_fcos["Fedora CoreOS config<br/>[config.bu]"]
  node_s3_garage["S3 Garage setup"]
end

subgraph group_services["Service examples"]
  node_paperless["Paperless setup<br/>[docker-compose.yml]"]
  node_beszel["Beszel hub<br/>[compose.yaml]"]
  node_pihole["Pi-hole example"]
  node_docktail["Docktail examples"]
end

subgraph group_media["Media examples"]
  node_jellyfin["Jellyfin examples"]
  node_immich["Immich deployment<br/>[compose.yaml]"]
  node_audiobookshelf["Audiobookshelf setup<br/>[compose.yaml]"]
  node_immichframe["ImmichFrame setup<br/>[compose.yaml]"]
end

node_user(("Operator"))

node_user -->|"starts"| node_loadgen
node_loadgen -->|"requests metrics"| node_prometheus

click node_loadgen "https://github.com/tailscale-dev/video-code-snippets/blob/main/2025/2025-02-metrics/loadgen/highload.py"
click node_metrics_stack "https://github.com/tailscale-dev/video-code-snippets/blob/main/2025/2025-02-metrics/compose.yaml"
click node_cloud_init "https://github.com/tailscale-dev/video-code-snippets/tree/main/2024/2024-07-cloud-init"
click node_nix_llm "https://github.com/tailscale-dev/video-code-snippets/tree/main/2025/2025-02-nix-nvidia-ollama"
click node_fcos "https://github.com/tailscale-dev/video-code-snippets/blob/main/2025/2025-06-fcos/config.bu"
click node_s3_garage "https://github.com/tailscale-dev/video-code-snippets/tree/main/2026/2026-03-s3-garage"
click node_paperless "https://github.com/tailscale-dev/video-code-snippets/blob/main/2026/2026-04-paperless/docker-compose.yml"
click node_beszel "https://github.com/tailscale-dev/video-code-snippets/blob/main/2025/2025-01-beszel/beszel-hub/compose.yaml"
click node_pihole "https://github.com/tailscale-dev/video-code-snippets/tree/main/2026/2026-02-pihole"
click node_docktail "https://github.com/tailscale-dev/video-code-snippets/tree/main/2026/2026-07-docktail"
click node_jellyfin "https://github.com/tailscale-dev/video-code-snippets/tree/main/2026/2026-05-jellyfin"
click node_immich "https://github.com/tailscale-dev/video-code-snippets/blob/main/2025/2025-06-self-hosting-part2/immich/compose.yaml"
click node_audiobookshelf "https://github.com/tailscale-dev/video-code-snippets/blob/main/2025/2025-06-self-hosting-part2/audiobookshelf/compose.yaml"
click node_immichframe "https://github.com/tailscale-dev/video-code-snippets/blob/main/2025/2025-12-immichframe/immichframe/compose.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_loadgen,node_prometheus,node_metrics_stack toneBlue
class node_cloud_init,node_nix_llm,node_fcos,node_s3_garage toneAmber
class node_paperless,node_beszel,node_pihole,node_docktail toneMint
class node_jellyfin,node_immich,node_audiobookshelf,node_immichframe toneRose
class node_user toneIndigo
```

## Components

### Monitoring example

- [Metrics load generator](https://github.com/tailscale-dev/video-code-snippets/blob/main/2025/2025-02-metrics/loadgen/highload.py): `2025/2025-02-metrics/loadgen/highload.py`
- **Prometheus**
- [Metrics stack](https://github.com/tailscale-dev/video-code-snippets/blob/main/2025/2025-02-metrics/compose.yaml): `2025/2025-02-metrics/compose.yaml`

### Infrastructure examples

- [Cloud-init examples](https://github.com/tailscale-dev/video-code-snippets/tree/main/2024/2024-07-cloud-init): `2024/2024-07-cloud-init`
- [Nix NVIDIA Ollama](https://github.com/tailscale-dev/video-code-snippets/tree/main/2025/2025-02-nix-nvidia-ollama): `2025/2025-02-nix-nvidia-ollama`
- [Fedora CoreOS config](https://github.com/tailscale-dev/video-code-snippets/blob/main/2025/2025-06-fcos/config.bu): `2025/2025-06-fcos/config.bu`
- [S3 Garage setup](https://github.com/tailscale-dev/video-code-snippets/tree/main/2026/2026-03-s3-garage): `2026/2026-03-s3-garage`

### Service examples

- [Paperless setup](https://github.com/tailscale-dev/video-code-snippets/blob/main/2026/2026-04-paperless/docker-compose.yml): `2026/2026-04-paperless/docker-compose.yml`
- [Beszel hub](https://github.com/tailscale-dev/video-code-snippets/blob/main/2025/2025-01-beszel/beszel-hub/compose.yaml): `2025/2025-01-beszel/beszel-hub/compose.yaml`
- [Pi-hole example](https://github.com/tailscale-dev/video-code-snippets/tree/main/2026/2026-02-pihole): `2026/2026-02-pihole`
- [Docktail examples](https://github.com/tailscale-dev/video-code-snippets/tree/main/2026/2026-07-docktail): `2026/2026-07-docktail`

### Media examples

- [Jellyfin examples](https://github.com/tailscale-dev/video-code-snippets/tree/main/2026/2026-05-jellyfin): `2026/2026-05-jellyfin`
- [Immich deployment](https://github.com/tailscale-dev/video-code-snippets/blob/main/2025/2025-06-self-hosting-part2/immich/compose.yaml): `2025/2025-06-self-hosting-part2/immich/compose.yaml`
- [Audiobookshelf setup](https://github.com/tailscale-dev/video-code-snippets/blob/main/2025/2025-06-self-hosting-part2/audiobookshelf/compose.yaml): `2025/2025-06-self-hosting-part2/audiobookshelf/compose.yaml`
- [ImmichFrame setup](https://github.com/tailscale-dev/video-code-snippets/blob/main/2025/2025-12-immichframe/immichframe/compose.yaml): `2025/2025-12-immichframe/immichframe/compose.yaml`

### Other components

- **Operator**

## Connections

- Operator → Metrics load generator: starts (evidence: `2025/2025-02-metrics/loadgen/highload.py`)
- Metrics load generator → Prometheus: requests metrics (evidence: `2025/2025-02-metrics/loadgen/highload.py`)
