Advice: Easiest way to create a basic desktop UI for an Elixir app?

A beginner (of programming in general) is looking for an easy way (i.e. least new plates to handle) to implement a basic macOS UI for a local, offline Elixir app (script?).

The app takes a file path (HTML file), reads it, modifies it, and returns the string (or writes to a new file in the same directory - whichever is simpler to implement). It is not a Phoenix app. It doesn’t use Ecto at the moment - all the data is in a CSV file and a JSON file. It has two dependencies, NimbleCSV and Jason. The app is working and I use it regularly through the command line, but I would much prefer to have some GUI.

The UI needs to be able to select a local file and give that information to the Elixir app. It also needs a text boxes for user input, which will be sent also. It would be awesome if it could ‘remember’ which file is selected while the app is open or until I choose a new file.

The options I have considered are, (1) use Swift (minimal experience) to create a UI and somehow run the Elixir app, (2) use Scenic (no experience) to create a window with some buttons and text boxes, (3) use Phoenix and LiveView (minimal, but the most experience) and (3.1) wrap it in something like Electron (no experience) or (3.2) just run it through a browser, or (4) rewrite the small app in Swift.

I currently don’t have a mental representation of how (1), (2), or (3.1) would work. It’s like I’m looking at a microwave and all I see is a black box with some white because I don’t have the necessary abstractions.

Everything I come across seems to be about the web or Swift communicating to an Elixir server running somewhere else. (Maybe this is 99% applicable to my situation with small tweaks and I don’t have the insight to know that :confused: ) As for Scenic, I don’t see resources accessible at my level. Some of the code reminds me of LiveView so I may be able to wrap my head around it, but again, I don’t know what I don’t know…So,

  1. What do you think (a) is the easiest to learn and (b) has the most beginner friendly resources?

  2. Could you perhaps point me to relevant resources that would help me get started without too many hiccups?

More specifically,

For (1) - light Swift UI - how complicated is it to call an Elixir app from another language / application?

For (2) - Scenic - is interaction with local files something that is ‘simple’ to do?

2 Likes

You can read this topic for more info on available options:

The last contender option seems to be the best one of all:

You just need to wait for OTP 24 that is just around the corner :slight_smile:

6 Likes