ADR 10: Change Visualization Standalone - Electron & NW.JS
If users want to use CodeCharta Visualization without a browser installed they can use the npm start
option inside the repository or install it via npm
and execute it via codecharta-visualization
.
For this standalone use-case (like a desktop app without an installer) there are several options to choose from, the biggest beeing electron and NW.JS. Both frameworks can be used with a variety of packagers, which automate the process to build a standalone version.
NW is used for the most releases including and prior to version 1.119.1
, but itself and its packagers are the source of isssues regulary.
- NW app completly unusable in release version
- Dependency not available anymore, so CodeCharta could not be installed
- Pheonix builder stops working with new nw-versions
- Swap to nwjs-builder, because pheonix was not maintained anymore
To avoid these issues there are two options:
- Swap to electron
- Stay with nwjs, (requires to) develop own package and build scripts to eliminate some of the problems and security risks from old dependencies
Status
accepted 1.
Decision & Consequences
- Use the electron framework for standalone CodeCharta-Visualization
- Use the electron-packager to produce all available combinations of OS and architectures
- Zip the results like previously and add them as assets to releases.
Because we did not use any features of the nwjs standalone framework, we don’t need to adapt or change anything, besides the call in the package.json
and some adjustments are needed in the github release action.