@startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Deployment.puml

LAYOUT_WITH_LEGEND()

title Kell Creations - Deployment Architecture

Person(owner, "Business Owner / Author", "Creates and updates documentation and architecture from Windows 11 using VS Code")

Deployment_Node(authoring, "Windows 11 Workstation", "Windows 11", "Primary authoring environment") {
  Container(vscode, "VS Code", "Desktop Application", "Used to edit Markdown, PlantUML, and workflow files")
  Container(localgit, "Local Git Working Copy", "Git Repository", "Local source-controlled working copy of the kell_creations repository")
}

Deployment_Node(gitserver, "git.kellsupport.com", "Forgejo Server", "Source control and workflow trigger platform") {
  Container(forgejo, "Forgejo", "Git Service", "Hosts repository, actions workflows, and runner registration")
}

Deployment_Node(docshost, "kellsupport.com", "Ubuntu 24.04.4 LTS", "Documentation build, publish, and rendering host") {
  Deployment_Node(dockerhost, "Docker Host", "Docker Engine / Compose", "Runs documentation support services") {
    Container(plantuml, "PlantUML Server", "Container", "Renders PlantUML diagrams for authoring and documentation workflows")
    Container(docsweb, "Docs Web Service", "Container", "Serves published MkDocs site at docs.kellsupport.com")
  }

  Container(repo, "Deployment Git Working Copy", "Git Repository", "Pulled source used for build and publish")
  Container(runnerdocker, "Forgejo Runner - Docker", "Systemd Service", "Runner for docker-labeled workflows")
  Container(runnerhost, "Forgejo Runner - Docs Host", "Systemd Service", "Runner for host-based validation and publish workflows")
  Container(mkdocsbuild, "MkDocs Build Process", "Containerized Build", "Builds documentation site using MkDocs Material")
  Container(published, "Published Site Directory", "Filesystem Path", "Published output at /opt/kellcreations/docs-platform/published/site")
}

Deployment_Node(webplatforms, "External Business Platforms", "External Services", "Connected business and publishing platforms") {
  Container(wordpress, "www.kellcreations.com", "WordPress / WooCommerce", "Public website and product publishing platform")
  Container(mail, "mail.kellcreations.com", "Mail Server", "Business mail and notification transport")
  Container(n8n, "n8n.kellsupport.com", "Automation Platform", "Workflow automation and orchestration")
  Container(facebook, "Facebook", "Social Platform", "External social publishing target")
  Container(instagram, "Instagram", "Social Platform", "External social publishing target")
  Container(xsocial, "X", "Social Platform", "External social publishing target")
}

Rel(owner, vscode, "Authors documentation and diagrams in")
Rel(vscode, localgit, "Edits files in")
Rel(localgit, forgejo, "Pushes commits to")

Rel(forgejo, runnerdocker, "Triggers docker-labeled workflows on")
Rel(forgejo, runnerhost, "Triggers host-labeled workflows on")

Rel(runnerdocker, mkdocsbuild, "Can execute validation-oriented build steps with")
Rel(runnerhost, repo, "Uses pulled repository source in")
Rel(runnerhost, mkdocsbuild, "Runs MkDocs build using")
Rel(mkdocsbuild, published, "Generates site content into")
Rel(docsweb, published, "Serves content from")
Rel(vscode, plantuml, "Uses for diagram rendering and preview")
Rel(repo, plantuml, "Uses for workflow diagram rendering")

Rel(docsweb, owner, "Provides published documentation to")
Rel(runnerhost, mail, "Can send workflow-related notifications through")
Rel(repo, wordpress, "Documents integration patterns for")
Rel(repo, n8n, "Documents integration patterns for")
Rel(repo, facebook, "Documents integration patterns for")
Rel(repo, instagram, "Documents integration patterns for")
Rel(repo, xsocial, "Documents integration patterns for")

@enduml