I made a React-like web framework for Elixir, need opinions about its place in the ecosystem

Hey!
(PS. no idea if this is the right category for this, sorry in advance if it isn’t :innocent:)
Last month I made a framework for making websocket servers easily (Tamnoon. I originally wanted to make a js library to integrate it easily with other frameworks, but three days ago I decided against it, and to instead make it a standalone framework.

Sooo I just made it. I still haven’t written good documentation or anything, but it’s usable (at least I hope lol). In essence, it allows you to write HTML components using HEEx and have them trigger events on the server and sync with variables dynamically. Don’t wanna make this too long so if you want to know more check out the docs.

However, currently it doesn’t really support https and wss and all that, and I don’t really want to get into that tbh. But I don’t want it to be just a “liveview alternative” or a “worse liveview” as it admittedly is now.

I have thought about two ideas for where I want to take it, but I’m not sure and figured I’ll ask on here. The options I thought about are:

  1. Make it a Phoenix extension (if that is even allowed? not sure about that tbh). This will allow it to be actually usable in production and likely more stable, but the only reason to use it over Liveview would be for simplicity (aka it will stay a “worse liveview” for 90% of use cases).

  2. Go the direction of making it specifically for usage with wx, and make it basically intended to be used for making local apps (like with Electronjs apps). This would basically solve the issue of not using https and wss (I think?) and pretty much give it a niche. I can see that being a good option for making tools that require a GUI (for example a package like pyplot) with Elixir, especially considering the simplicity of the framework.

What do you think? I would also love to hear some other ideas if you have any too :grin:
Have a nice day!

Not sure what it tries to achieve, the simplicity mentioned above falls short by looking at examples provided with documentation.

It would be great if you could provide real-world examples between your library and liveview so we can understand where it would fit better, because as you said it is an alternative to liveview.

PS: I have no idea how react works and a lot others on this forum too, so don’t focus too much on that.

1 Like

Fair enough, thank you.

Yeah I mentioned this in the guide in the docs as well, the documentation is very temporary (wrote that guide in 10 minutes today just so there is something lol) and I will write better docs and everything in the next couple days hopefully. The main claim for simplicity though is the complete lack of boilerplate - as much as I like phoenix, I can’t stand managing 15 auto generated files when it isn’t necessary. It’s a “plug and play” kinda thing - you can run mix new --sup, add Tamnoon to the supervision tree, and then you can start immediately writing your frontend code :slight_smile:

And that’s a good idea about comparing it to liveview like that, thank you! Definitely will do.

1 Like

That sounds promising and I’d check it but docs is something that can boost or kill a library. Not sure why you were in such a rush to release but I’ll only take a look when you say that you have added docs + examples.

2 Likes

Thanks!

It’s not that I was in a rush really, I just didn’t want to write the docs before completing the rest of the features I planned - those docs were there just so there isn’t a huge chunk of the framework without any documentation :grin:

However, I’ve added (most of) those features now and written proper documentation + a series of guides with examples (that end up making a chat app) which I think should be satisfactory.

1 Like