The Game Panel Design record
The Game Panel
ADR-0001 Accepted

The Build the panel is a single as one system, not a panel and an engine

Comparing
v1 to v2
Current
Read the document

Context

The panel was first built as two systems: a panel, holding . A panel held the frontend, and an engine engine behind it holding everything it held everything else. Each had lived in its own repository, and the panel was installed as an application that depended on on the engine as a a library.

The panel ships as a single binary, so both whatever repositories it is built from all have to end up inside itthat one file.

Modules extend the panel, and a . A module that provides adds something to the frontend functionality has to reach into both halvesboth halves when the frontend and the engine are separate systems.

Decision

The I will build the panel is as one system. There is : no separate frontend panel sitting over a backend engine, and no separate engine repository: one no engine repository holds of its own. One repository will hold the engine, the modules built on it, the the entry point and the build that produces produces the binary. The , and the frontend is will be part of that system, rendered on the server-rendered, rather than a client application talking to it.

Alternatives

A panel and an engine as separate systems, each in its own repository, with the panel installed as an application depending an application that depends on the engine engine as a library. Both I rejected this because both repositories still would still have to be part of end up in one binary, and because a module providing module that adds to the frontend functionality becomes much more more complex when the frontend is a system of its own.

Consequences

Easier:

  • A module will extend one system, including anything whatever it contributes adds to the frontend.
  • The build will take one repository and produce the binary from it.

Harder:

  • The repository Everything will hold everythinglive in one repository, so the boundary between the engine engine and the features features built on it will be a a matter of layering rather than of separate repositories.

Constrained:

  • The frontend will be rendered on the server-rendered, and the panel will not be a client application talking to an API. That removes the need for cross-origin handling, token refresh, API versioning for a first-party consumer, validation validation written twice, , and a second toolchain in the binary. It costs a view layer and session handling.
  • Nothing will be published for others to install as a library, so the Composer package is will be a project rather than a library.

Sources

  • The archived repositories panel_poc, created , and engine_poc, created : the two systems, both last pushed to on .
  • The panel repository, created : the single system replacing that replaced them, and the first record of the the decision, , which is both created and decided. The decision was taken before that, on a date not recalled.
  • The reasons, that both repositories would have to be part of one binary and that a module providing adding to the frontend functionality becomes much more complex across two systems: first written down on .
  • Commit 0d62ceb, "Correct README badges and repository framing", : the README dropping the framing that described the of the engine as a separately installed library, and recording the server-rendered frontend. Its wording that That everything lives in one one repository, and what the frontend is, are taken from what followed rather than than anticipated.
  • Issue #62, Engine - HTTP, : the SPA recorded as scrapped, and what a server-rendered frontend removes and removes and costs, taken from what followed rather than anticipated.
  • PR #75, chore: Rename package, add licence and patch Composer CVE, merged and squashed as 3372f20: the : the Composer package renamed from thegamepanel/engine to thegamepanel/panel and retyped from a library to a a project, described there , which the commit describes as left over from the abandoned split, and the Packagist badge removed because neither name neither name is published and the panel ships as a binary.

Source adr/0001-single-system.md · commit 9444a99 · published