zhenfeng-zhu
Hello Elixir community!
I’m excited to share Nex, a web framework I’ve been building for the past few months. It’s designed for indie hackers, startups, and anyone who wants to ship web applications fast without enterprise complexity.
The philosophy:
Nex embraces simplicity and convention over configuration. It’s built for:
Rapid development – Ship features, not prototypes
Indie hackers & startups – Build profitable products
Internal tools & dashboards – Admin panels, data dashboards
Real-time applications – Live dashboards, chat, streaming with SSE
Server-side rendering done right – Modern web apps without JavaScript overhead
What makes it different:
- File-based routing – No configuration. Drop a file in
src/pages/, get a route. - HTMX-first – Build interactive UIs with server-side rendering. No JavaScript framework needed.
- Hot reload – Instant feedback while developing via WebSocket.
- Real-time ready – Built-in Server-Sent Events for streaming data.
- Zero config – Works out of the box with sensible defaults.
- Production-ready – Docker included, deploy to Railway/Fly.io/Render in minutes.
Quick example:
defmodule MyApp.Pages.Todos do
use Nex.Page
def mount(_params) do
%{todos: fetch_todos()}
end
def render(assigns) do
~H"""
<h1>My Todos</h1>
<form hx-post="/add_todo" hx-target="#todos" hx-swap="beforeend">
<input type="text" name="title" required />
<button>Add</button>
</form>
<ul id="todos">
<li :for={todo <- @todos}>{todo.title}</li>
</ul>
"""
end
def add_todo(%{"title" => title}) do
todo = create_todo(title)
~H"<li>{@todo.title}</li>"
end
end
Get started:
mix archive.install hex nex_new
mix nex.new my_app
cd my_app
mix nex.dev
Visit http://localhost:4000 and you’re running.
What’s included:
- File-based routing with dynamic routes (
[id],[slug],[...path]) - HTMX integration with automatic CSRF protection
- Server-Sent Events for real-time streaming
- JSON API support
- Hot reload development experience
- Production-ready Docker setup
Example projects:
I’ve included several examples to get you started:
- chatbot – AI chat with streaming responses using SSE
- chatbot_sse – Real-time streaming with HTMX SSE extension
- guestbook – Simple guestbook with persistence
- dynamic_routes – Comprehensive showcase of all routing patterns
What’s NOT included:
- Built-in ORM (use Ecto directly)
- Authentication system (integrate your own)
- Asset pipeline (use CDN for Tailwind/DaisyUI)
This is intentional – Nex stays minimal so you can choose your own tools.
I’d love your feedback!
- Have you tried it? What worked? What didn’t?
- What features would make it more useful?
- Any pain points with the current approach?
- Would you use this for your projects?
Links:
- Hex Package (nex_core): nex_core | Hex
- Hex Package (nex_new): nex_new | Hex
- API Docs: nex_core v0.4.3 — Documentation
- GitHub:
https://github.com/gofenix/nex
Looking forward to hearing from you!
Trending in Announcing
Hey everyone!
Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
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
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries.
offset-based pagination with...
New
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi all!
I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas.
You...
New
Hello
Published a new library - ProcessHub!
ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
This showed up on my feed.. anyone heard of it? Just hype?
Ox Alpha is a reasoning model designed for coding, sustained ag...
New
It’s not that it’s vocabulary is too advanced. It’s something worse.
I get lost trying to follow even a paragraph written by Claude. It’...
New
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New
Introductory paragraph
I’ll be looking for a keen junior or someone that has a couple of years experience in the real world (so you’ve be...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #blog-post
- #ai
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
jam
Nice, this looks great. I had a similar idea in mind. My initial thought is that I wish this used datastar instead of htmx.
zhenfeng-zhu
I will think about it
sodapopcan
Nice!
Not to start a war but my vote as a non-but-potential-user is for htmx (unless it supports both).
garrison
Glad to see this, I think we need more web frameworks!
WRT the above, my understanding is that these “hypermedia frameworks” (htmx maintains a list) are generally designed to interop with pretty much any standard backend, so you shouldn’t really have to worry about picking a winner.
thiagomajesk
I’ve been waiting for something like this for a while. Great initiative! (I really wish Phoenix would have a less boilerplate code approach, and this is a great foundation)
ostap
IMO it’s all about the learning curve. I suppose someone coming over from Next.js would prefer Nex’s same file-based routing concept. As for HTMX, I vote LiveView
sodapopcan
LiveView’s great (it keeps the roof over my head) but it’s not a one-size-fits-all (nor is any framework, though LiveView is a little more honest about that).
And I would say that file-based routing would be familiar to anyone who started back in the 90s writing spaghetti PHP/ASP/etc for who HTMX also feels familiar, no need to bring Next into the discussion
zhenfeng-zhu
Love this discussion! The learning curve was definitely top
of mind when designing Nex - wanted to make it feel natural
for Next.js folks.
And hey, LiveView fans are welcome here too
We’re all
trying to make web dev better in our own ways!
sodapopcan
Oh, so it is Next inspired, woops
EDIT: Oh, right, “Nex”… lol, doi me.
jam
Kind of. They do similar things in different ways so you’d still need to rewrite things if you wanted to switch from one to the other.
Comparing solely htmx to datastar, htmx is less capable out of the box. Datastar = htmx + sse + alpine. All in a smaller footprint. I also think their default to fat morph is a nice DX win. Feels a lot more declarative.
Objectively I don’t see a good reason to chose htmx over Datastar but I can understand the subjective “I’m used to htmx”.
I also think they’re doing some interesting things with their web component lib, Rocket.