Files
moko-platform/definitions/default/client.tf
T
Jonathan Miller 38a975ee57
Branch Policy Check / Verify merge target (pull_request) Successful in 0s
chore: remove VERSION from all file header comments
Remove VERSION: XX.YY.ZZ lines from 213 file headers across PHP,
TypeScript, TF definitions, workflows, CSS, markdown, and XML files.
Version is tracked in composer.json and CHANGELOG.md only.

Authored-by: Moko Consulting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-11 16:51:00 -05:00

207 lines
7.6 KiB
Terraform

/**
* Client Repository Structure Definition
* Standard repository structure for managed Joomla client sites (WaaS)
*
* This is NOT a Joomla extension — it's a full managed client site with
* deployment configs, monitoring, SFTP settings, and sync workflows.
* The src/ directory mirrors the Joomla site's public_html.
*
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Schema Version: 1.0
*/
locals {
repository_structure = {
metadata = {
name = "Client Site"
description = "Managed Joomla client site — full site structure, not an extension"
repository_type = "client"
platform = "client"
last_updated = "2026-05-09T00:00:00Z"
maintainer = "Moko Consulting"
version = "01.00.00"
schema_version = "1.0"
}
detection_hints = [
"scripts/sftp-config/",
"scripts/sync-dev-to-live.sh",
"monitoring/grafana/",
"src/administrator/",
"src/components/",
"src/plugins/",
"src/templates/",
"src/media/templates/site/mokoonyx/"
]
root_files = [
{
name = "README.md"
extension = "md"
description = "Client site overview and deployment info"
required = true
always_overwrite = false
protected = true
},
{
name = "CHANGELOG.md"
extension = "md"
description = "Release history"
required = true
always_overwrite = false
},
{
name = "LICENSE"
extension = ""
description = "GPL-3.0-or-later license file"
required = true
always_overwrite = true
template = "templates/docs/required/LICENSE"
},
{
name = "Makefile"
extension = ""
description = "Build and deployment targets (includes minify)"
required = true
always_overwrite = false
},
{
name = "composer.json"
extension = "json"
description = "PHP dependencies"
required = true
always_overwrite = false
},
{
name = ".gitignore"
extension = ""
description = "Git ignore rules (must include *.min.css, *.min.js, TODO.md)"
required = true
always_overwrite = false
}
]
directories = [
{
name = "src"
path = "src"
description = "Joomla site public_html mirror — deployed via SFTP"
required = true
purpose = "Contains the full Joomla site directory structure"
subdirectories = [
{ name = "administrator", path = "src/administrator", description = "Joomla admin", required = true },
{ name = "components", path = "src/components", description = "Frontend components", required = true },
{ name = "plugins", path = "src/plugins", description = "Plugins", required = true },
{ name = "modules", path = "src/modules", description = "Modules", required = true },
{ name = "templates", path = "src/templates", description = "Templates", required = true },
{ name = "media", path = "src/media", description = "Media assets", required = true },
{ name = "images", path = "src/images", description = "Site images", required = false },
{ name = "language", path = "src/language", description = "Language files", required = false },
{ name = "libraries", path = "src/libraries", description = "Libraries", required = false },
{ name = "layouts", path = "src/layouts", description = "Layouts", required = false }
]
},
{
name = "scripts"
path = "scripts"
description = "Deployment, sync, and monitoring scripts"
required = true
purpose = "Contains SFTP configs, sync scripts, and monitoring"
subdirectories = [
{
name = "sftp-config"
path = "scripts/sftp-config"
description = "SFTP connection configs (dev + live)"
required = true
files = [
{
name = "sftp-config.dev.json"
extension = "json"
description = "Dev server SFTP connection"
required = true
always_overwrite = false
},
{
name = "sftp-config.rs.json"
extension = "json"
description = "Live/release server SFTP connection"
required = true
always_overwrite = false
}
]
}
]
},
{
name = "monitoring"
path = "monitoring"
description = "Grafana dashboard templates"
required = true
purpose = "Contains Panopticon-style Grafana dashboard JSON"
subdirectories = [
{
name = "grafana"
path = "monitoring/grafana"
description = "Grafana dashboard JSON templates"
required = true
files = [
{
name = "client-joomla-dashboard.json"
extension = "json"
description = "Panopticon-style Grafana dashboard template"
required = true
always_overwrite = true
template = "templates/monitoring/client-joomla-dashboard.json"
}
]
}
]
},
{
name = ".gitea"
path = ".gitea"
description = "Gitea configuration"
required = true
purpose = "Contains Gitea Actions workflows"
subdirectories = [
{
name = "workflows"
path = ".gitea/workflows"
description = "Gitea Actions CI/CD workflows"
required = true
files = [
{
name = "auto-release.yml"
extension = "yml"
description = "Auto-release on merge to main"
required = true
always_overwrite = true
},
{
name = "deploy.yml"
extension = "yml"
description = "Deploy src/ to servers via SFTP"
required = true
always_overwrite = true
},
{
name = "add-endpoint.yml"
extension = "yml"
description = "Add monitoring endpoint to sites.json"
required = true
always_overwrite = true
}
]
}
]
}
]
}
}
output "client_structure" {
description = "Client site repository structure definition"
value = local.repository_structure
}