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

pkrawat1
Presenting Aviacommerce, open source e-commerce platform in Elixir Aviacommerce is an open source e-commerce platform in Elixir. We at...
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
MRdotB
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
kip
Image is an image processing library for Elixir. It is based upon the fabulous vix library that provides a libvips wrapper for Elixir. I...
622 18934 194
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
mindok
What is ContEx? A pure Elixir server-side data plotting/charting library outputting SVG. It has nice barcharts in particular and works g...
New
treble37
Just looking for a little feedback on a tiny helper library I built - Sometimes I find the need to convert maps with atom keys to maps w...
New
fuelen
Hey folks! Want to present a toolkit for writing command-line user interfaces. It provides a convenient interface for colorizing text...
New
zachdaniel
Ash Framework What is Ash? Ash Framework is a declarative, resource-oriented application development framework for Elixir. A resource can...
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

Other popular topics Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
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
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
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New

We're in Beta

About us Mission Statement