The Game Panel specification

ADR-0012: Modules are installed with Composer used as a library

Context

Modules come from two sources: bundled modules, shipped inside the binary as part of the panel’s own codebase, per ADR-0009, and external modules, installed alongside it. External modules are Composer packages with dependencies of their own, some of which the panel already provides. The panel depends on composer/composer, added for installing them.

Decision

External modules are Composer packages of type tgp-module, installed into a separate Composer project in the modules directory, with its own composer.json and vendor/. The panel drives Composer as a PHP library rather than running it as a standalone tool, and includes the modules autoloader alongside its own.

Alternatives

Composer as a standalone tool. Using it as a library instead gives full programmatic control over repository resolution and installation.

No other way of installing modules was weighed.

Consequences

Easier:

Harder:

Constrained:

Sources