Clone
2
Development
Jonathan Miller edited this page 2026-05-10 00:08:24 +00:00
Development
This page covers the repository structure, build process, release workflow, and contributing guidelines for MokoOnyx.
Repository Structure
MokoOnyx/
├── src/ # Template source (this becomes the installable package)
│ ├── component.php # Component-only page layout
│ ├── error.php # Error page layout
│ ├── index.php # Main template entry point
│ ├── joomla.asset.json # Joomla Web Asset Manager definitions
│ ├── offline.php # Offline page layout
│ ├── script.php # Install/update/uninstall script
│ ├── sync_custom_vars.php # CSS variable sync for custom palettes
│ ├── templateDetails.xml # Joomla template manifest
│ ├── helper/ # PHP helper classes
│ │ └── minify.php # CSS/JS auto-minification
│ ├── html/ # Template overrides (modules, components, layouts)
│ ├── language/ # Language files (en-GB, en-US)
│ ├── media/ # Static assets (installed to media/templates/site/mokoonyx/)
│ │ ├── css/ # Stylesheets
│ │ │ ├── template.css # Main template stylesheet
│ │ │ ├── editor.css # Backend editor stylesheet
│ │ │ ├── offline.css # Offline page styles
│ │ │ ├── a11y-high-contrast.css # High-contrast accessibility mode
│ │ │ ├── user.css # User custom CSS (survives updates)
│ │ │ ├── fonts/ # Local font files (Roboto, Noto Sans, Fira Sans)
│ │ │ └── theme/ # Theme palette files
│ │ │ ├── light.standard.css
│ │ │ └── dark.standard.css
│ │ ├── js/ # JavaScript
│ │ │ ├── template.js # Main template JS
│ │ │ ├── gtm.js # Google Tag Manager integration
│ │ │ └── user.js # User custom JS (survives updates)
│ │ ├── images/ # Template images (bg.svg, etc.)
│ │ ├── fonts/ # Font files
│ │ └── vendor/ # Third-party assets (Font Awesome 7 Free)
│ └── templates/ # Starter files for users
│ ├── light.custom.css # Custom light palette template
│ ├── dark.custom.css # Custom dark palette template
│ └── brand-showcase.html # Brand showcase HTML template
├── Makefile # Build and validation automation
├── composer.json # PHP dependencies (MokoStandards)
├── package.json # Node.js dependencies (minification)
├── phpcs.xml # PHP CodeSniffer configuration
├── phpstan.neon # PHPStan static analysis configuration
├── codeception.yml # Testing configuration
├── updates.xml # Joomla update server manifest
├── tests/ # Test suites
├── scripts/ # Build scripts
├── docs/ # Documentation source
└── build/ / dist/ # Build output (gitignored)
Prerequisites
- PHP 8.1+
- Composer (for MokoStandards CLI and dependencies)
- Node.js (optional, for build-time minification with terser/clean-css)
- Make (GNU Make or compatible)
- zip (or PowerShell for Windows)
Setup
# Clone the repository
git clone https://git.mokoconsulting.tech/MokoConsulting/MokoOnyx.git
cd MokoOnyx
# Install dependencies
make install-deps
Building Packages
Build an installable ZIP
make build
This will:
- Clean previous build artifacts (
build/anddist/) - Minify CSS and JS assets
- Copy
src/contents tobuild/package/ - Create
dist/mokoonyx-{version}.zip
Build a beta release
make build-beta
Creates dist/mokoonyx-{version}-beta.zip (skips minification).
Validation
MokoOnyx uses the MokoStandards Enterprise API for code quality checks.
# Run all validation checks
make validate
# Individual checks
make lint # PHP syntax check
make check-joomla # Joomla manifest validation
make check-version # Version consistency across files
make check-xml # XML well-formedness
make check-headers # License header verification
make check-secrets # Credential leak scanning
# Full repository health check
make health
Releasing
Full release pipeline
make release
This runs the complete pipeline: validate → build → checksum
After the release package is built:
- Tag the release:
git tag {version} - Push tags:
git push origin --tags - Create a Gitea release and attach the ZIP from
dist/
Generate checksums
make checksum
Creates SHA-256 checksums for all ZIP files in dist/.
Available Make Targets
| Target | Description |
|---|---|
make help |
Show all available targets |
make install-deps |
Install Composer dependencies |
make update-deps |
Update Composer dependencies |
make lint |
PHP syntax check |
make check-joomla |
Validate Joomla manifest |
make check-version |
Verify version consistency |
make check-headers |
Check license headers |
make check-secrets |
Scan for leaked credentials |
make check-xml |
Validate XML files |
make validate |
Run all validation checks |
make health |
Full repository health check |
make clean |
Clean build artifacts |
make minify |
Minify CSS/JS assets |
make build |
Build installable ZIP |
make build-beta |
Build beta release ZIP |
make checksum |
Generate SHA-256 checksums |
make release |
Full release pipeline |
make version |
Display version and extension info |
make security-check |
Composer security audit |
make all |
Full pipeline (deps, validate, build, checksum) |
Contributing
- Fork the repository on Gitea
- Create a feature branch from
dev - Make your changes in
src/ - Run
make validateto ensure all checks pass - Submit a pull request against
dev
Code Standards
- All PHP files must include the GPL-3.0-or-later license header
- PHP code must pass syntax checks and PHPStan analysis
- XML files must be well-formed
- Version numbers must be consistent across
README.md,templateDetails.xml, and other version-bearing files - Attribution goes to Moko Consulting, not individual contributors
Branching Model
| Branch | Purpose |
|---|---|
main |
Stable releases |
dev |
Active development |
Testing
The repository includes a codeception.yml configuration for automated testing:
# Run tests (requires Codeception via Composer)
vendor/bin/codecept run
Built with MokoStandards -- Moko Consulting
Repo: MokoOnyx · MokoStandards
| Revision | Date | Author | Description |
|---|---|---|---|
| 1.0 | 2026-05-09 | Moko Consulting | Initial version |