From 4744b2af03821215a7f70702ffbf6ce9aeb9728a Mon Sep 17 00:00:00 2001 From: Troels Ugilt Jensen <6103205+tuj@users.noreply.github.com> Date: Mon, 30 Jun 2025 15:47:12 +0200 Subject: [PATCH 1/7] 4565: Added ADRs 008, 009 --- CHANGELOG.md | 1 + docs/adr/006-templates.md | 4 ++- docs/adr/008-improved-developer-experience.md | 35 +++++++++++++++++++ docs/adr/009-remove-remote-components.md | 24 +++++++++++++ 4 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 docs/adr/008-improved-developer-experience.md create mode 100644 docs/adr/009-remove-remote-components.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 238dd88a2..8afe5385c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file. * Gathered all repositories in one Symfony application. * Changed to vite 7 and rolldown. +* Added ADRs 008 and 009. ### NB! Prior to 3.x the project was split into separate repositories diff --git a/docs/adr/006-templates.md b/docs/adr/006-templates.md index a68024e6c..caaaa248b 100644 --- a/docs/adr/006-templates.md +++ b/docs/adr/006-templates.md @@ -4,10 +4,12 @@ Date: 27-11-2024 ## Status -Accepted +Superseded Written years after the decision was made. +Superseded by [009-remove-remote-components.md](009-remove-remote-components.md). + ## Context The display client should run in a browser. Slide templates should therefore be written in javascript/React. diff --git a/docs/adr/008-improved-developer-experience.md b/docs/adr/008-improved-developer-experience.md new file mode 100644 index 000000000..d34a6140a --- /dev/null +++ b/docs/adr/008-improved-developer-experience.md @@ -0,0 +1,35 @@ +# ADR 008 - Improved developer experience + +Date: 30-06-2025 + +## Status + +Proposed + +## Context + +When a new feature is added to the system, it often depends on changes to multiple repositories, at the same time. +This split across the repositories complicates the development process. + +Another part of this is the maintenance of the repositories. It is important that the code uses up-to-date +dependencies. At the moment, this is especially an issue in the admin, client and templates repositories that all +depend on React and other javascript libraries. By merging these repositories the process of updating the +dependencies will be handled once instead of 3 times. + +## Decision + +We gather the different repositories of the OS2Display project into one repository (the API repository) and +rename it from os2display/display-api-service to os2display/display. + +Symfony will handle the routes for the admin and client. + +## Consequences + +All the code will be gathered into one repository. This will result in a single point of entry for development. + +Maintaining the javascript parts of the code will be unified. This will make the upgrading tasks easier. + +By unifying the code, features can be gathered into one feature branch. +This will make it easier to track the changes. + +Releases will only involve one tag, instead of multiple tags across repositories. diff --git a/docs/adr/009-remove-remote-components.md b/docs/adr/009-remove-remote-components.md new file mode 100644 index 000000000..0c991a981 --- /dev/null +++ b/docs/adr/009-remove-remote-components.md @@ -0,0 +1,24 @@ +# ADR 009 - Remove remote components + +Date: 30-06-2025 + +## Status + +Proposed + +## Context + +The library for loading remote components we use for importing the templates is abandoned. + +This makes it harder to keep the React applications up-to-date. Furthermore, remote-components have added +an unfortunate layer that hides javascript errors from the templates. This makes it harder to debug template issues. + +## Decision + +We remove the option of loading external templates into the system (remote components) and +replacing it with templates that are a part of the code. + +## Consequences + +Removing remote components will remove the option of importing templates from other locations. Therefore, the templates +need to be a part of the repository code. From 62532dc293d60315f02c12df2589dcf74f9b2d13 Mon Sep 17 00:00:00 2001 From: Troels Ugilt Jensen <6103205+tuj@users.noreply.github.com> Date: Mon, 30 Jun 2025 23:17:25 +0200 Subject: [PATCH 2/7] Update docs/adr/009-remove-remote-components.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ture Gjørup --- docs/adr/009-remove-remote-components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/adr/009-remove-remote-components.md b/docs/adr/009-remove-remote-components.md index 0c991a981..27f1bc428 100644 --- a/docs/adr/009-remove-remote-components.md +++ b/docs/adr/009-remove-remote-components.md @@ -8,7 +8,7 @@ Proposed ## Context -The library for loading remote components we use for importing the templates is abandoned. +The [library](https://www.npmjs.com/package/@paciolan/remote-component) for loading remote components we use for importing the templates is abandoned. This makes it harder to keep the React applications up-to-date. Furthermore, remote-components have added an unfortunate layer that hides javascript errors from the templates. This makes it harder to debug template issues. From 232c067025faf12e2d3398e2900f7c768b6491f4 Mon Sep 17 00:00:00 2001 From: Troels Ugilt Jensen <6103205+tuj@users.noreply.github.com> Date: Mon, 30 Jun 2025 23:27:56 +0200 Subject: [PATCH 3/7] 4565: Fixed issues raised in review --- docs/adr/008-improved-developer-experience.md | 35 --------------- docs/adr/008-mono-repository.md | 44 +++++++++++++++++++ docs/adr/009-remove-remote-components.md | 10 +++-- 3 files changed, 51 insertions(+), 38 deletions(-) delete mode 100644 docs/adr/008-improved-developer-experience.md create mode 100644 docs/adr/008-mono-repository.md diff --git a/docs/adr/008-improved-developer-experience.md b/docs/adr/008-improved-developer-experience.md deleted file mode 100644 index d34a6140a..000000000 --- a/docs/adr/008-improved-developer-experience.md +++ /dev/null @@ -1,35 +0,0 @@ -# ADR 008 - Improved developer experience - -Date: 30-06-2025 - -## Status - -Proposed - -## Context - -When a new feature is added to the system, it often depends on changes to multiple repositories, at the same time. -This split across the repositories complicates the development process. - -Another part of this is the maintenance of the repositories. It is important that the code uses up-to-date -dependencies. At the moment, this is especially an issue in the admin, client and templates repositories that all -depend on React and other javascript libraries. By merging these repositories the process of updating the -dependencies will be handled once instead of 3 times. - -## Decision - -We gather the different repositories of the OS2Display project into one repository (the API repository) and -rename it from os2display/display-api-service to os2display/display. - -Symfony will handle the routes for the admin and client. - -## Consequences - -All the code will be gathered into one repository. This will result in a single point of entry for development. - -Maintaining the javascript parts of the code will be unified. This will make the upgrading tasks easier. - -By unifying the code, features can be gathered into one feature branch. -This will make it easier to track the changes. - -Releases will only involve one tag, instead of multiple tags across repositories. diff --git a/docs/adr/008-mono-repository.md b/docs/adr/008-mono-repository.md new file mode 100644 index 000000000..f98c67c6d --- /dev/null +++ b/docs/adr/008-mono-repository.md @@ -0,0 +1,44 @@ +# ADR 008 - Mono repository + +Date: 30-06-2025 + +## Status + +Proposed + +## Context + +With the current multi-repository setup, when a new feature is added to the system, it often depends on changes to multiple repositories, at the same time. +This split across the repositories complicates the development process. + +Another part of this is dependency management and maintenance across multiple repositories. It is important that the code uses up-to-date +dependencies. At the moment, this is especially an issue in the admin, client and templates repositories that all +depend on React and other javascript libraries. By merging these repositories the process of updating the +dependencies will be handled once instead of 3 times. + +## Decision + +We gather the code in `os2display/display-api-service` repository. The `os2display/display-client`, +`os2display/display-admin-client` and `os2display/display-templates` repositories will be merged into +`os2display/display-api-service`. + +The `os2display/display-api-service` repository will be renamed to `os2display/display`. + +The `os2display/display-docs` repository will be kept separate to avoid coupling usage updates to releases. + +Symfony routes and controllers will be added for `/client` and `/admin` to handle serving and configuring the screen and +admin clients. This will enable us to move configuration for the two clients to .env and expose directly in html through +twig templates. + +The static build javascript files will be served directly by nginx from `/public`. + +## Consequences + +All the code will be gathered into one repository. This will result in a single point of entry for development. + +Maintaining the javascript parts of the code will be unified. This will make the upgrading tasks easier. + +By unifying the code, features can be gathered into one feature branch. +This will make it easier to track the changes. + +Releases will only involve one tag, instead of multiple tags across repositories. diff --git a/docs/adr/009-remove-remote-components.md b/docs/adr/009-remove-remote-components.md index 27f1bc428..f5000fb2f 100644 --- a/docs/adr/009-remove-remote-components.md +++ b/docs/adr/009-remove-remote-components.md @@ -8,17 +8,21 @@ Proposed ## Context -The [library](https://www.npmjs.com/package/@paciolan/remote-component) for loading remote components we use for importing the templates is abandoned. +The [library](https://www.npmjs.com/package/@paciolan/remote-component) for loading remote components we use for +importing the templates is abandoned. This makes it harder to keep the React applications up-to-date. Furthermore, remote-components have added an unfortunate layer that hides javascript errors from the templates. This makes it harder to debug template issues. ## Decision -We remove the option of loading external templates into the system (remote components) and -replacing it with templates that are a part of the code. +We remove the option of loading external templates into the system (remote components) and replace it with templates +that are a part of the code. The `os2display/display-templates` will be merged with the`os2display/display-api-service` +repository (See ADR-008). ## Consequences Removing remote components will remove the option of importing templates from other locations. Therefore, the templates need to be a part of the repository code. + +To add your own templates you will have to fork the repository, add your templates and build your own clients. From ed8299da74a0e325c90e446700c7e9f7b227a1ed Mon Sep 17 00:00:00 2001 From: Troels Ugilt Jensen <6103205+tuj@users.noreply.github.com> Date: Mon, 30 Jun 2025 23:35:24 +0200 Subject: [PATCH 4/7] 4565: Fixed markdown issues --- docs/adr/008-mono-repository.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/adr/008-mono-repository.md b/docs/adr/008-mono-repository.md index f98c67c6d..b3e6695c8 100644 --- a/docs/adr/008-mono-repository.md +++ b/docs/adr/008-mono-repository.md @@ -8,13 +8,14 @@ Proposed ## Context -With the current multi-repository setup, when a new feature is added to the system, it often depends on changes to multiple repositories, at the same time. +With the current multi-repository setup, when a new feature is added to the system, it often depends on changes to +multiple repositories, at the same time. This split across the repositories complicates the development process. -Another part of this is dependency management and maintenance across multiple repositories. It is important that the code uses up-to-date -dependencies. At the moment, this is especially an issue in the admin, client and templates repositories that all -depend on React and other javascript libraries. By merging these repositories the process of updating the -dependencies will be handled once instead of 3 times. +Another part of this is dependency management and maintenance across multiple repositories. It is important that the +code uses up-to-date dependencies. At the moment, this is especially an issue in the admin, client and templates +repositories that all depend on React and other javascript libraries. By merging these repositories the process of +updating the dependencies will be handled once instead of 3 times. ## Decision From fd067334c00e97836d69a42aeeb2ba1b6d2f071c Mon Sep 17 00:00:00 2001 From: Troels Ugilt Jensen <6103205+tuj@users.noreply.github.com> Date: Tue, 1 Jul 2025 09:00:44 +0200 Subject: [PATCH 5/7] Update docs/adr/008-mono-repository.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ture Gjørup --- docs/adr/008-mono-repository.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/adr/008-mono-repository.md b/docs/adr/008-mono-repository.md index b3e6695c8..2c48dfd51 100644 --- a/docs/adr/008-mono-repository.md +++ b/docs/adr/008-mono-repository.md @@ -25,7 +25,7 @@ We gather the code in `os2display/display-api-service` repository. The `os2displ The `os2display/display-api-service` repository will be renamed to `os2display/display`. -The `os2display/display-docs` repository will be kept separate to avoid coupling usage updates to releases. +The `os2display/display-docs` repository will be kept separate so the user facing documentation can be updated outside of the regular release cycle. Symfony routes and controllers will be added for `/client` and `/admin` to handle serving and configuring the screen and admin clients. This will enable us to move configuration for the two clients to .env and expose directly in html through From 7e848775fb128a27adf0ab6e0b324cb940935968 Mon Sep 17 00:00:00 2001 From: Troels Ugilt Jensen <6103205+tuj@users.noreply.github.com> Date: Tue, 1 Jul 2025 09:00:57 +0200 Subject: [PATCH 6/7] Update docs/adr/008-mono-repository.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ture Gjørup --- docs/adr/008-mono-repository.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/adr/008-mono-repository.md b/docs/adr/008-mono-repository.md index 2c48dfd51..528fbbf0a 100644 --- a/docs/adr/008-mono-repository.md +++ b/docs/adr/008-mono-repository.md @@ -31,7 +31,7 @@ Symfony routes and controllers will be added for `/client` and `/admin` to handl admin clients. This will enable us to move configuration for the two clients to .env and expose directly in html through twig templates. -The static build javascript files will be served directly by nginx from `/public`. +The static javascript build files will be served directly by nginx from `/public`. ## Consequences From ff33c3badd587fc8b4f220f3e660252a5d9bb0f6 Mon Sep 17 00:00:00 2001 From: Troels Ugilt Jensen <6103205+tuj@users.noreply.github.com> Date: Tue, 1 Jul 2025 09:05:32 +0200 Subject: [PATCH 7/7] 4565: Applied coding standards --- docs/adr/008-mono-repository.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/adr/008-mono-repository.md b/docs/adr/008-mono-repository.md index 528fbbf0a..57e403733 100644 --- a/docs/adr/008-mono-repository.md +++ b/docs/adr/008-mono-repository.md @@ -25,7 +25,8 @@ We gather the code in `os2display/display-api-service` repository. The `os2displ The `os2display/display-api-service` repository will be renamed to `os2display/display`. -The `os2display/display-docs` repository will be kept separate so the user facing documentation can be updated outside of the regular release cycle. +The `os2display/display-docs` repository will be kept separate so the user facing documentation can be updated outside +the regular release cycle. Symfony routes and controllers will be added for `/client` and `/admin` to handle serving and configuring the screen and admin clients. This will enable us to move configuration for the two clients to .env and expose directly in html through