# spandigital/presidium architecture

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

- Interactive diagram: https://gitdiagram.com/spandigital/presidium
- Repository: https://github.com/spandigital/presidium

## Overview

Presidium is a documentation-management CLI centered on converting Jekyll sites into Hugo sites, then building or serving them with Hugo. Other documented command branches validate page links and search maps, refresh generated output, initialize projects, and manage versioning. The graph also shows conversion internals and the development-server proxy. Some links rely on the SOURCE INDEX or README because their implementation excerpts were not provided; those limits are reflected by omitting uncertain relationships.

Main entry points: [`cmd/root.go`](https://github.com/spandigital/presidium/blob/develop/cmd/root.go) (CLI commands), [`pkg/domain/service/conversion/conversion.go`](https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/conversion/conversion.go) (Jekyll-to-Hugo conversion), [`pkg/domain/service/hugo/hugo.go`](https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/hugo/hugo.go) (Hugo engine), [`pkg/domain/service/proxy/server.go`](https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/proxy/server.go) (Development proxy)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI workflows"]
  node_cli["CLI commands<br/>[root.go]"]
  node_init["Project initialization<br/>[impl.go]"]
  node_version["Version management<br/>[versioning.go]"]
  node_refresh["Site refresh<br/>[refresh.go]"]
end

subgraph group_convert["Site conversion"]
  node_convertcmd["Conversion command<br/>[convert.go]"]
  node_conversion["Jekyll-to-Hugo conversion<br/>[conversion.go]"]
  node_configtranslation["Config translation<br/>[configfile.go]"]
  node_fileactions["Content file actions<br/>[fileactions.go]"]
  node_markdown["Markdown transforms<br/>[operations.go]"]
  node_resources["Media resources<br/>[resources.go]"]
end

subgraph group_serve["Hugo serving"]
  node_hugo["Hugo engine<br/>[hugo.go]"]
  node_servercmd["Server commands<br/>[hugo.go]"]
  node_proxy["Development proxy<br/>[server.go]"]
  node_middleware["URL middleware<br/>[middleware.go]"]
end

subgraph group_quality["Documentation checks"]
  node_searchcmd["Search-map command<br/>[searchmap.go]"]
  node_searchvalidation["Search-map validation"]
  node_pagelinks["Page-link validation<br/>[pagelinks.go]"]
  node_validation["Site validation<br/>[validation.go]"]
end

subgraph group_shared["Shared services"]
  node_generator["Project generator<br/>[generator.go]"]
  node_templates["Project templates<br/>[template.go]"]
  node_themes["Embedded themes<br/>[themes.go]"]
  node_filesystem["Filesystem utilities<br/>[fsutil.go]"]
end

node_user(("Documentation author"))

node_user -->|"runs commands"| node_cli
node_cli -->|"runs conversion"| node_convertcmd
node_convertcmd -->|"executes"| node_conversion
node_conversion -->|"translates config"| node_configtranslation
node_conversion -->|"applies actions"| node_fileactions
node_conversion -->|"handles media"| node_resources
node_conversion -->|"initializes module"| node_hugo
node_fileactions -->|"uses transforms"| node_markdown
node_conversion -->|"uses filesystem"| node_filesystem
node_cli -->|"initializes project"| node_init
node_init -->|"generates project"| node_generator
node_generator -->|"loads templates"| node_templates
node_cli -->|"manages versions"| node_version
node_cli -->|"refreshes site"| node_refresh
node_refresh -->|"runs Hugo"| node_hugo
node_servercmd -->|"runs Hugo"| node_hugo
node_servercmd -->|"starts proxy"| node_proxy
node_proxy -->|"starts server"| node_hugo
node_proxy -.->|"routes requests"| node_middleware
node_hugo -->|"configures themes"| node_themes
node_cli -->|"checks search map"| node_searchcmd
node_searchcmd -->|"validates entries"| node_searchvalidation
node_searchvalidation -->|"reads site files"| node_filesystem
node_cli -->|"checks page links"| node_pagelinks
node_pagelinks -.->|"invokes validation"| node_validation
node_user -->|"serves documentation"| node_servercmd

click node_cli "https://github.com/spandigital/presidium/blob/develop/cmd/root.go"
click node_init "https://github.com/spandigital/presidium/blob/develop/pkg/domain/wizard/initwzd/impl.go"
click node_version "https://github.com/spandigital/presidium/blob/develop/pkg/domain/versioning/versioning.go"
click node_refresh "https://github.com/spandigital/presidium/blob/develop/cmd/refresh.go"
click node_convertcmd "https://github.com/spandigital/presidium/blob/develop/cmd/convert.go"
click node_conversion "https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/conversion/conversion.go"
click node_configtranslation "https://github.com/spandigital/presidium/blob/develop/pkg/configtranslation/configfile.go"
click node_fileactions "https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/conversion/fileactions/fileactions.go"
click node_markdown "https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/conversion/markdown/operations.go"
click node_resources "https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/conversion/resources/resources.go"
click node_hugo "https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/hugo/hugo.go"
click node_servercmd "https://github.com/spandigital/presidium/blob/develop/cmd/hugo.go"
click node_proxy "https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/proxy/server.go"
click node_middleware "https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/proxy/middleware.go"
click node_searchcmd "https://github.com/spandigital/presidium/blob/develop/cmd/searchmap.go"
click node_searchvalidation "https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/searchmapvalidation/searchmapvalidation.go"
click node_pagelinks "https://github.com/spandigital/presidium/blob/develop/cmd/pagelinks.go"
click node_validation "https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/validation/validation.go"
click node_generator "https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/generator/generator.go"
click node_templates "https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/template/template.go"
click node_themes "https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/themes/themes.go"
click node_filesystem "https://github.com/spandigital/presidium/blob/develop/pkg/filesystem/fsutil.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_cli,node_init,node_version,node_refresh toneBlue
class node_convertcmd,node_conversion,node_configtranslation,node_fileactions,node_markdown,node_resources toneAmber
class node_hugo,node_servercmd,node_proxy,node_middleware toneMint
class node_searchcmd,node_searchvalidation,node_pagelinks,node_validation toneRose
class node_generator,node_templates,node_themes,node_filesystem,node_user toneIndigo
```

## Components

### CLI workflows

- [CLI commands](https://github.com/spandigital/presidium/blob/develop/cmd/root.go): `cmd/root.go`
- [Project initialization](https://github.com/spandigital/presidium/blob/develop/pkg/domain/wizard/initwzd/impl.go): `pkg/domain/wizard/initwzd/impl.go`
- [Version management](https://github.com/spandigital/presidium/blob/develop/pkg/domain/versioning/versioning.go): `pkg/domain/versioning/versioning.go`
- [Site refresh](https://github.com/spandigital/presidium/blob/develop/cmd/refresh.go): `cmd/refresh.go`

### Site conversion

- [Conversion command](https://github.com/spandigital/presidium/blob/develop/cmd/convert.go): `cmd/convert.go`
- [Jekyll-to-Hugo conversion](https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/conversion/conversion.go): `pkg/domain/service/conversion/conversion.go`
- [Config translation](https://github.com/spandigital/presidium/blob/develop/pkg/configtranslation/configfile.go): `pkg/configtranslation/configfile.go`
- [Content file actions](https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/conversion/fileactions/fileactions.go): `pkg/domain/service/conversion/fileactions/fileactions.go`
- [Markdown transforms](https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/conversion/markdown/operations.go): `pkg/domain/service/conversion/markdown/operations.go`
- [Media resources](https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/conversion/resources/resources.go): `pkg/domain/service/conversion/resources/resources.go`

### Hugo serving

- [Hugo engine](https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/hugo/hugo.go): `pkg/domain/service/hugo/hugo.go`
- [Server commands](https://github.com/spandigital/presidium/blob/develop/cmd/hugo.go): `cmd/hugo.go`
- [Development proxy](https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/proxy/server.go): `pkg/domain/service/proxy/server.go`
- [URL middleware](https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/proxy/middleware.go): `pkg/domain/service/proxy/middleware.go`

### Documentation checks

- [Search-map command](https://github.com/spandigital/presidium/blob/develop/cmd/searchmap.go): `cmd/searchmap.go`
- [Search-map validation](https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/searchmapvalidation/searchmapvalidation.go): `pkg/domain/service/searchmapvalidation/searchmapvalidation.go`
- [Page-link validation](https://github.com/spandigital/presidium/blob/develop/cmd/pagelinks.go): `cmd/pagelinks.go`
- [Site validation](https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/validation/validation.go): `pkg/domain/service/validation/validation.go`

### Shared services

- [Project generator](https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/generator/generator.go): `pkg/domain/service/generator/generator.go`
- [Project templates](https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/template/template.go): `pkg/domain/service/template/template.go`
- [Embedded themes](https://github.com/spandigital/presidium/blob/develop/pkg/domain/service/themes/themes.go): `pkg/domain/service/themes/themes.go`
- [Filesystem utilities](https://github.com/spandigital/presidium/blob/develop/pkg/filesystem/fsutil.go): `pkg/filesystem/fsutil.go`

### Other components

- **Documentation author**

## Connections

- Documentation author → CLI commands: runs commands
- CLI commands → Conversion command: runs conversion (evidence: `cmd/convert.go`)
- Conversion command → Jekyll-to-Hugo conversion: executes (evidence: `cmd/convert.go`)
- Jekyll-to-Hugo conversion → Config translation: translates config (evidence: `pkg/domain/service/conversion/conversion.go`)
- Jekyll-to-Hugo conversion → Content file actions: applies actions (evidence: `pkg/domain/service/conversion/conversion.go`)
- Jekyll-to-Hugo conversion → Media resources: handles media (evidence: `pkg/domain/service/conversion/conversion.go`)
- Jekyll-to-Hugo conversion → Hugo engine: initializes module (evidence: `pkg/domain/service/conversion/conversion.go`)
- Content file actions → Markdown transforms: uses transforms (evidence: `pkg/domain/service/conversion/fileactions/fileactions.go`)
- Jekyll-to-Hugo conversion → Filesystem utilities: uses filesystem (evidence: `pkg/domain/service/conversion/conversion.go`)
- CLI commands → Project initialization: initializes project
- Project initialization → Project generator: generates project (evidence: `pkg/domain/wizard/initwzd/impl.go`)
- Project generator → Project templates: loads templates (evidence: `pkg/domain/service/generator/generator.go`)
- CLI commands → Version management: manages versions
- CLI commands → Site refresh: refreshes site (evidence: `cmd/refresh.go`)
- Site refresh → Hugo engine: runs Hugo (evidence: `cmd/refresh.go`)
- Server commands → Hugo engine: runs Hugo (evidence: `cmd/hugo.go`)
- Server commands → Development proxy: starts proxy (evidence: `cmd/hugo.go`)
- Development proxy → Hugo engine: starts server (evidence: `pkg/domain/service/proxy/server.go`)
- Development proxy → URL middleware: routes requests
- Hugo engine → Embedded themes: configures themes (evidence: `pkg/domain/service/hugo/hugo.go`)
- CLI commands → Search-map command: checks search map (evidence: `cmd/searchmap.go`)
- Search-map command → Search-map validation: validates entries (evidence: `cmd/searchmap.go`)
- Search-map validation → Filesystem utilities: reads site files (evidence: `pkg/domain/service/searchmapvalidation/searchmapvalidation.go`)
- CLI commands → Page-link validation: checks page links (evidence: `cmd/pagelinks.go`)
- Page-link validation → Site validation: invokes validation
- Documentation author → Server commands: serves documentation
