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 Libraries Top

OvermindDL1
Been making an MLElixir thing (not released yet…) for fun in spare time in the past day. I’m just trying to see how much I can get an ML...
132 13487 106
New
achempion
Hi, I would like to tell about my initiative to further maintain and develop Waffle project which is the fork of Arc library. The progre...
New
wmnnd
Hi there, for my project DBLSQD, I needed a file storage solution that is a bit more flexible than Arc. Because I thought others might f...
New
mplatts
With HEEX released we decided to start a components library using Tailwind CSS - check it out here: Petal Components. We also have a boi...
New
markmark206
simple_feature_flags is a tiny package that lets you turn features on or off based on which environment (e.g. localhost, staging, product...
New
jakub-zawislak
Hi everyone, I’m coming from the Symfony (PHP) framework. I like Phoenix, but it has a one thing that was build much better in the Symfo...
New
Qqwy
Hello everyone, I wrote a small library today called MapDiff. It returns a map listing the (smallest amount of) changes to get from map...
New
tmbb
PhoenixWS - Websockets over Phoenix Channels Source code on Github here: https://github.com/tmbb/phoenix_ws Phoenix channels are a great...
New
handnot2
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application. This library uses Erlang esaml to provide plug enabl...
New
maltoe
Hello! Came here to announce ChromicPDF, a pet project PDF generator I’ve been working on for the past few months. Why another PDF gener...
New

Other popular topics Top

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...
3268 119930 1237
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New

Sub Categories:

We're in Beta

About us Mission Statement