omerss2311

omerss2311

Tamnoon - Realtime web apps with any frontend and 0 effort :)

Hey all!

A little background for this: as much as I love Elixir, I suck at UI design. Not even CSS - I just can’t make a nice UI without my comfy Joy UI components. And I’m sure I’m not the only one :grin:
I wanted to get into web dev with Elixir, but the more I looked into it the more it seemed just.. extra. I’m just a high schooler making web apps, I don’t need big crazy frameworks with databases. And I’m sure I’m not the only one :)))

So I made Tamnoon - a library (/framework i guess?) to make realtime web apps effortlessly without all the bells and whistles. It’s basically a glorified cowboy websocket server, and it’s pretty much fully extensible, so you can do anything you want with it really.

I aimed to make it as simple as possible and abstract everything away, including the boilerplate - so you can write clean readable code with 0 distractions.

By default it is capable of holding a state for each client (similar to agents) and also implements basic pubsub functionality with channels. (currently no built-in database support since I do not get along with databases :innocent:)

The guides in the documentation basically cover everything you need to know, so check them out if you’re interested! Tamnoon v0.1.1 — Documentation

I would love to hear if you tried it out, and in general any thoughts / questions about it :slight_smile:
Hope you have a great day!

Most Liked

LostKobrakai

LostKobrakai

It took me a while to understand what Tamnoon does tbh. I don’t think the comparison to “big crazy frameworks” does you a favor here, as Tamnoon is providing but a tiny sliver of what you’d generally do with those big frameworks.

I really like the idea though. What Tamnoon provides on top of its dependencies is basically CRUD + pubsub of state on the server to clients connected via websockets + extension points for custom actions. This sounds like a great prototyping option when all you care for on the server is that it can hold and manipulate some shared state while working on the frontend.

I might want to look at Bare Websockets | Benjamin Milde, which would allow you to use plug for the websocket portion of tamnoon as well. So Tamnoon could work with both cowboy and bandit as underlying webserver.

omerss2311

omerss2311

0 setup, 0 boilerplate, 0 complexity. It’s also specifically made for this whereas with phoenix it’s more general purpose, which while it can be very beneficial also means tons of unnecessary boilerplate.

for example, to create a chat app you simply add Tamnoon to your supervision tree like so:

{Tamnoon, [[initial_state: %{last_message: ""}]]}

and that’s literally it for the backend. just have the frontend show new messages as the last_message value changes, and send this json for sending new messages:

{
  "method": "pub",
  "channel": "clients",
  "action": {
    "method": "update",
    "key": "last_message",
    "val": "the new message"
  }
}

PS. Sorry if the formatting is bad, I’m just on my phone rn

Where Next?

Popular in Announcing Top

asiniy
Hey there! I wrote a download elixir package which does exactly what its name about - an easy way to download files. I saw solutions ab...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 43806 214
New
kip
ex_cldr provides localisation and internationalisation support based upon the data from the Unicode CLDR project. Unicode released CLDR ...
407 13056 120
New
blatyo
The best overview for how things are tied together is this presentation. Modules and functions are pretty well documented at this point, ...
New
benlime
LiveMotion enables high performance animations declared on the server and run on the client. As a follow up to my previous thread A libr...
New
Qqwy
TypeCheck: Fast and flexible runtime type-checking for your Elixir projects. Core ideas Type- and function specifications are const...
336 14534 100
New
tfwright
After working on it for a couple of months and using it in production for most of that time, today I’ve released LiveAdmin, a LiveView ba...
New
tmbb
I’ve decided to create this topic to discuss optimization possibilities for something like Phoenix LiveView. I’ve created this topic unde...
144 10483 141
New
dbern
I’m excited to announce that TaxJar has developed and open-sourced DateTimeParser. We developed it because we found a need to parse user ...
New
dominicletz
Hi, I thought I had posted my library before but seems I hadn’t. The project is still in early stages but it’s growing and so I think it...
New

Other popular topics Top

mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 127536 1222
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54250 245
New

We're in Beta

About us Mission Statement