Changes in fa5afb310f
Jonathan Miller — docs(wiki): normalize branding (MokoGitea/mokocli/MokoStandards->org wiki/MokoSuite)
| 1 | 1 | [← Back to Home](Home) |
| 2 | 2 | |
| 3 | 3 | # Development |
| 4 | 4 | |
| 5 | 5 | This page covers the repository structure, build process, release workflow, and contributing guidelines for MokoOnyx. |
| 6 | 6 | |
| 7 | 7 | --- |
| 8 | 8 | |
| 9 | 9 | ## Repository Structure |
| 10 | 10 | |
| 11 | 11 | ``` |
| 12 | 12 | MokoOnyx/ |
| 13 | 13 | ├── src/ # Template source (this becomes the installable package) |
| 14 | 14 | │ ├── component.php # Component-only page layout |
| 15 | 15 | │ ├── error.php # Error page layout |
| 16 | 16 | │ ├── index.php # Main template entry point |
| 17 | 17 | │ ├── joomla.asset.json # Joomla Web Asset Manager definitions |
| 18 | 18 | │ ├── offline.php # Offline page layout |
| 19 | 19 | │ ├── script.php # Install/update/uninstall script |
| 20 | 20 | │ ├── sync_custom_vars.php # CSS variable sync for custom palettes |
| 21 | 21 | │ ├── templateDetails.xml # Joomla template manifest |
| 22 | 22 | │ ├── helper/ # PHP helper classes |
| 23 | 23 | │ │ └── minify.php # CSS/JS auto-minification |
| 24 | 24 | │ ├── html/ # Template overrides (modules, components, layouts) |
| 25 | 25 | │ ├── language/ # Language files (en-GB, en-US) |
| 26 | 26 | │ ├── media/ # Static assets (installed to media/templates/site/mokoonyx/) |
| 27 | 27 | │ │ ├── css/ # Stylesheets |
| 28 | 28 | │ │ │ ├── template.css # Main template stylesheet |
| 29 | 29 | │ │ │ ├── editor.css # Backend editor stylesheet |
| 30 | 30 | │ │ │ ├── offline.css # Offline page styles |
| 31 | 31 | │ │ │ ├── a11y-high-contrast.css # High-contrast accessibility mode |
| 32 | 32 | │ │ │ ├── user.css # User custom CSS (survives updates) |
| 33 | 33 | │ │ │ ├── fonts/ # Local font files (Roboto, Noto Sans, Fira Sans) |
| 34 | 34 | │ │ │ └── theme/ # Theme palette files |
| 35 | 35 | │ │ │ ├── light.standard.css |
| 36 | 36 | │ │ │ └── dark.standard.css |
| 37 | 37 | │ │ ├── js/ # JavaScript |
| 38 | 38 | │ │ │ ├── template.js # Main template JS |
| 39 | 39 | │ │ │ ├── gtm.js # Google Tag Manager integration |
| 40 | 40 | │ │ │ └── user.js # User custom JS (survives updates) |
| 41 | 41 | │ │ ├── images/ # Template images (bg.svg, etc.) |
| 42 | 42 | │ │ ├── fonts/ # Font files |
| 43 | 43 | │ │ └── vendor/ # Third-party assets (Font Awesome 7 Free) |
| 44 | 44 | │ └── templates/ # Starter files for users |
| 45 | 45 | │ ├── light.custom.css # Custom light palette template |
| 46 | 46 | │ ├── dark.custom.css # Custom dark palette template |
| 47 | 47 | │ └── brand-showcase.html # Brand showcase HTML template |
| 48 | 48 | ├── Makefile # Build and validation automation |
| 49 | 49 | ├── composer.json # PHP dependencies (MokoStandards) |
| 50 | 50 | ├── package.json # Node.js dependencies (minification) |
| 51 | 51 | ├── phpcs.xml # PHP CodeSniffer configuration |
| 52 | 52 | ├── phpstan.neon # PHPStan static analysis configuration |
| 53 | 53 | ├── codeception.yml # Testing configuration |
| 54 | 54 | ├── updates.xml # Joomla update server manifest |
| 55 | 55 | ├── tests/ # Test suites |
| 56 | 56 | ├── scripts/ # Build scripts |
| 57 | 57 | ├── docs/ # Documentation source |
| 58 | 58 | └── build/ / dist/ # Build output (gitignored) |
| 59 | 59 | ``` |
| 60 | 60 | |
| 61 | 61 | --- |
| 62 | 62 | |
| 63 | 63 | ## Prerequisites |
| 64 | 64 | |
| 65 | 65 | - **PHP** 8.1+ |
| 66 | 66 | - **Composer** (for MokoStandards CLI and dependencies) |
| 67 | 67 | - **Node.js** (optional, for build-time minification with terser/clean-css) |
| 68 | 68 | - **Make** (GNU Make or compatible) |
| 69 | 69 | - **zip** (or PowerShell for Windows) |
| 70 | 70 | |
| 71 | 71 | --- |
| 72 | 72 | |
| 73 | 73 | ## Setup |
| 74 | 74 | |
| 75 | 75 | ```bash |
| 76 | 76 | # Clone the repository |
| 77 | 77 | git clone https://git.mokoconsulting.tech/MokoConsulting/MokoOnyx.git |
| 78 | 78 | cd MokoOnyx |
| 79 | 79 | |
| 80 | 80 | # Install dependencies |
| 81 | 81 | make install-deps |
| 82 | 82 | ``` |
| 83 | 83 | |
| 84 | 84 | --- |
| 85 | 85 | |
| 86 | 86 | ## Building Packages |
| 87 | 87 | |
| 88 | 88 | ### Build an installable ZIP |
| 89 | 89 | |
| 90 | 90 | ```bash |
| 91 | 91 | make build |
| 92 | 92 | ``` |
| 93 | 93 | |
| 94 | 94 | This will: |
| 95 | 95 | |
| 96 | 96 | 1. Clean previous build artifacts (`build/` and `dist/`) |
| 97 | 97 | 2. Minify CSS and JS assets |
| 98 | 98 | 3. Copy `src/` contents to `build/package/` |
| 99 | 99 | 4. Create `dist/mokoonyx-{version}.zip` |
| 100 | 100 | |
| 101 | 101 | ### Build a beta release |
| 102 | 102 | |
| 103 | 103 | ```bash |
| 104 | 104 | make build-beta |
| 105 | 105 | ``` |
| 106 | 106 | |
| 107 | 107 | Creates `dist/mokoonyx-{version}-beta.zip` (skips minification). |
| 108 | 108 | |
| 109 | 109 | --- |
| 110 | 110 | |
| 111 | 111 | ## Validation |
| 112 | 112 | |
| 113 | 113 | MokoOnyx uses the **MokoStandards Enterprise API** for code quality checks. |
| 114 | 114 | |
| 115 | 115 | ```bash |
| 116 | 116 | # Run all validation checks |
| 117 | 117 | make validate |
| 118 | 118 | |
| 119 | 119 | # Individual checks |
| 120 | 120 | make lint # PHP syntax check |
| 121 | 121 | make check-joomla # Joomla manifest validation |
| 122 | 122 | make check-version # Version consistency across files |
| 123 | 123 | make check-xml # XML well-formedness |
| 124 | 124 | make check-headers # License header verification |
| 125 | 125 | make check-secrets # Credential leak scanning |
| 126 | 126 | |
| 127 | 127 | # Full repository health check |
| 128 | 128 | make health |
| 129 | 129 | ``` |
| 130 | 130 | |
| 131 | 131 | --- |
| 132 | 132 | |
| 133 | 133 | ## Releasing |
| 134 | 134 | |
| 135 | 135 | ### Full release pipeline |
| 136 | 136 | |
| 137 | 137 | ```bash |
| 138 | 138 | make release |
| 139 | 139 | ``` |
| 140 | 140 | |
| 141 | 141 | This runs the complete pipeline: `validate` → `build` → `checksum` |
| 142 | 142 | |
| 143 | 143 | After the release package is built: |
| 144 | 144 | |
| 145 | 145 | 1. Tag the release: `git tag {version}` |
| 146 | 146 | 2. Push tags: `git push origin --tags` |
| 147 | 147 | 3. Create a MokoGitea release and attach the ZIP from `dist/` |
| 148 | 148 | |
| 149 | 149 | ### Generate checksums |
| 150 | 150 | |
| 151 | 151 | ```bash |
| 152 | 152 | make checksum |
| 153 | 153 | ``` |
| 154 | 154 | |
| 155 | 155 | Creates SHA-256 checksums for all ZIP files in `dist/`. |
| 156 | 156 | |
| 157 | 157 | --- |
| 158 | 158 | |
| 159 | 159 | ## Available Make Targets |
| 160 | 160 | |
| 161 | 161 | | Target | Description | |
| 162 | 162 | |--------|-------------| |
| 163 | 163 | | `make help` | Show all available targets | |
| 164 | 164 | | `make install-deps` | Install Composer dependencies | |
| 165 | 165 | | `make update-deps` | Update Composer dependencies | |
| 166 | 166 | | `make lint` | PHP syntax check | |
| 167 | 167 | | `make check-joomla` | Validate Joomla manifest | |
| 168 | 168 | | `make check-version` | Verify version consistency | |
| 169 | 169 | | `make check-headers` | Check license headers | |
| 170 | 170 | | `make check-secrets` | Scan for leaked credentials | |
| 171 | 171 | | `make check-xml` | Validate XML files | |
| 172 | 172 | | `make validate` | Run all validation checks | |
| 173 | 173 | | `make health` | Full repository health check | |
| 174 | 174 | | `make clean` | Clean build artifacts | |
| 175 | 175 | | `make minify` | Minify CSS/JS assets | |
| 176 | 176 | | `make build` | Build installable ZIP | |
| 177 | 177 | | `make build-beta` | Build beta release ZIP | |
| 178 | 178 | | `make checksum` | Generate SHA-256 checksums | |
| 179 | 179 | | `make release` | Full release pipeline | |
| 180 | 180 | | `make version` | Display version and extension info | |
| 181 | 181 | | `make security-check` | Composer security audit | |
| 182 | 182 | | `make all` | Full pipeline (deps, validate, build, checksum) | |
| 183 | 183 | |
| 184 | 184 | --- |
| 185 | 185 | |
| 186 | 186 | ## Contributing |
| 187 | 187 | |
| 188 | 188 | 1. Fork the repository on [MokoGitea](https://git.mokoconsulting.tech/MokoConsulting/MokoOnyx) |
| 189 | 189 | 2. Create a feature branch from `dev` |
| 190 | 190 | 3. Make your changes in `src/` |
| 191 | 191 | 4. Run `make validate` to ensure all checks pass |
| 192 | 192 | 5. Submit a pull request against `dev` |
| 193 | 193 | |
| 194 | 194 | ### Code Standards |
| 195 | 195 | |
| 196 | 196 | - All PHP files must include the GPL-3.0-or-later license header |
| 197 | 197 | - PHP code must pass syntax checks and PHPStan analysis |
| 198 | 198 | - XML files must be well-formed |
| 199 | 199 | - Version numbers must be consistent across `README.md`, `templateDetails.xml`, and other version-bearing files |
| 200 | 200 | - Attribution goes to **Moko Consulting**, not individual contributors |
| 201 | 201 | |
| 202 | 202 | ### Branching Model |
| 203 | 203 | |
| 204 | 204 | | Branch | Purpose | |
| 205 | 205 | |--------|---------| |
| 206 | 206 | | `main` | Stable releases | |
| 207 | 207 | | `dev` | Active development | |
| 208 | 208 | |
| 209 | 209 | --- |
| 210 | 210 | |
| 211 | 211 | ## Testing |
| 212 | 212 | |
| 213 | 213 | The repository includes a `codeception.yml` configuration for automated testing: |
| 214 | 214 | |
| 215 | 215 | ```bash |
| 216 | 216 | # Run tests (requires Codeception via Composer) |
| 217 | 217 | vendor/bin/codecept run |
| 218 | 218 | ``` |
| 219 | 219 | |
| 220 | 220 | --- |
| 221 | 221 | |
| 222 | - *Built with [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API) -- Moko Consulting* | |
| 222 | + *Built with [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/.mokogitea/wiki) -- Moko Consulting* | |
| 223 | 223 | |
| 224 | 224 | --- |
| 225 | 225 | |
| 226 | - *Repo: [MokoOnyx](https://git.mokoconsulting.tech/MokoConsulting/MokoOnyx) · [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/mokoplatform/wiki/Home)* | |
| 226 | + *Repo: [MokoOnyx](https://git.mokoconsulting.tech/MokoConsulting/MokoOnyx) · [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/.mokogitea/wiki)* | |
| 227 | 227 | |
| 228 | 228 | | Revision | Date | Author | Description | |
| 229 | 229 | |---|---|---|---| |
| 230 | 230 | | 1.0 | 2026-05-09 | Moko Consulting | Initial version | |
| 231 | 231 |