Using Firefox as a base

I have a web server application and I thought about shipping it as a desktop software using flathub. For this, I thought that it would be nice to use a browser as a frontend.

Firefox allows a lot of customization and so, I was wondering if I can create a flatpak that uses firefox - as a base or as a dependency - and start it with a custom profile and custom preferences and policies.

Another example is syncthing - it uses a browser as frontend.

Is it a good idea to extend an existing application? I think, it might save space on disk…
What are your thoughts on this approach?

You’re basically asking, if you should use Tauri or Electron I guess.

Syncthing (syncthingy) does not use an included browser. It runs an app that serves the website at a local domain, clicking the tray icon uses xdg-open URL which uses the default browser.

This is the way better option, if you just need a single browser window.