DEV Community

Jackson Pires for Vídeos de Ti

Posted on

🇺🇸 What if there was an admin interface built on top of RubyUI? That's how RubyUI Admin was born.

We're living in an exciting time for software development.

With AI, generating code, exploring ideas, and building new projects has never been easier. The old excuse of "that would take too much time" doesn't really hold anymore.

If there's a tool you've always wanted but it doesn't exist yet, this is probably the best time to build it.

That's exactly how RubyUI Admin came to life.

https://github.com/jacksonpires/ruby_ui_admin/

For quite some time I've admired projects like Avo and the developer experience they provide for building Rails admin interfaces. At the same time, I was using RubyUI, powered by Phlex, more and more in my own applications.

Eventually a simple question came to mind:

What if there was an admin dashboard entirely built with RubyUI?

Instead of waiting for someone else to build it, I decided to create it myself.


What is RubyUI Admin?

RubyUI Admin is a Rails engine that turns your Active Record models into a complete administration panel.

With very little configuration, you get:

  • Complete CRUD
  • Pagination
  • Filters
  • Named scopes
  • Dashboards
  • Custom actions
  • Bulk actions
  • Authorization
  • Built-in i18n (English and Brazilian Portuguese)

Everything is rendered server-side using RubyUI + Phlex, with progressive enhancements powered by Hotwire (Turbo + Stimulus).


Your admin becomes part of your application

One of the project's main architectural decisions was to avoid creating yet another isolated UI framework.

Instead, RubyUI Admin renders your application's own RubyUI components.

That means:

  • the admin follows your application's design system;
  • changes to your components are immediately reflected in the admin;
  • there's no duplicated UI library to maintain.

The result is an administration panel that truly feels like part of your application.


Server-rendered by default

Following the philosophy that has always made Rails productive, RubyUI Admin embraces server-side rendering.

JavaScript is only there to enhance the experience.

Everything continues to work even without JavaScript.

Turbo and Stimulus simply improve interactions like:

  • dialogs
  • notifications
  • tabs
  • clickable rows
  • small interface enhancements

Documentation inside your application

One feature I'm particularly proud of is the built-in documentation.

After mounting the engine, simply visit:

/admin/docs
Enter fullscreen mode Exit fullscreen mode

The gem serves its own documentation as HTML directly inside your application.

No need to leave your admin panel or search through external documentation while you're developing.

It's enabled by default during development and can also be exposed in production behind your application's authentication.


Current features

RubyUI Admin already includes:

  • Full CRUD
  • Configurable resources
  • Rich field catalog
  • Pagination
  • Filters
  • Named scopes
  • Dashboards
  • Metric cards
  • Custom actions
  • Bulk actions
  • Authorization with Action Policy
  • Internationalization
  • Multiple generators
  • Ruby-based customization

And it's still growing.

Future versions are expected to include advanced association management and additional index view types.


Project philosophy

A few principles guided the project from day one.

Everything is Ruby

Resources, policies, filters, dashboards, and actions are just Ruby classes.

Nothing is hidden behind magic.

Whenever you need to customize something, you simply extend or override it.


Progressive enhancement

The primary goal is to deliver a fully functional application before adding JavaScript.

This keeps the project robust, maintainable, and closely aligned with modern Rails philosophy.


One Design System

Since the admin uses your own RubyUI components, your application maintains a single source of truth for its UI.

Buttons, dialogs, tables, cards, and every other component are shared across both your application and your admin interface.


Getting started

Installing RubyUI Admin is straightforward.

gem "ruby_ui_admin"
Enter fullscreen mode Exit fullscreen mode

Then mount the engine:

mount_ruby_ui_admin at: "/admin"
Enter fullscreen mode Exit fullscreen mode

Configure authentication and authorization, create your resources, and you're ready to go.


Just getting started

RubyUI Admin is already usable today, but this is only the beginning.

My goal is to build a modern admin solution for Rails applications using RubyUI, while staying true to the Rails, Hotwire, and Phlex ecosystem.

If you're already using RubyUI, I'd love for you to give it a try.

Feedback, issues, ideas, and contributions are always welcome.

I hope this is only the beginning.

A special thanks to Ítalo Moura for helping me test the gem.

Top comments (0)