depdepdep

depdepdep

Hello Elixir Forum! :smiley:
I have questions about migrating a client-side specific feature from a React app to Phoenix (or maybe to a traditional server-side app).

I have an existing app built with NextJS and Django (REST) and I’ve been considering to migrate it to Phoenix. But, some aspect of the app might be very well-suited to client-side nature of a React app, and I’m not sure if I can really migrate the whole thing to Phoenix.

Users can submit a product in a multi-step (multi-page) form, where they can upload images (and some other additional files) and edit them in an editor (made with fabric.js) where they can move around/resize the images. Every time it happens, another “preview” image is generated on the browser and will be displayed on the other pages in this multi-step form.

Everything happens on client-side: uploaded files and generated preview images are still being kept on the client until users actually hit submit, so the file is not being sent unnecessarily to the server if later on the user decided not to continue the process.

Question: how should I approach to do that on Phoenix?
What I can think of currently is to have the multi-page form, save every step of the form on a “draft” record and actually “publish” after the last submit button clicked. I can set up a scheduled job to remove all “draft” records (unfinished form submissions). But this approach would mean that every files uploaded & preview images generated to be saved on server and sent across the network, with the additional network to/from AWS S3 which I’m using.

I’m new to Elixir and Phoenix and not aware of commonly used libraries/patterns that might fit the problem well, so I need some suggestions :smiley: would like to just migrate the React component to LiveView + some JS (if that’s possible), or embedding the React component, or rendering React component for this specific route with some other libraries I can found on this forum.

First Post!

BartOtten

BartOtten

Welcome! But…but…why? What advantages do you expect Phoenix (Live)Views will bring you in this use case? If we know, this might influence the advice.

Option 1: less Python
Phoenix can act as API server. You could swap Django with Phoenix + Absinthe (and use it’s websocket subscriptions). Then you can keep the React frontend.

Option 2: less javascript
Try Liveview; but know how to combine it with Javascript libs before you start building and keep in mind the roundtrip delays.

Option x, y, z…etc we need more info :wink:

Last Post!

depdepdep

depdepdep OP

Hello @kokolegorille , thanks for the reply!

The main reason I want to enter Phoenix is to move out from the “client and API server” model with NextJS/Django REST that I currently have, and also to use LiveView on other parts on my app. (and some other reason I described on my previous post)

I will take a look on possibly embedding the React component for some routes and if there’s any Webpack setup I might need to have.

Thanks for the LiveView upload resource, will take a look on it! :smiley:

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
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
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
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
apz
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
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
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
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
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

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews