To simplify and enable new features that will help with mapeo core next integration, there are a couple of big architectural pieces that we want to address beforehand.
move from Electron Builder + Webpack to Electron Forge + Vite. Electron Forge seems to have gained momentum in terms of the best supported packaging tool to use. it includes a relatively approachable Vite plugin that allows straightforward usage of Vite, which is easier to work with and extend than Webpack for our cases. @gmaclennan has a pretty nice base to work with in https://github.com/digidem/electron-rpc-reflector-example
Use node processes (via https://www.electronjs.org/docs/latest/api/utility-process) for long-running services where possible. This includes the map server, mapeo core, and eventually the map printer, to start. the "background process" via a windowless renderer requires complexity that can probably be avoided and most likely uses up more computing resources. Initially, the map printer will most likely stay as a windowless renderer because of its complexity and web APIs it requires. We can convert it if/when we can support static map generation via the map server (see https://github.com/digidem/mapeo-map-server/issues/22)
Thinking that the approach to actually implementing this will be to create a new repo that has the build+bundling and then just copy/pasting existing app renderer code as appropriate. We'll create a mocked mapeo core process that emulates something similar to https://github.com/digidem/mapeo-core-client-experiments
Description
To simplify and enable new features that will help with mapeo core next integration, there are a couple of big architectural pieces that we want to address beforehand.
move from Electron Builder + Webpack to Electron Forge + Vite. Electron Forge seems to have gained momentum in terms of the best supported packaging tool to use. it includes a relatively approachable Vite plugin that allows straightforward usage of Vite, which is easier to work with and extend than Webpack for our cases. @gmaclennan has a pretty nice base to work with in https://github.com/digidem/electron-rpc-reflector-example
Use node processes (via https://www.electronjs.org/docs/latest/api/utility-process) for long-running services where possible. This includes the map server, mapeo core, and eventually the map printer, to start. the "background process" via a windowless renderer requires complexity that can probably be avoided and most likely uses up more computing resources. Initially, the map printer will most likely stay as a windowless renderer because of its complexity and web APIs it requires. We can convert it if/when we can support static map generation via the map server (see https://github.com/digidem/mapeo-map-server/issues/22)
Thinking that the approach to actually implementing this will be to create a new repo that has the build+bundling and then just copy/pasting existing app renderer code as appropriate. We'll create a mocked mapeo core process that emulates something similar to https://github.com/digidem/mapeo-core-client-experiments