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

josevalim
Hi everyone, We would like to announce that Plataformatec is working on a new MySQL driver called MyXQL. Our goal is to eventually integ...
New
RobertDober
Earmark is a pure-Elixir Markdown converter. It is intended to be used as a library (just call Earmark.as_html), but can also be used as...
239 11851 134
New
tmbb
I’ve been working on two packages (not on hex.pm yet) to build admin interfaces for phoenix apps: bureaucrat - which contains a bunch ...
New
seancribbs
Today I released a new dialyzer Mix task as the dialyzex package! At the time we started writing this task, the existing dialyzer integra...
New
kelvinst
Hey everyone! Well, we made this lib a while ago and now we decided to finally go out and public with it! It’s a tool for creating and m...
New
danschultzer
In short Plug n’ play OAuth 2.0 provider library. Just set up a resource owner schema with Ecto (your user schema), install the dependen...
New
wfgilman
I’ve cleaned up and open sourced three financial libraries I was using for my company. They are bindings for the APIs of these three comp...
New
Antrater
Hi everyone! I’m thrilled to announce a huge thing. We have been developing Elixir Moon Design System for quite a while. We are finally ...
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
bryanjos
Hi, I just published version 0.23.0 of Elixirscript. Most of the changes are around JavaScript interop now that Elixirscript uses the ...
New

Other popular topics Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
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
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 35421 110
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
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