The Game Panel specification

ADR-0010: Configuration files are TOML

Context

The panel is distributed as a single binary running FrankenPHP, per ADR-0009. Its configuration is held in typed configuration objects, per RFC-0002, but nothing decides the format that configuration is written in.

A standalone PHP web application would typically write its configuration as PHP files. A panel distributed as a binary is not bound to that, and can read its configuration from whichever format suits the job.

Configuration is edited by the sysadmins who install and run the panel, and they should be able to do that without knowing PHP.

Decision

Configuration is written in TOML files, which sysadmins edit directly. The panel does not read configuration from PHP files.

Alternatives

PHP files. They are what a standalone PHP web application would use, which a panel distributed as a binary does not need, and editing them requires knowing PHP.

JSON and YAML. Like TOML, both are widely known. TOML is chosen over them because it is the simplest of the three, and the closest to what people are already used to.

Consequences

Easier:

Harder:

Constrained:

Sources