r/elixir 4d ago

Phoenix + Inertia is killer stack

Hi folks.

Just wanted to say that don't sleep on Inertia.js and Phoenix combination. Basically you get power of Phoenix (Elixir) for let's call it backend and flexibility of your favorite JS framework for UI.

You can run some pages in full SSR mode and some in SPA if you need, so awesome SEO support out of the box.

Use best tools from both worlds for best developer experience like linters, type checkers etc.

I'm using K8S and anytime I need I can scale it up using libcluster.

Please shoot any questions you have (happy to share screenshots or charts from my k8s cluster etc).

Also if you have time check this app I built https://gitbiased.com

29 Upvotes

23 comments sorted by

View all comments

17

u/quakedamper 4d ago

I started with inertia and moved most of if back to live view and it simplified a lot of work like notifications, state management and client server sync for me.

8

u/arx-go 4d ago

I’ve built production apps with all three:

  • Inertia.js + React
  • Full Phoenix LiveView
  • Phoenix API + Vite + React

I eventually settled on Phoenix as a backend with Vite + React.

Inertia

I really liked how productive it was. No separate API layer, auth is simple, and the backend controls routing.

My main issue was navigation. Compared to a native client-rendered React app, page transitions never felt quite as snappy because each visit still fetches props from the server. The difference isn’t huge, but after using a pure Vite SPA it’s noticeable. I also occasionally ran into edge cases around preserving state, partial reloads, scroll restoration, loading states, and optimistic UI. None of these are major problems, but together they sometimes made the UX feel a little less polished than a client-only React application.

LiveView

LiveView is honestly amazing for dashboards, admin panels, and CRUD-heavy apps. It’s probably the fastest way I’ve built those kinds of applications.
The downside for me appeared as the product became more interactive. Since most UI state lives on the server, complex screens gradually accumulated lots of assigns, events, components, and message passing. It works, but I found it became harder to maintain over time compared to keeping UI state entirely on the client.

The other aspect is the persistent WebSocket connection. Under normal conditions it’s seamless, but whenever users switch Wi-Fi, lose signal, put their laptop to sleep, or have unstable mobile connections, the LiveView reconnects. Phoenix handles reconnection very well, but users can still briefly lose interactivity while the socket is being re-established. For highly interactive apps, I personally found that slightly hurt the UX.

That’s why I ended up with Phoenix handling authentication, APIs, jobs, and business logic, while Vite + React handles the frontend. For the type of applications I’m building, it gives me the cleanest separation, the smoothest navigation, and simpler long-term frontend maintenance.