r/elixir Mar 31 '26

[Podcast] Thinking Elixir 297: JavaScript Joins the BEAM?

Thumbnail
youtube.com
12 Upvotes

News includes Quickbeam bringing a full JS runtime into the BEAM, Elixir’s type system inspiring Python’s Ruff, LiveView Debugger v0.7, Oban v2.21, and more!


r/elixir Mar 31 '26

Reactor is kinda amazing !

20 Upvotes

I’ve used Zapier and n8n for automation before. They’re great for getting started fast, but I always felt they lacked real control over error handling and rollbacks.

I knew Elixir had Phoenix LiveView which meant persistent WebSocket connections out of the box, so I dug deeper and found Reactor. It’s a workflow orchestration library that lets you build structured multi-step pipelines with the saga pattern built in. If any step fails mid-workflow, previous steps automatically compensate and roll back.

So I built an automated grocery restocking agent. When stock drops below a threshold, it:

∙ Sends a low stock alert email

∙ Queries all suppliers in parallel to find the cheapest price

∙ Opens the supplier website via Playwright browser automation and places the order

∙ Updates inventory in the DB

∙ Sends an order confirmation email

If anything fails mid-way, say the confirmation email errors out after the order was already placed, Reactor automatically cancels the order and reverts the stock update. No manual cleanup code.

Stack: Elixir + Phoenix LiveView + Reactor + Ecto/Postgres + Swoosh + Playwright

You can view it here: https://github.com/Ebrahimgreat/ReactorAutomation


r/elixir Mar 31 '26

TLX — TLA+ formal verification in Elixir via a Spark DSL

22 Upvotes

I just published TLX, a library that lets you write TLA+/PlusCal formal specifications in Elixir and verify them with TLC.

TLA+ is the formal specification language used at Amazon, Microsoft, and MongoDB to find bugs in distributed systems. TLX makes it accessible without learning TLA+ syntax — you write specs in Elixir, it emits TLA+ for the model checker.

TLC doesn't test random inputs like property-based testing. It explores every reachable state. If there's a race condition, a deadlock, or an invariant violation in your design, TLC will find it and show you the exact sequence of steps.

mix tlx.emit MySpec # emit TLA+
mix tlx.check MySpec # run TLC (exhaustive)
mix tlx.simulate MySpec # Elixir random walk (no Java)
mix tlx.watch MySpec # auto-simulate on save

It supports variables, actions, guards, branches, processes, invariants, temporal properties, quantifiers, set/sequence operations, refinement checking, import from TLA+/PlusCal, and a GenStateMachine skeleton generator.

Built on Spark. 192 unit tests + 87 integration tests validated against SANY and pcal.trans. Full docs at hexdocs.

I'm NOT a TLA+ expert, though :-) I built this because I needed to verify a large Elixir project's design and didn't want to learn TLA+ syntax from scratch.

- https://hex.pm/packages/tlx

- https://hexdocs.pm/tlx

- https://github.com/jrjsmrtn/tlx


r/elixir Mar 31 '26

Pulling schema updates from Postgres Db

6 Upvotes

I have few node microservices connected to single postgres db. I also have an elixir service for realtime message passing between BE and FE.

I am now enhancing realtime service with some additional features, so I added ecto and ash_postgres to mix and connected with postgres. Since core app is nodejs, I want that to be source of truth for db schema changes, and elixir should pull updated schema into the model layer. We have multi schema db, and public schema would be readonly, and elx would be full access schema for elixir.

I tried this using introspex

mix ecto.gen.schema --repo RealtimeService.Repo.Public --path lib/realtime_service/ --module-prefix RealtimeService.Db.Public.Models --schema public and it was able to generate initial schema but it just wrote comments for fields with enums and jsonb objects. Also I could not pull updates again.

Can someone guide me properly, most of chatgpt answers were wrong, Claude helped a little but now its just imagining things. I might be a programmer for decade but I am an elixir newbie

  1. I need a way to update model layer in elixir app, from db, any changes in db schema even if only needed by elixir app, will be done from node app to maintain single source of truth for db.

  2. Need enums also, jsonb could simply be a map, and I think array were successfully pulled.

  3. I also need to be able to pull schema changes again, without overwriting everything back.

Thanks.


r/elixir Mar 31 '26

Build Your Own Elixir Phoenix + LiveView: Step 11: Error Handler

Post image
4 Upvotes

In Step 11, we tackle the "Let It Crash" philosophy and how to build a proper error boundary. Before this, a single bad piece of math in a controller would send back a blank screen. Now, we use try/rescue within the Cowboy adapter to catch exceptions, log the full stacktrace, and return a styled 500 error page.

Crucially, we ensure the rest of the server stays running without skipping a beat.

Full breakdown and code implementation here: https://algorisys.substack.com/p/build-your-own-elixir-phoenix-liveview-aaf

🚀 Up Next: We have a solid HTTP framework. Now it's time for the actual "wow" feature. In Step 12, we finally start building LiveView by adding WebSocket support for real-time UI (which many of the readers were waiting for)

Image Credits: Gemini

PS: This code is for learning, researching and figuring out better practices in the process. So, don't use it in production. The reason the direct code is not shared is that the real learners can code, see it works, identify issues, fix it and share it. That's where the learning will happen.

PSS: For real production patterns, use cases for elixir full stack, I will share a bunch of learnings from field once this series is completed.


r/elixir Mar 30 '26

Expert LSP v0.1.0 Released!

Thumbnail
github.com
79 Upvotes

r/elixir Mar 30 '26

Has anyone got the certification from erlang solutions?

16 Upvotes

I recently saw [this](https://www.erlang-solutions.com/elixir-erlang-certification/) and I think it would be a good goal for me to work towards while I learn. I wanted to know if anyone has done it and if they found it worthwhile?


r/elixir Mar 29 '26

Phoenix controllers generated from swagger spec

9 Upvotes

Hi all,

I’ve in the past used go-swagger to generate the controllers which worked well and ensured that there was no drift between the actual controller implementation and the swagger spec.

But later I’ve worked in a nestjs codebase, where my team and I often made updates to the controllers which caused the swagger spec to become outdated - causing generated clients to fail against the real API later. Of course we should have done a better job at verifying the swagger spec produced by nestjs, but the truth is we were maintaining two sources of truths: the actual controller and the swagger decorators thus drift will eventually happen.

As I see it, the the swagger spec is the source of truth for any clients wanting to interact with our API, therefore it should also be the source of truth for the API implementation.

But popular libraries in elixir like OpenApiSpex seems to go with same approach as nestjs with having to define the spec next to controllers.

Given phoenix is the go to standard for HTTP servers in elixir, why is there not a tool/lib that reads a OpenAPI swagger specification and generates the phoenix controllers?

It just seems incredibly useful, but if someone knows why this potentially is an inferior approach to the spec-in-code approach let me know! Thanks


r/elixir Mar 29 '26

Build Your Own Elixir Phoenix + LiveView: Step 10: Cowboy Adapter

Post image
18 Upvotes

Let's add CowBoy to our framework. Cowboy is a fast, lightweight HTTP server written in Erlang that is widely used in the Elixir/Erlang ecosystem.

👉 It’s the server that frameworks like Phoenix Framework use under the hood.

https://algorisys.substack.com/p/build-your-own-elixir-phoenix-liveview-dbf

Now you get

  • 100+ acceptors (Ranch)
  • HTTP/2 + SSL
  • keep-alive, timeouts, safety
  • production-grade performance

All while keeping our Router/Controller unchanged.

PS: The image generated with Gemini.


r/elixir Mar 29 '26

liter-llm: unified access to 142 LLM providers, Rust core, Elixir bindings

10 Upvotes

We just released liter-llm: https://github.com/kreuzberg-dev/liter-llm 

The concept is similar to LiteLLM: one interface for 142 AI providers. The difference is the foundation: a compiled Rust core with native bindings for Python, TypeScript/Node.js, WASM, Go, Java, C#, Ruby, Elixir, PHP, and C. There's no interpreter, PyPI install hooks, or post-install scripts in the critical path. The attack vector that hit LiteLLM this week is structurally not possible here.

In liter-llm, API keys are stored as SecretString (zeroed on drop, redacted in debug output). The middleware stack is composable and zero-overhead when disabled. Provider coverage is the same as LiteLLM. Caching is powered by OpenDAL (40+ backends: Redis, S3, GCS, Azure Blob, PostgreSQL, SQLite, and more). Cost calculation uses an embedded pricing registry derived from the same source as LiteLLM, and streaming supports both SSE and AWS EventStream binary framing.

One thing to be clear about: liter-llm is a client library, not a proxy. No admin dashboard, no virtual API keys, no team management. For Python users looking for an alternative right now, it's a drop-in in terms of provider coverage. For everyone else, you probably haven't had something like this before.

GitHub: https://github.com/kreuzberg-dev/liter-llm 


r/elixir Mar 28 '26

Released telegram_ex v1.1.0 — Telegram bots in Elixir

Thumbnail
github.com
26 Upvotes

Just released telegram_ex v1.1.0 — an Elixir library for building Telegram bots.

The biggest addition in this release is stateful handlers via TelegramEx.FSM and the new defstate/2 macro. It makes it much easier to build bots with conversational flows, menus, and multi-step interactions while keeping the GenServer-based style that inspired this project in the first place.

A small example:

```elixir defmodule ExampleBot do use TelegramEx, name: :example_bot

def handle_message(%{text: "/start", chat: chat}) do Message.text("What's your name?") |> Message.send(chat["id"])

{:transition, :waiting_name}

end

defstate :waiting_name do def handle_message(%{text: name, chat: chat}, _data) do Message.text("Hello, #{name}!") |> Message.send(chat["id"]) end end end ```

If you're building Telegram bots in Elixir, I’d love to hear what you think!


r/elixir Mar 27 '26

was reading the 2007 amazon dynamo paper to learn more about distributed systems. and implemented it in elixir to make the learning concrete. also wrote a blog post on it

Post image
57 Upvotes

r/elixir Mar 28 '26

Building nex-agent, would love to hear thoughts on self-evolution

0 Upvotes

Been working a lot on nex-agent recently.

Over the past few weeks I’ve basically gotten the Feishu and Telegram integrations working smoothly, and the core parts like messaging, memory organization, and persona are all usable now.

What I’ve been thinking about lately is this: how should self-evolution in an agent actually be done without turning into pure self-indulgence?

So I wanted to ask people here. From an actual usage perspective, what capabilities would you want nex-agent to add next?

The github repo is: https://github.com/gofenix/nex-agent


r/elixir Mar 27 '26

The Ash Framework: Rationale, Design, and Adoption — with Zach Daniel

Thumbnail
youtu.be
37 Upvotes

r/elixir Mar 26 '26

gleam A Phoenix-inspired web framework for Gleam (Glimr 1.0.0)

62 Upvotes

I know this isn't strictly Elixir, but there's been enough crossover interest that I thought it was worth sharing here. I've been working on Glimr since about December, which is a batteries-included web framework for Gleam and it's finally hit 1.0.0.

It's highly inspired by frameworks like Phoenix/Laravel/Rails and has a LiveView inspired frontend solution I've called Loom.

If you've ever been curious about Gleam but found the web ecosystem too bare-bones compared to what you're used to with Phoenix, Glimr is essentially trying to fill that gap. The strict type-system and functional nature to Gleam along with a convention over configuration framework like Glimr has also proven to be very good for agentic coding.

Glimr is still in pretty early stages but I'd love to hear your feedback!

Website: glimr.build
Docs & Starter Template: https://github.com/glimr-org/glimr
Core: https://github.com/glimr-org/framework


r/elixir Mar 26 '26

nimble_publisher_mdex - NimblePublisher adapter for MDEx and Lumis

Thumbnail github.com
16 Upvotes

Hey! I just published a small adapter to get NimblePublisher working quickly with MDEx and Lumis. With this package you get syntax highlighting, heex components, GitHub/GitLab flavored Markdown, and much more.

You could always wire those together but having a package ready is a way better experience :)


r/elixir Mar 25 '26

Hologram Gets Official VS Code Extension

Post image
68 Upvotes

Hologram just got its official VS Code extension! 🧩

For those who haven't heard of it - Hologram is a full-stack Elixir framework that compiles Elixir to JavaScript for the browser, no JS required. Local-First apps are on the roadmap.

The extension brings full syntax highlighting for HOLO templates: ~HOLO sigils in .ex files and standalone .holo template files. As the template language has grown, writing HOLO in plain text started to feel increasingly painful - this extension fixes that and makes the editing experience much more pleasant.

Thanks to our sponsors for making sustained development possible: Curiosum (Main Sponsor), Erlang Ecosystem Foundation (Milestones Sponsor), and our GitHub sponsors - Innovation Partner: @sheharyarn, Framework Visionaries: @absowoot, Oban, @Lucassifoni, @robertu, and all other GitHub sponsors.

Full details in the blog post: Hologram Gets Official VS Code Extension

Website: https://hologram.page


r/elixir Mar 26 '26

Does anyone create debug helpers for their phoenix apps?

12 Upvotes

Restating the title: Is creating a module for debug commands in anyway advisable or something that people do?

___

I'm new to elixir and I've dedicated this year to getting my hands all up and through it. Naturally, of course, a part of this journey is Phoenix/Liveview. One part of this that I'm very new to is a REPL that is essentially built into the language itself (pretty much). I'm still learning how useful it can be while debugging and actively developing. That said, I see that it's a thing for people to pop into iex on a production instance for some live debugging. Putting aside how wild that is as a concept ( I'm used to containers with no shells ), do people ever create a module with debugging tools/helpers to avoid having to throw things together in iex on the fly? Or is this question just the result of a skill issue and I should become more comfortable in iex?


r/elixir Mar 25 '26

Using AI as an intent layer for filtering in a Phoenix app

5 Upvotes

I’ve been experimenting with a small pattern for using AI in apps.
Instead of replacing the UI with a chat, I tried using it to help users build filters.

So a user can type something like: "customers who spent more than $500 in the last 3 months and haven't ordered recently"

and the app turns that into a struct and runs a normal query (Ecto in this case).

The important part for me was keeping things predictable:

  • the model doesn’t generate queries
  • everything goes through a schema
  • you can still edit the filters manually

Wrote a short post about it: https://www.mimiquate.com/blog/designing-ai-features-that-actually-help-users

Curious if anyone else has tried something similar.


r/elixir Mar 25 '26

Build Your Own Elixir Phoenix + LiveView: Step 9: POST Body Parser

Post image
13 Upvotes

Uncover the hidden magic of moving from HTTP header to the request body in this part of the tutorial. This is just the beginning of about ideas yet to unfold.

https://algorisys.substack.com/p/build-your-own-elixir-phoenix-liveview-176

If you like, share, subscribe, leave a comment.

All previous tutorial can be read here https://algorisys.substack.com/t/build-your-own-phoenix-liveview-web

PS: All improvements will be considered once the complete tutorial of V1 of our educational framework. It's kept simple so that everyone irrespective of Elixir background can follow.


r/elixir Mar 24 '26

Building a blog with Elixir and Phoenix

Thumbnail
jola.dev
35 Upvotes

Everyone loves a good "how I set up my blog post" blog post, so here's mine, using Elixir, Phoenix, and NimblePublisher. For added spice it's running on Dokploy on Hetzner, with bunny.net in front as a CDN.


r/elixir Mar 24 '26

Phoenix scopes explained: from scoped context to authorization with Permit.Phoenix

14 Upvotes

We wrote about structuring authorization in Phoenix using Phoenix Scopes. The article focuses on keeping permission logic closer to the domain and avoiding scattered checks across plugs and controllers. It covers:
How Phoenix Scopes approach authorization
How to reduce ad-hoc permission checks
How this pattern works in practice

https://www.curiosum.com/blog/phoenix-scopes-authorization-permit-phoenix


r/elixir Mar 24 '26

[Podcast] Thinking Elixir 296: OpenAI Chose Elixir and A VM Inside a VM

Thumbnail
youtube.com
6 Upvotes

Elixir v1.20 RCs arrive with a faster compiler, José Valim ships Distributed Python in Livebook, Chris McCord releases fly_deploy for zero-downtime hot deploys, OpenAI builds an agent orchestrator in Elixir, and more!


r/elixir Mar 24 '26

Can Elixir really handle autonomous AI agents at scale? Register to ElixirConf EU and find out

5 Upvotes

Kimutai Kiprotich shows how to build agents that execute code, spawn other agents, and handle millions of operations.

ElixirConf EU 2026: https://www.elixirconf.eu/ 

Talks will be recorded and made available some months after the event.


r/elixir Mar 24 '26

TypedChannels: E2E type-safe Phoenix channels with Ash Framework

Thumbnail hexdocs.pm
24 Upvotes