Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A robust Admin Interface for Ruby on Rails apps
Madmin is an open-source Ruby on Rails engine that generates a customizable admin interface from your existing models, producing resource controllers, views, and fields with minimal DSL.
Madmin is a Rails engine that mounts an admin area into your Ruby on Rails application. It takes your ActiveRecord models and generates resource classes and CRUD views automatically, and outputs a working admin dashboard. It is maintained by excid3 and distributed as a gem under the MIT License. It is designed to be familiar to Rails developers because it builds on standard Rails scaffolds rather than introducing a heavy new DSL.
Madmin provides a set of generator-based customization options, deep Rails integration, and a minimal DSL that stays close to standard scaffolds. The main features include:
rails g madmin:resource), and the views reuse standard Rails action views (index, new, edit, show, and _form) that you can override with generators.rails g madmin:views copies the layout, navigation, JavaScript, and per-resource views into your app for customization; you can scope to a single model (e.g. rails g madmin:views:index Book).attribute :genre, :select, collection: [...]) or generate a custom field with rails g madmin:field Custom, producing _form, _index, and _show partials.attribute method accepts options like form: false, index: false, and show: false to control where a field appears.scoped_resources in the generated controller and add includes(...) to eager-load associations.Madmin is aimed at Ruby on Rails developers who want a quick, customizable admin backend without adopting a separate admin framework. It suits teams that are comfortable with Rails conventions (scaffolds, partials, generators) and want full control over the generated views. It is also useful for developers building internal tools who need to maintain a familiar Rails structure.
Madmin lets you generate, customize, and optimize an admin interface entirely within your Rails project. Use cases include:
rails g madmin:install, which creates resources for every model it finds.scoped_resources in the resource controller.Madmin works as a Rails engine: you add the gem, run the installer, and it generates resource and view files that you can further refine. Install with bundle add madmin, run rails g madmin:install to generate resources for each model, then use generators like rails g madmin:resource and rails g madmin:views to add or copy views.
Yes, Madmin is open source and released under the MIT License.
Yes, it is designed to work with Stimulus, Turbolinks, and Hotwire, and supports both Import maps and Sprockets for asset handling.
Run rails g madmin:field Custom to generate a CustomField class and the corresponding partials, then use it in a resource with attribute :title, field: CustomField.
Yes, you can run generators like rails g madmin:views:index Book to copy only the index view for the Book resource, and then edit it in your app.
Override the scoped_resources method in the model's Madmin controller and chain .includes(:association) before returning.
