Hello all,
When I search in the web and here in Meteor forums, only references I find are rather collaborative services built with Meteor (Microservices with Meteor being the most recent I found).
As an architectural research, does anyone has already used a single-spa micro-frontend, maybe coupled with moleculerjs backend for microservices ?
I imagine a rather big application which would be written by several teams, Meteorjs being in this context only one of the multiple toolboxes/frameworks used by the teams.
Does anyone has any experience on this type of stack ?
Thanks in advance for your thoughts…
Regards
Pierre
My understanding and experience from trying to implement micro frontends with Meteor.
In the image below you have a LinkedIn ad. Left - when not authenticated and right when authenticated in LinkedIn (same url). I don’t know what is behind that iframe but it is definitely authentication aware. However, the ad is being delivered through an Iframe.
→ continuing after the image.
In general, micro-frontends require a building tool that can produce a single bundle with a single data store. (e.g. Module Federation | webpack).
Meteor does not support a similar building and in the context of multiple frameworks I am not sure a tool would be able to build a … let’s say NextJS and Meter together into an SPA.
However, Meteor can build server-only APIs that you can consume in other frameworks or you can use the “native” to Meteor Fetch API to consume data from other sources.
The only way I managed to get multiple front-ends together (all Meteor projects) was to have a “master” app that takes care of the initial authentication and then all other platforms consume a secure cookie to generate authentication codes to authenticate themselves with the same user.
Meteor keeps the authentication details in the local storage of the browser. This cannot be shared between domain.com and app.domain.com. However a secure cookie can be shared by subdomains.
In this Iframes model, front-ends can talk to each other in mainly 2 ways: send messages and some data between iframes (this is what I use) or through reactivity at DB level.
Example:
Left column with the user profile, central with the biking related content and the open chat window are 3 different Meteor projects with their own separate elastic environments and sharing some DBs while most DBs are individual to a project.
Hello,
This is very interesting. I agree that having a core app which acts as a master controller of all the other apps seems to be a must have, maybe to share common features, and at the very least the authentication token.
Thank you very much for your sharing.