Module Registry
Module Registry
Section titled “Module Registry”Public module packages are published on Packagist,
Composer’s default public repository. The separate module registry
publishes registry.json, the signed Marketplace catalog. Its packages.json
is retained as a legacy Composer index for older installations; new public
installs use Packagist. Newly signed catalogs bind the index; historical
signatures may predate that binding.
The Marketplace is a catalog and module-status interface. It is not a live package installer. Composer and the application image remain the code delivery boundary.
If you are creating a new module from the beginning, follow the complete Create a Module guide. This page focuses on the registry, signing, installation, and update boundary.
How the pieces fit together
Section titled “How the pieces fit together”module repository + vX.Y.Z tag ├─ Packagist ──▶ Composer lockfile ──▶ application image └─ reviewed registry PR ──▶ signed Marketplace catalogNew catalog signatures bind the legacy packages.json index; historical
signatures may predate that binding. Composer uses HTTPS and its lockfile; it does not verify the catalog’s
Ed25519 signature.
Updating the registry changes catalog information. It does not modify a
running container, install vendor/ dependencies, rebuild Vite assets, run
migrations, or restart Swarm.
The Marketplace fetches the signed catalog at runtime, using the configured cache TTL. Contributors can therefore publish new catalog entries without changing the KoAkademy core repository. A catalog entry describes an available release; it does not mean that the PHP package is installed in a particular image.
See Module ownership and migration for the existing domain packages and the safe replacement of a bundled copy.
Install a standalone module
Section titled “Install a standalone module”Once a public package and its desired release are available on Packagist, require it from the KoAkademy application repository:
composer require koakademy/forms:^1.10A Marketplace entry and Packagist publication are separate: confirm both when
appropriate. The six migrated packages temporarily use direct Git fallbacks until their
v1.1.0 releases are registered. Packagist has priority when a package is available; see the
handoff before removing the fallbacks.
Commit composer.json and composer.lock, then build the normal KoAkademy
image. Run migrations and php artisan modules:sync-permissions in the release container,
validate with php artisan modules:validate --all, clear/rebuild application caches, and roll the Swarm
service. Only after the package is in the image should a super administrator
open Administrators → Marketplace and enable it. The enable/disable
decision is stored in module_installations, and the application shows a
restart-required notice until the workers have been rolled. At container
startup, modules:sync-statuses records installed package metadata without
overwriting existing administrator choices or clearing restart markers. After
every application replica has been updated and verified healthy, acknowledge
the completed rollout explicitly with
php artisan modules:sync-statuses --acknowledge-restart.
The current Forms package supports authenticated, guest-identifier, anonymous,
and record-bound invitation forms, protected submissions, reusable templates,
safe suggestions, and KoAkademy student-model mappings. Its built-in Student
Profile Completion template renders only missing fields and applies answers
with blank-only concurrency protection. Sparse fields use the host
students.profile_details JSON column while existing normalized columns remain
the first storage target.
When a newer catalog release is available, Marketplace shows an Update
button. For Composer-installed modules it displays and can copy the exact
composer require command for the release. For legacy source-tree modules it
explains that the source must be updated or migrated in the KoAkademy
repository. In both cases, updating still requires a new image build and a
rollout; the button never changes PHP code inside a running container.
See the Forms module repository
for its package-specific behavior and configuration.
Forms v1.8 operational checklist
Section titled “Forms v1.8 operational checklist”After installing or updating Forms:
- Run
php artisan migrate --forceso the template, invitation, field presentation, andstudents.profile_detailsmigrations are applied. - Confirm the package is installed in the image and the provider is visible
under
vendor/koakademy/forms. - Build the host frontend so the module’s Inertia pages and generated route helpers are included.
- Open Administrators → Marketplace and enable the installed module if the persistent status is disabled.
- Open Online Forms → Templates, choose Student Profile Completion, publish the generated form, then use Invitations to preview eligible students and explicitly queue email delivery.
Deployment and Marketplace refreshes never send invitations. Links are hashed at rest, expire after 30 days by default, are revoked on resend, and become unusable after completion. The queue must be running for delivery.
Publish or update a module
Section titled “Publish or update a module”Contributor steps
Section titled “Contributor steps”- Maintain the extension in a public repository under a Composer vendor namespace you control. Match
composer.json’snametomodule.json’scomposer_package, and supply license, support, tests, and compatibility details. Thekoakademynamespace requires its existing maintainer’s authorization. - Run
composer validate --strict, package tests, and host integration checks. Tag the exact releasevX.Y.Z, matchingmodule.json’s version. - Submit the repository to Packagist, configure GitHub synchronization, and verify the package name, release, and source commit appear there.
- Open a PR to the registry repository adding the repository to
modules.json. Include the release, Packagist link, package/host CI evidence, migrations, permissions, compatibility, and rollback notes. - Maintainers manually verify the Packagist release matches the reviewed tag and commit, then review the generated catalog and legacy index, validate both contracts, and sign with the existing key. The registry builder does not currently verify Packagist availability. Publishing to Packagist does not automatically approve a Marketplace listing.
Contributors must never create a competing signing key.
The live registry and this host are separate repositories. Registry automation changes belong in the registry repository. Follow integrations/module-registry/README.md for the review and signing handoff; deploying the host alone does not change registry automation.
Maintainer steps
Section titled “Maintainer steps”After reviewing the module and the generated diff, use the existing private registry key from protected storage:
php scripts/validate-registry.phpphp /path/to/koakademy/scripts/validate-module-catalog.php registry.jsonphp scripts/sign-registry.php registry.json /secure/registry-private.key registry.jsonphp scripts/validate-registry.phpphp scripts/verify-registry.phpMerge only after the signature verifies. Registry CI validates every change;
the Pages workflow validates the signed files again before publishing them.
Never generate a replacement key for an ordinary module update. Existing
applications trust the current public key, so key rotation requires a separate
migration of every MODULE_REGISTRY_PUBLIC_KEY secret.
The complete contributor checklist is in the registry repository’s
CONTRIBUTING.md.
Update a deployed module
Section titled “Update a deployed module”For a future Announcement release:
-
Tag the release in the Announcement module repository.
-
Verify the release and source commit on Packagist, then have maintainers review and sign the catalog update and wait for Pages publication.
-
In KoAkademy, run:
Terminal window composer update koakademy/announcement --with-dependenciesphp artisan test --compactgit add composer.json composer.lockgit commit -m "chore(modules): update announcement"git pushIf Announcement is not yet a Composer dependency, use
composer require koakademy/announcement:^1.1instead. -
Build and deploy the new stable or edge image through the normal release process.
-
Run
php artisan migrate --forcewhen required, clear/rebuild caches, and roll every Swarm replica. -
Enable the installed version in Administrators → Marketplace if its persistent status is disabled, then roll the application workers when the Marketplace reports that a restart is required.
Existing deployments stay on the old module version until the application lockfile and image are updated. Marketplace refreshes do not perform these steps. The database state survives image replacement; the JSON status file is retained for first-boot defaults and compatibility with older releases.
Legacy source-tree modules
Section titled “Legacy source-tree modules”The six migrated domain extensions are installed from Composer, while
EnterpriseReporting remains bundled in Modules/. Older installations may still
have bundled copies. Never install a package alongside a bundled module with the
same identity; migrate it in a tested change while preserving database and
activation state. See Module ownership and migration.
Configuration and troubleshooting
Section titled “Configuration and troubleshooting”The current installer and Swarm templates default to:
MODULE_MARKETPLACE_ENABLED=trueMODULE_REGISTRY_REQUIRE_SIGNATURE=trueMODULE_REGISTRY_URL=https://yukazakiri.github.io/koakademy-modules/registry.jsonMODULE_SCAN_VENDOR=trueMODULE_ACTIVATOR=databaseThe registry public key must match the catalog trust root. If Marketplace shows a module but cannot enable it, confirm that the matching package is installed in the image, its provider is discoverable, its compatibility check passes, and its dependencies are enabled. If the signed catalog cannot be reached, installed modules remain visible but remote catalog information may be unavailable.
Core-only installations
Section titled “Core-only installations”A core-only image should omit optional Composer packages. It can still display the signed Marketplace catalog, but catalog entries are shown as Not installed and cannot be enabled until the package is added to the application dependency manifest and a new image is built. An official full distribution can ship the same packages in its image while initializing optional modules as disabled for new installations.
