What should be my front facing server, Vue or Phoenix?

I’m in the process of trying the same thing right now… but with ReasonReact and Next.js doing the SSR instead of Vue/Nuxt. Phoenix completely decoupled serving as graphql endpoint. I like the setup as it simplifies the webpack config for code splitting/lazy or async loading limiting the CSR required and it’s fast and efficient for the browser. I had quite a lot of JS on every page and felt decoupling made sense.

So far so good but sessions/cookies/csrf protection becomes a little trickier as it has to be implemented in the custom Express setup instead of Phoenix. I know that Nuxt has similar facilities for this as Next but this slowed me down a little bit.

Also you’ll have to understand the lifecycle hooks and whether they are executed server side or client side (or both). I imagine websockets will be a bit trickier than standard http req/res depending on whether the server or client is subscribing… but haven’t attempted this yet.

Not sure it was worth decoupling yet in terms of time to develop and added server side complexity but seems like a good pattern.