QuickAdmin
A lightweight, minimal Rails admin interface gem with modern Turbo/Hotwire integration.
QuickAdmin provides a simple, no-hassle admin interface for your Rails applications without the complexity and overhead of heavier admin frameworks.
Features
- ✅ Minimal Dependencies: Only Rails required
- ✅ Modern UX: Built with Turbo and Stimulus
- ✅ CRUD Operations: Create, read, update, delete
- ✅ Search & Filtering: Real-time search and filtering
- ✅ Mass Actions: Bulk delete and operations
- ✅ File Uploads: Active Storage integration
- ✅ Responsive Design: Works on all devices
- ✅ Configurable: Optional Devise, Tailwind, Bootstrap, Trix support
Quick Start
# Add to Gemfile
gem 'quick_admin'
# Install
bundle install
rails generate quick_admin:install
# Configure (config/initializers/quick_admin.rb)
QuickAdmin.resource :user do |r|
r.fields :name, :email, :created_at
r.searchable :name, :email
r.editable :name, :email
end
# Visit http://localhost:3000/admin
Installation
Add this line to your application's Gemfile:
gem 'quick_admin'
And then execute:
$ bundle install
$ rails generate quick_admin:install
Configuration
Configure QuickAdmin in config/initializers/quick_admin.rb:
QuickAdmin.configure do |config|
config.authentication = :devise # Optional: :devise, :custom, or nil
config.css_framework = :tailwind # Optional: :tailwind, :bootstrap, or :none
config.text_editor = :trix # Optional: :trix, :lexical, or :textarea
config.per_page = 25
config.mount_path = '/admin'
config.app_name = 'My Admin'
end
Resource Configuration
Define your admin resources:
QuickAdmin.resource :user do |r|
r.fields :name, :email, :created_at, :updated_at
r.searchable :name, :email
r.filterable :created_at
r.editable :name, :email
r.name 'Users'
end
QuickAdmin.resource :post do |r|
r.fields :title, :content, :published, :author, :created_at
r.searchable :title, :content
r.filterable :published, :created_at
r.editable :title, :content, :published
end
Field Types
QuickAdmin automatically detects and handles various field types:
- Text: String, text fields
- Numbers: Integer, decimal, float
- Dates: Date, datetime, timestamp
- Booleans: True/false values
- Files: Active Storage attachments
- Rich Text: With Trix integration (optional)
Authentication
No Authentication (Default)
config.authentication = nil
With Devise
config.authentication = :devise
Custom Authentication
config.authentication = :custom
# Override in your ApplicationController
class ApplicationController < ActionController::Base
private
def admin_authenticated?
current_user&.admin?
end
end
Styling
Built-in Styles (Default)
config.css_framework = :none
With Tailwind CSS
config.css_framework = :tailwind
With Bootstrap
config.css_framework = :bootstrap
Text Editors
Simple Textarea (Default)
config.text_editor = :textarea
With Trix (Action Text)
config.text_editor = :trix
With Lexical
config.text_editor = :lexical
Usage
After configuration, visit your admin interface at the configured mount path (default: /admin).
Features Available:
- Browse all configured resources
- Create, edit, and delete records
- Search across specified fields
- Filter by configured fields
- Sort by any column
- Bulk delete operations
- File upload and preview
- Responsive modal forms
⚠️ Security Warning
By default, QuickAdmin does NOT require authentication. This is intentional for development but MUST be changed for production.
# ❌ NEVER use this in production
QuickAdmin.configure do |config|
config.authentication = nil
end
# ✅ Always use authentication in production
QuickAdmin.configure do |config|
config.authentication = :devise # or :custom
end
See SECURITY.md for detailed security guidelines.
Requirements
- Ruby >= 3.0.0
- Rails >= 7.0.0
- Turbo Rails >= 2.0
Documentation
- 📖 Usage Guide - Comprehensive usage documentation
- 🔒 Security Policy - Security best practices
- 🤝 Contributing - How to contribute
- 📋 Changelog - Version history
- 📜 Code of Conduct - Community guidelines
Development
After checking out the repo, run:
bundle install
bundle exec rspec
# Run the dummy app
cd spec/dummy
rails db:migrate
rails server
# Visit http://localhost:3000/admin
Roadmap
- [ ] Advanced filtering options
- [ ] Export to CSV/Excel
- [ ] Custom actions per resource
- [ ] Batch update operations
- [ ] Activity logging/audit trail
- [ ] Dashboard customization
- [ ] Role-based permissions
- [ ] API endpoint generation
Contributing
We welcome contributions! Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
Quick Contribution Guide
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Add tests for your changes
- Ensure all tests pass (
bundle exec rspec) - Commit your changes (
git commit -am 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Support
Alternatives
QuickAdmin is designed to be minimal. If you need more features, consider:
- ActiveAdmin - Feature-rich admin framework
- RailsAdmin - Traditional admin interface
- Administrate - Thoughtbot's admin framework
- Avo - Modern admin panel (commercial)
License
The gem is available as open source under the MIT License.
Acknowledgments
Built with ❤️ by the Rails community. Special thanks to all contributors!