Morzaram

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.

Showing Posts 1 to 10

BartOtten

BartOtten

That would break the ‘solo’ project, right?

Having done a quite large solo project myself, I did regret it not being LiveView. The additional setup for SSR, API mapping etc was quite time consuming. Also the JS world has the awkward habit of hypes and breaking changes. Svelte might soon be a no-go once the JS framework train moves further.

However, when you really want to go the JS frontend route, the combo Absinth + Apollo is great. GraphQL provides some flexility and easier mental model (imho) while working on a separate backend and frontend.

Ps. The reason JS devs are cheaper is mostly because the language is popular and basics easy learned making for a good stream of newbies. It’s not a bad thing perse, but remember that 100x a cheap rate is more expensive then 20x a higher rate.

11
Post #1
hectorsq

hectorsq

I have been in that hell as a solo developer.

Rails + AngularJS
Rails + EmberJS
Phoenix + vanilla Javascript

Then LiveView appeared, and I immediately switched to it the first day it was publicly released.

LiveView is the way to go. You will save tons of time. Less overwhelm. Less frustration. Simpler. More productive. Happier.

AstonJ

AstonJ

Agree with what they said! ^^

LiveView has been making leaps and bounds, not just with performance tweaks but in areas which some might have considered weak points for this type of tech.

Have a look at things like Surface - A component-based library for Phoenix LiveView and 🍿 LiveMotion - High performance animations for Phoenix LiveView and when you really must have a SPA/heavy client based JS, then you could use Hologram - full stack isomorphic Elixir web framework alongside Phoenix! :003:

Personally I would go LiveView first and then (use it/Phoenix with) Hologram and then something like Svelte if I really really had to (tho in that case I would probably really be needing something WASM).

This is jmo, ultimately just go with your gut :023:

tomkonidas

tomkonidas

Maybe a hybrid approach?

Using Svelte in your Phoenix App? I ran across GitHub - nikokozak/svonix: Render Svelte components in Phoenix views. · GitHub a while back. Did not try it but could be interesting.

thojanssens1

thojanssens1

Would you know how this library works? No SSR? What are the limitations?

cjbottaro

cjbottaro

I absolutely love LiveView, but as OP said… it’s hard finding an Elixir dev; it’s much easier finding a frontend JS dev.

Even with LiveView, I’m not a very good frontend dev. It might make more sense for me to make a GraphQL backend, then let a frontend dev work their magic in React or Vue or whatever is popular these days.

Aiken00

Aiken00

I do not think you should choose elixir for your project if your another developer knows nothing about it.
Elixir is just a tool but not a goal.

Morzaram

Morzaram OP

It just compiles a svelte component where you can treat it like a component or partial. The interop between live view and this library doesn’t exist so you have to prevent it from updating when using live view. As for SSR, I think not since it’s a JS component, but I’m not certain.

Morzaram

Morzaram OP

Exactly my issue. I love Elixir as a backend but I want to be able to have someone come in and work with the front end because I am really not that good at, nor do I like, the front end.

Too much css & tears, too little time.

begedin

begedin

What I would go with is

  • Single repo, unless there’s a REALLY good reason to separate them out. Just makes following changes easier.
  • Use Phoenix with NPM. You can still use esbuild, but you can also easily install all the other NPM packages you might need.
  • Pick whatever frontend framework that makes sense. I’ll defer to advice by other’s here. I love Vue myself.

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
psy-q
I’m trying to set up Emacs with elixir-ls via lsp-mode and credo via Flycheck. This should mostly be preconfigured as Flycheck picks up c...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews