Rust full stack web application aproach

Hi rustaceans! I have a new project in Rust that involves the implementation of a full stack web application.
I have a specific requirement that makes me think about a different approach form a full stack framework.
Application users have a specific role such as (coordinator, administrator,...)
So it seems like a waste to me to create a single wasm binary that contains the code for all the frontend roles when they only going to use one.

So... I'm thinking to create different SPA frontends with some Rust framework fetching data form the same backend running on axum or actix and serving the compiled wasms from the backend too to keep "full stack" perspective
For example, a user requests to log in at http://server/login. If they authenticate as a coordinator they are redirected to /coordinator and download the coordinator-exclusive SPA, if they authenticate as an administrator, are redirected to /administrator and download the administrator SPA...

What do you think about this?
If this seems like a good idea, how could I host several SPAs from the same backend?
What frontend framework do you recommend using?

Thanks!!!

If you have multiple SPAs hosted on the same server that redirect to each other, by definition you don't have an SPA any more. I think you idea of using the user data upon login to redirect them to a different page is just fine. Dioxus and Leptos sound quite applicable. The former integrates with Axum while the latter integrates with Axum and Actix-web.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.