jmiller d46c431189 refactor: restructure template into samples/ + source/ layout
Replace per-type types/<type>/ scaffolds with a samples/ reference
directory (manifest XML + install script templates for all six
extension types) and a single source/ build directory that CI scans.

- Add samples/manifest/*.xml for component, template, module, plugin,
  package, and library
- Add samples/script/*.php install/update script templates
- Add source/ as the canonical build root (CI scans source/src/htdocs)
- Remove types/ per-type scaffolds
- Rewrite root README for the new structure and expanded CI suite
- Anchor Python MANIFEST ignore rule to root (/MANIFEST) so it no
  longer swallows samples/manifest/ on case-insensitive filesystems
- Expand ci-joomla.yml: SQL, language-key, PHPCS, security, updates.xml,
  asset, MVC naming, router, ACL, webservices, ZIP dry-run, JS/CSS checks

Authored-by: Moko Consulting
2026-07-04 01:23:54 -05:00

Template-Joomla

Unified scaffolding templates for all Joomla extension types — component, template, module, plugin, package, and library.

Structure

.mokogitea/workflows/   ← CI/CD workflow suite (lint, validate, release)
samples/
  manifest/             ← Reference manifest XML for each extension type
    component_sample.xml
    template_sample.xml
    module_sample.xml
    plugin_sample.xml
    package_sample.xml
    library_sample.xml
  script/               ← Reference install/update script (script.php) templates
    script_component.php
    script_module.php
    script_plugin.php
    script_package.php
source/                 ← Your extension source lives here (CI scans this dir)

Usage

  1. Create a new repo from this template (or clone manually).
  2. Build your extension under source/.
  3. Copy the matching manifest from samples/manifest/ to source/, rename it, and replace the placeholder name, namespace, and version.
  4. If your extension needs install/update logic, copy the matching samples/script/ file and replace the {REPONAME}/{PACKAGENAME} placeholders.
  5. Push — the workflows validate the manifest, source, SQL, language keys, and build.

Samples

samples/ holds read-only reference material — do not build against it directly.

  • manifest/ — a well-formed <extension> manifest for each of the six Joomla extension types, showing the expected structure, namespace declaration, media/SQL wiring, and update-server hookup.
  • script/ — the standard script.php install/uninstall/update handler pattern shared across Moko extension repos. Copy, then replace {REPONAME} (UPPERCASE) and {PACKAGENAME} (e.g. com_myextension).

CI/CD

.mokogitea/workflows/ci-joomla.yml validates every push and PR against source/:

Check What it verifies
Manifest Well-formed XML, required elements, version
SQL #__ prefixes, IF [NOT] EXISTS, ENGINE=InnoDB, utf8mb4, install/uninstall pairing, version-named update files
Language keys Keys used in code are defined; orphan (unused) keys flagged
PHP CodeSniffer Joomla coding standard (falls back to PSR-12)
Security No direct superglobals, raw SQL in setQuery(), eval(), or missing _JEXEC guard
updates.xml Well-formed, required <update> children, <targetplatform>
Assets joomla.asset.json is valid and its URIs exist
MVC naming View/Controller/Model/Table classes follow suffix conventions
Router Components ship a Router implementing the router interface
ACL access.xml action keys are defined in language files
Webservices Webservices plugins register API routes
ZIP dry-run Every file/folder the manifest references actually exists
JS/CSS Syntax + balanced braces (ESLint/Stylelint if configured)

Standards

This repo follows MokoStandards. Documentation lives in the Template-Joomla Wiki.

License

GPL-3.0-or-later — Moko Consulting

S
Description
Unified Joomla extension scaffolding templates — plugin, template, module, component, package, library
Readme GPL-3.0
916 KiB
2026-06-18 17:46:15 +00:00
Languages
Markdown 57.3%
CSS 18.1%
PHP 14.6%
JavaScript 4.7%
XML 4.2%
Other 1.1%