Morzaram
Hey guys, I’m legit struggling with deciding the stack setup for my next project. I really want to code in elixir for the backend but I want the front end to be easily editable by other developers. I cannot afford an Elixir developer, but a JS frontend developer is much more within my range. I much prefer being in the backend.
Right now I’m thinking about either having a Phoenix or Absinthe backend with a JS frontend, or to do full on sveltekit. Ideally, I’d like to have the first, but I’m not sure how to most productively implement this.
So how best to I optimize the workflow between an Elixir backend and a JS frontend? As a solo-dev, that aims to expand how would you recommend doing this? Do I have a sveltekit server in between for SSR and file based routing? That would mean I’d have two servers I’d have to deal with, which doesn’t make much sense…
It’s very overwhelming for me and I definitely have analysis paralysis but I would love to have some guidance on this.
Thank you in advance!
PS- I’m still quite new to all of this so maybe I’m missing some concepts that would make this easier.
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










Showing Posts 11 to 20- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
quda
I personally use with success:
It’s very flexible and adaptable but not for everybody’s taste or needs.
mindriot
What about coming at it from the other direction, find someone that you can work well with, understands your vision for the product and you can trust, take their advice on a setup that would play to their strengths? As long as things stay within one of the big options you won’t have much problem finding other front end devs who can work on it should you need to.
derek-zhou
I do this too. There is a small caveat: you must keep the Phoenix’s version on the js side to match the version on the elixir side.
cjbottaro
But yeah, we got an entire separate “app” for assets which uses NPM and Webpack. It so that we can share assets between our Rails app and Elixir app.
thojanssens1
If there’s a need for SSR/SEO:
No need for SEO:
So the need for SEO or not seems an important factor for choosing the tech. It has not been specified or I missed it.
Imo it seems that all other solutions not mentioned in this list are kinda hacky.
derek-zhou
Using a JavaScript framework with a Phoenix channel backend is a legitimate solution for a wide range of applications.
begedin
You can also specify a file path as your package version, so you set the relative file path to where your phoenix lib is. That’s how phoenix did it in prior versions to.
Something like
file: ../deps/phoenixdewetblomerus
LiveView might be a no-go if you really don’t want to touch any view code or HTML at all, but hear me out, it really sounds to me like it would fit your use case perfectly.
Have you considered hiring someone that only knows HTML and CSS? And ideally some design skills. You mentioned cost being a concern, that would be even cheaper than hiring a front-end JS dev.
You would need to build the functionality on the LiveView pages but you can do it with no concern for CSS or aesthetics, and then they come after you and sprinkle all the beauty on the HTML and CSS.
From where I am sitting you need to weigh the cost of two things:
SPA
LiveView
If I was a betting man, I would bet you are going to spend significantly less time and money on LiveView while delivering features faster.
AstonJ
This is a great point and this is actually how many large companies go about it - there are the initial concepts which are then made into more complete designs, those are then built in html/css/js as a static build, then finally ported over to the framework or system being used (this is how we built devtalk and all previous projects I have worked on).
Personally moving forward I want to try the reverse, build the system and then focus on the design and UI once everything is working as required. In part because back ends are much more complex than they used to be but also because it’s easier to try a few different approaches (or MVPs) to get a feel for what fits best for your vision.
Or find someone you think is capable and just get them to learn Elixir/Phoenix
We’re really lucky that we have so many books and learning material and I am constantly being surprised when I think surely there can’t be many more topics to write about Elixir now, then PragProg (or someone else) comes out with another one
tommyp
I’m going through a similar situation at the moment. I’d already evaluated a few of the options discussed in this thread and came to a conclusion - it depends
You haven’t described the problem space that your product is trying to solve. For my project, it involved a lot of use of the Twilio API. I started with LiveView and used React for the Twilio bits of the page. When I pushed LiveView hooks to their limit, I ported the whole page over to a React component rendered using Remount in a standard heex template. The React HOC that manages everything is getting pretty gnarly, so further down the line I might move most of that out to a SvelteKit app.
I’d say start with LiveView, as your pace of productivity will be much faster than all the extra work required by you trying to keep an API and SPA always working together, especially if you’re duplicating business logic on both sides. If/when you bring someone else on board, then you re-evaluate, or they might be fine with learning Phoenix.
Everyone in this thread raises some good points, but I think @thojanssens1 and @AstonJ are on the money.
IMO, if your idea is design heavy or requires a lot of client side interaction that LV isn’t suited for, then build it using whatever JS framework you like. If not, start with LiveView and push it as far as you can.