Moko Consulting

Open-source software for Joomla, Gitea, and web platforms. Home of MokoSuite, MokoGitea, and MokoCLI.

Tennessee
architecture/client-theme-packages.-

Client Theme Packages

Architecture for WaaS client theme customization packages.

Overview

Each WaaS client gets a theme package that customizes MokoOnyx (the base Joomla template) with client-specific branding, colors, overrides, and content. These packages are managed as Gitea repositories with automated CI/CD.

Package Type

Client themes use platform: file in the manifest, indicating they are file-based packages (not full Joomla extensions):

<!-- .mokogitea/manifest.xml -->
<manifest>
    <platform>file</platform>
    <element>tpl_mokoonyx_clarksvillefurs</element>
    <org>MokoConsulting</org>
    <build>
        <command>make build</command>
        <output>dist/</output>
    </build>
</manifest>

Repository Structure

client-waas-clarksvillefurs/
├── .mokogitea/
│   ├── manifest.xml
│   └── CLAUDE.md
├── .gitea/
│   └── workflows/
│       └── client-release.yml     # CI: build and release on tag
├── source/
│   ├── templateDetails.xml        # Joomla template manifest
│   ├── css/
│   │   └── custom.css             # Client-specific styles
│   ├── images/
│   │   ├── logo.svg               # Client logo
│   │   └── favicon.ico
│   ├── html/                      # Template overrides
│   │   └── com_content/
│   │       └── article/
│   │           └── default.php    # Custom article layout
│   └── language/
│       └── en-GB/
├── Makefile
├── CHANGELOG.md
└── README.md

MokoOnyx Integration

Client themes extend MokoOnyx via CSS custom properties:

/* source/css/custom.css */
:root {
    --moko-primary: #1a5c2e;           /* Client brand green */
    --moko-primary-hover: #134822;
    --moko-accent: #d4a853;            /* Client accent gold */
    --moko-logo-height: 48px;
    --moko-hero-bg: url('../images/hero-bg.jpg');
}

[data-moko-theme="dark"] {
    --moko-primary: #2d8a4e;
    --moko-accent: #e6c06a;
}

CI/CD Workflow

client-release.yml triggers on version tags:

name: Client Release
on:
  push:
    tags: ['v*']

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Build package
        run: make build
      - name: Create release
        uses: actions/create-release@v1
        with:
          tag_name: ${{ github.ref_name }}
          files: dist/*.zip

Update Server

Client sites receive updates via Joomla's built-in update system. MokoGitea auto-generates the update server XML from release assets (since platform: file with a Joomla element name).

The update URL in the template manifest:

<updateservers>
    <server type="extension" name="ClarksvilleFurs Theme Updates">
        https://git.mokoconsulting.tech/MokoConsulting/client-waas-clarksvillefurs/raw/branch/main/updates.xml
    </server>
</updateservers>

Build Process

make build:

  1. Validates template manifest
  2. Lints PHP overrides
  3. Packages into ZIP: tpl_mokoonyx_clarksvillefurs-1.0.0.zip
  4. Generates SHA-256 checksum

Integrity Verification

Release ZIPs include a SHA-256 hash in the update server XML, ensuring clients download unmodified packages:

<update>
    <sha256>a1b2c3d4...</sha256>
    <downloadurl>https://git.mokoconsulting.tech/.../dist/tpl_mokoonyx_clarksvillefurs-1.0.0.zip</downloadurl>
</update>