# santisbon/pds architecture

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

- Interactive diagram: https://gitdiagram.com/santisbon/pds
- Repository: https://github.com/santisbon/pds

## Overview

This repository packages a self-hosted AT Protocol PDS for Kubernetes and provides operator scripts for managing accounts and repository identity/data. The main workflow is deploying the PDS and its storage, exposing it through Cloudflare Tunnel, then using the scripts for account lifecycle and ongoing maintenance. The README documents the deployment relationships and the scripts’ capabilities, but no source excerpts were available; script-to-service calls and detailed chart wiring are therefore not inferred.

Main entry points: [`charts/pds/values.yaml`](https://github.com/santisbon/pds/blob/main/charts/pds/values.yaml) (Chart Configuration), [`charts/pds/templates/deployment.yaml`](https://github.com/santisbon/pds/blob/main/charts/pds/templates/deployment.yaml) (PDS Deployment), [`charts/pds/templates/deployment-cloudflared.yaml`](https://github.com/santisbon/pds/blob/main/charts/pds/templates/deployment-cloudflared.yaml) (Tunnel Pods), [`charts/pds/templates/configmap-cloudflared.yaml`](https://github.com/santisbon/pds/blob/main/charts/pds/templates/configmap-cloudflared.yaml) (Tunnel Config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_deployment["PDS Deployment"]
  node_chart_config["Chart Configuration<br/>[values.yaml]"]
  node_pds_deploy["PDS Deployment<br/>[deployment.yaml]"]
  node_pds_image["Upstream PDS"]
  node_repo_storage[("Repo PVC<br/>[pvc.yaml]")]
  node_blob_store[("S3 Blob Store")]
end

subgraph group_network["Network Access"]
  node_cloudflared_config["Tunnel Config"]
  node_cloudflared_deploy["Tunnel Pods"]
  node_pds_service["ClusterIP Service<br/>[service.yaml]"]
  node_http_route["LAN HTTP Route<br/>[httproute.yaml]"]
end

subgraph group_accounts["Account Operations"]
  node_account_create["Create Accounts<br/>[create-account.sh]"]
  node_account_listing["List And Check<br/>[list-accounts.sh]"]
  node_invite_management["Invite Codes"]
  node_email_confirmation["Email Confirmation"]
  node_account_lifecycle["Account Lifecycle"]
  node_account_deletion["Account Deletion"]
end

subgraph group_identity["Identity And Repos"]
  node_handle_update["Custom Handles<br/>[update-handle.sh]"]
  node_rotation_keys["Rotation Keys"]
  node_repo_backup["Repo Backup Restore<br/>[backup-repo.sh]"]
  node_blob_repair["Missing Blob Upload"]
  node_did_tombstone["DID Tombstone<br/>[tombstone-did.sh]"]
end

node_operator(("PDS Operator"))
node_helm["Helm Client"]
node_cloudflare(("Cloudflare Edge"))

node_operator -->|"deploys with"| node_helm
node_helm -->|"applies settings"| node_chart_config
node_chart_config -->|"configures"| node_pds_deploy
node_pds_deploy -->|"runs"| node_pds_image
node_pds_image -->|"stores repos"| node_repo_storage
node_pds_image -->|"stores blobs"| node_blob_store
node_chart_config -->|"configures"| node_cloudflared_config
node_cloudflared_config -->|"configures"| node_cloudflared_deploy
node_cloudflared_deploy -->|"forwards HTTP"| node_pds_service
node_pds_service -->|"selects pods"| node_pds_deploy
node_cloudflare -->|"tunnels TLS"| node_cloudflared_deploy
node_operator -.->|"enables optionally"| node_http_route
node_operator -->|"runs"| node_account_create
node_operator -->|"runs"| node_account_listing
node_operator -->|"runs"| node_invite_management
node_operator -->|"runs"| node_email_confirmation
node_operator -->|"runs"| node_account_lifecycle
node_operator -->|"runs"| node_account_deletion
node_operator -->|"runs"| node_handle_update
node_operator -->|"runs"| node_rotation_keys
node_operator -->|"runs"| node_repo_backup
node_operator -->|"runs"| node_blob_repair
node_operator -->|"runs"| node_did_tombstone

click node_chart_config "https://github.com/santisbon/pds/blob/main/charts/pds/values.yaml"
click node_pds_deploy "https://github.com/santisbon/pds/blob/main/charts/pds/templates/deployment.yaml"
click node_repo_storage "https://github.com/santisbon/pds/blob/main/charts/pds/templates/pvc.yaml"
click node_cloudflared_config "https://github.com/santisbon/pds/blob/main/charts/pds/templates/configmap-cloudflared.yaml"
click node_cloudflared_deploy "https://github.com/santisbon/pds/blob/main/charts/pds/templates/deployment-cloudflared.yaml"
click node_pds_service "https://github.com/santisbon/pds/blob/main/charts/pds/templates/service.yaml"
click node_http_route "https://github.com/santisbon/pds/blob/main/charts/pds/templates/httproute.yaml"
click node_account_create "https://github.com/santisbon/pds/blob/main/scripts/create-account.sh"
click node_account_listing "https://github.com/santisbon/pds/blob/main/scripts/list-accounts.sh"
click node_invite_management "https://github.com/santisbon/pds/blob/main/scripts/create-invite-code.sh"
click node_email_confirmation "https://github.com/santisbon/pds/blob/main/scripts/request-email-confirmation.sh"
click node_account_lifecycle "https://github.com/santisbon/pds/blob/main/scripts/deactivate-account.sh"
click node_account_deletion "https://github.com/santisbon/pds/blob/main/scripts/delete-account-self.sh"
click node_handle_update "https://github.com/santisbon/pds/blob/main/scripts/update-handle.sh"
click node_rotation_keys "https://github.com/santisbon/pds/blob/main/scripts/rotate-plc-rotation-key.sh"
click node_repo_backup "https://github.com/santisbon/pds/blob/main/scripts/backup-repo.sh"
click node_blob_repair "https://github.com/santisbon/pds/blob/main/scripts/upload-missing-blobs.sh"
click node_did_tombstone "https://github.com/santisbon/pds/blob/main/scripts/tombstone-did.sh"

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_chart_config,node_pds_deploy,node_pds_image,node_repo_storage,node_blob_store,node_helm toneBlue
class node_cloudflared_config,node_cloudflared_deploy,node_pds_service,node_http_route toneAmber
class node_account_create,node_account_listing,node_invite_management,node_email_confirmation,node_account_lifecycle,node_account_deletion toneMint
class node_handle_update,node_rotation_keys,node_repo_backup,node_blob_repair,node_did_tombstone toneRose
class node_operator,node_cloudflare toneIndigo
```

## Components

### PDS Deployment

- [Chart Configuration](https://github.com/santisbon/pds/blob/main/charts/pds/values.yaml): `charts/pds/values.yaml`
- [PDS Deployment](https://github.com/santisbon/pds/blob/main/charts/pds/templates/deployment.yaml): `charts/pds/templates/deployment.yaml`
- **Upstream PDS**
- [Repo PVC](https://github.com/santisbon/pds/blob/main/charts/pds/templates/pvc.yaml): `charts/pds/templates/pvc.yaml`
- **S3 Blob Store**

### Network Access

- [Tunnel Config](https://github.com/santisbon/pds/blob/main/charts/pds/templates/configmap-cloudflared.yaml): `charts/pds/templates/configmap-cloudflared.yaml`
- [Tunnel Pods](https://github.com/santisbon/pds/blob/main/charts/pds/templates/deployment-cloudflared.yaml): `charts/pds/templates/deployment-cloudflared.yaml`
- [ClusterIP Service](https://github.com/santisbon/pds/blob/main/charts/pds/templates/service.yaml): `charts/pds/templates/service.yaml`
- [LAN HTTP Route](https://github.com/santisbon/pds/blob/main/charts/pds/templates/httproute.yaml): `charts/pds/templates/httproute.yaml`

### Account Operations

- [Create Accounts](https://github.com/santisbon/pds/blob/main/scripts/create-account.sh): `scripts/create-account.sh`
- [List And Check](https://github.com/santisbon/pds/blob/main/scripts/list-accounts.sh): `scripts/list-accounts.sh`
- [Invite Codes](https://github.com/santisbon/pds/blob/main/scripts/create-invite-code.sh): `scripts/create-invite-code.sh`
- [Email Confirmation](https://github.com/santisbon/pds/blob/main/scripts/request-email-confirmation.sh): `scripts/request-email-confirmation.sh`
- [Account Lifecycle](https://github.com/santisbon/pds/blob/main/scripts/deactivate-account.sh): `scripts/deactivate-account.sh`
- [Account Deletion](https://github.com/santisbon/pds/blob/main/scripts/delete-account-self.sh): `scripts/delete-account-self.sh`

### Identity And Repos

- [Custom Handles](https://github.com/santisbon/pds/blob/main/scripts/update-handle.sh): `scripts/update-handle.sh`
- [Rotation Keys](https://github.com/santisbon/pds/blob/main/scripts/rotate-plc-rotation-key.sh): `scripts/rotate-plc-rotation-key.sh`
- [Repo Backup Restore](https://github.com/santisbon/pds/blob/main/scripts/backup-repo.sh): `scripts/backup-repo.sh`
- [Missing Blob Upload](https://github.com/santisbon/pds/blob/main/scripts/upload-missing-blobs.sh): `scripts/upload-missing-blobs.sh`
- [DID Tombstone](https://github.com/santisbon/pds/blob/main/scripts/tombstone-did.sh): `scripts/tombstone-did.sh`

### Other components

- **PDS Operator**
- **Helm Client**
- **Cloudflare Edge**

## Connections

- PDS Operator → Helm Client: deploys with
- Helm Client → Chart Configuration: applies settings
- Chart Configuration → PDS Deployment: configures
- PDS Deployment → Upstream PDS: runs
- Upstream PDS → Repo PVC: stores repos
- Upstream PDS → S3 Blob Store: stores blobs
- Chart Configuration → Tunnel Config: configures
- Tunnel Config → Tunnel Pods: configures
- Tunnel Pods → ClusterIP Service: forwards HTTP
- ClusterIP Service → PDS Deployment: selects pods
- Cloudflare Edge → Tunnel Pods: tunnels TLS
- PDS Operator → LAN HTTP Route: enables optionally
- PDS Operator → Create Accounts: runs
- PDS Operator → List And Check: runs
- PDS Operator → Invite Codes: runs
- PDS Operator → Email Confirmation: runs
- PDS Operator → Account Lifecycle: runs
- PDS Operator → Account Deletion: runs
- PDS Operator → Custom Handles: runs
- PDS Operator → Rotation Keys: runs
- PDS Operator → Repo Backup Restore: runs
- PDS Operator → Missing Blob Upload: runs
- PDS Operator → DID Tombstone: runs
