MaxSvargal

MaxSvargal

AshSDUI - Server-Driven UI for Phoenix LiveView applications backed by Ash resources

Hey folks! :waving_hand:

I’d like to introduce AshSDUI, a new library for generating complex interfaces and dynamic layouts directly from declarative Ash resource metadata, powered by Ash and Phoenix LiveView.

I know excellent tools like AshAdmin, Backpex, and Aurora UIX already exist. However, in my experience, they often lack architectural flexibility and clear escape hatches and sometimes excessive boilerplate and low-level handling. I wanted the ability to generate nested forms easily and dynamically alter layouts straight from the database or resource code, based on the actor, tenant, or user role without cluttering templates with conditional logic, and to do so with minimal boilerplate.

With AshSDUI, I’ve focused on creating a highly compact public interface that relies on your existing resource Ash metadata and ready-to-use receipts, but remains fully extensible at any level. It’s designed as an authoring ladder: you can start with fully generated screens and step down to custom recipes or raw LiveView only when needed, all without rewriting the whole stack.

AshSDUI is useful when you want more than scaffolded CRUD, but you still want a declarative path that stays close to your Ash resource model.

  • It separates metadata, view resolution, recipes, and render trees into clear layers.
  • It gives humans and llm agents a smaller authoring surface through standalone UI modules.
  • It keeps generated screens, custom layouts, and live runtime components on one contract.
  • It can grow from generated pages into product UI without forcing a rewrite of the whole stack.

Key highlights:

  • Server-Driven UI (SDUI): Dynamically resolve layouts and component compositions based on context (actor, tenant, audience, etc.) without touching the frontend templates.
  • Metadata-Driven Generation: Seamlessly generate complex UI, handle deep model relationships, and build nested forms right from Ash resource descriptions (ui_field, ui_intent, etc.).
  • Architectural Flexibility: Build ephemeral, code-authored, or database-persisted layout trees with clear escape hatches at every layer.
  • Shared Runtime Contract: Both generated screens and custom SDUI layouts share the exact same underlying contract (view, bindings, state, and context), keeping your data loading and rendering completely consistent.

You can find all the details, tutorials, and deep dives into the runtime/authoring models in the documentation here:

:package: AshSDUI Repository and Readme

:books: AshSDUI Tutorial

I would love to hear your feedback, thoughts, and suggestions! Thanks for your time.

Most Liked

nico_amsterdam

nico_amsterdam

Welcome Max.
You can update your skill set on https://maxsvargal.github.io/ :smiley:

omer

omer

Amazing work! This is exactly what the Ash ecosystem needs right now.

Ash provides absolute superpowers on the backend—handling complex domain logic, relationships, and APIs beautifully. However, the frontend has often remained a bottleneck where we lose that declarative leverage.

The concept of a true Metadata-Driven UI is an absolute game-changer for rapid application development. Having worked extensively with massive ecosystems like Odoo and Frappe, I’ve seen firsthand that their secret weapon is exactly this architecture. By allowing resource metadata to natively dictate dynamic layouts and nested forms, developers can focus entirely on business logic rather than wiring up redundant frontend templates.

Bringing this level of Server-Driven UI to Elixir—combining the declarative nature of Ash with LiveView—is a brilliant move. Your approach with the “authoring ladder” is particularly smart, providing that “batteries-included” experience for generating complex screens quickly while leaving a well-structured escape hatch for custom components.

I’m really looking forward to diving into the repo and seeing how it handles complex, high-concurrency SaaS architectures. Thank you for building and sharing this!

P.S. This really feels like the perfect answer to the previous community explorations regarding the future of Pyro and AshAdmin: https://forum.elixirforum.com/t/an-exploration-of-the-the-future-of-pyro-and-ashadmin/60827

MaxSvargal

MaxSvargal

The ultimate goal is to provide an abstract, declarative architecture that isn’t just for admin dashboards, but is equally suited for public, user-facing interfaces. As you noted with the ‘authoring ladder’, it’s all about hitting that exact sweet spot: delivering the absolute minimum boilerplate out of the box, while allowing for maximum customization on demand.

Thanks for checking it out, and I’d love to hear your thoughts once you dive into the repo!

Where Next?

Popular in Announcing Top

mathieuprog
Hello :waving_hand: Allow me to introduce you to Tz, an alternative time zone database support to Tzdata. Why another library? First a...
New
martinthenth
Hello everybody :wave: Recently, some of my colleagues talked about database ids and uuids and their problems, and I remembered the pain...
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
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52673 488
New
sbs
Only 650 LOC, wrote for fun :slight_smile: https://github.com/sunboshan/qrcode
New
sabiwara
Dune is a sandbox for Elixir and aims to safely evaluate user-provided code. You can try it out using this basic Elixir playground made ...
New
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 14057 106
New
anshuman23
Hello all, I have been working on my proposed project called Tensorflex as part of Google Summer of Code 2018.. Tensorflex can be used f...
New
alisinabh
Hey everyone i’ve developed a library for Jalaali calendar for elixir which supports converting Gregorian dates to Jalaali and vice vers...
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

Other popular topics Top

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
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
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
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31013 112
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52673 488
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New

We're in Beta

About us Mission Statement