#Microfrontend architecture with Tauri - Possible or not?

1 messages · Page 1 of 1 (latest)

cedar lantern
#

Hello everyone,

currently within our team we use Tauri to wrap our existing web apps and port them to the desktop environment for some additional features.

As part of the build process, we first build the web app, which we then use as the frontend for the Tauri app.

There are currently talks within the team to solve one of the complex problems that we have on our web application using microfrontends, I have to admit I don't fully understand how it works, but there were talks about a shell app running multiple other apps.

The question that I've raised is, given that we currently build the entire application and use the dist as the frontend for our desktop app, how would that work given that there might now be multiple dist folders with the microfrontend architecture. The guys that were doing the reasearch mentioned something that it might even count as one distribution, because the "parent" app would always load the "children apps", but I'm pretty sure we'd still have to package it all together for the desktop app otherwise it might not work.

Has anyone tried this with Tauri? Is it even possible? Any information regarding this is greatly appreciated 🙂

thorn spoke
#

if we're talking only about the frontends (the html/js/css stuff) and if they all land in the distDir then that should work out of the box, basically like a normal multi-page app.
Or i guess this is also a bit similar to astro which supports all kind of frontend frameworks even multiple in one app.

if we're talking about actually multiple tauri apps then i couldn't think of a more complex approach than that tbh.

if we're talking about multiple frontends without collecting them all in the distDir then it can get complicated too. If you host them all remotely i guess it also works almost out of the box, you just have to configure the ipc to allow remote connections.
if they also have to be included in the app / without a remote server than no idea how that would look like (that would not work with copying them into the distDir).

#

i don't think my answer was really helpful but to be honest your question really confused me 😅

cedar lantern
#

@thorn spoke yeah sorry about the question it's kind of all over the place, but I'll try to narrow it down.

We're talking about a single tauri app. The part that I have issues figuring out whether it's going to work or not is that if the multiple frontends don't all end up in the same distDir, I think the thing I'm looking for is configuring the ipc that you've mentioned. Will all of the multiple frontends be able to call the Tauri API with that approach?

thorn spoke
#

yes. with that config you could enable google.com to access them fwiw

#

not sure how it handles ips/ports though

cedar lantern
#

I see, I'll look into the ipc thing. Are there any major differences regarding this issue in terms of Tauri v1 and Tauri v2?