lafeber / motor-admin

Low-code Admin panel and Business intelligence Rails engine. No DSL - configurable from the UI.

Home Page:https://motor-admin.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

⚡ Motor Admin

Low-code Admin panel and Business intelligence Rails engine (no DSL - configurable from the UI).

🤓 Demo App | Features overview

Admin Panel

Installation

Add this line to your application's Gemfile:

gem 'motor-admin'

And then execute:

$ bundle install

Create and run migration:

$ rails motor:install && rake db:migrate

Features

Customizable CRUD

Resource settings

Settings UI

Everything in the admin panel can be configured using intuitive settings UI, which can be opened via the icon in the top right corner.

Data displayed on the resource page can be completely custimized via SQL queries and dashboards attached to the resource as a tab. Usually, queries used to display resource data should contain {{resource_name_id}} variable.

Custom Actions

Custom actions

Custom resource actions can be added via Active Record method call, API endpoint, or custom forms. Also, it's possible to override default create/update/delete actions.

Forms Builder

Custom form

Values from the form fields can be used in API path via {field_name} syntax: /api/some-endpoint/{resource_id}/apply

SQL Queries

SQL query

Queries can include embeded variables via {{variable}} syntax (mustache). {{#variable}} ... {{/variable}} syntax allows to decide if conditions inside the scope should be included in the query.

Data Visualization

motor-visualization

Data from the SQL query can be represented as: table, number, line chart, bar chart, pie chart, funnel, markdown

Dashboards

Dashboard

SQL queries can be organized into dashboards to create a convenient representation of the data.

Email Alerts

Email alert

Query data can be sent via email periodically using the alerts feature. Interval of the alert email can be specified using natural language, e.g., every day at midnight, every Monday at 8 PM, every weekday at 6AM and 6PM, every minute.

Sender address can be specified using MOTOR_ALERTS_FROM_ADDRESS environment variable.

Intelligence Search

Intelligence search

Intelligence search can be opened via the top right corner button or using Cmd + P shortcut.

Optimized for Mobile

motor-mobile

Configurations Sync

All admin panel configurations are automatically stored in the config/motor.yml file. It's recommended to include this file in the application git repository to always have the admin panel configurations in sync across different local and remote environments.

It's possible to sync local development admin panel configurations with remote production application via rake motor:sync task:

MOTOR_SYNC_REMOTE_URL=https://remote-app-url/ MOTOR_SYNC_API_KEY=secure-random-string rake motor:sync

Authentication

Admin panel can be secured with 'Basic authentication' by specifying MOTOR_AUTH_USERNAME and MOTOR_AUTH_PASSWORD environment variables.

Alternatively, it can be secured with devise or any other authentication library used by the application:

authenticate :admin_user do
  mount Motor::Admin => '/admin'
end

Development

Start webpack dev server:

yarn install && yarn serve

Setup development database:

rake app:db:create && rake app:db:setup

Start example application in development mode:

MOTOR_DEVELOPMENT=true rails s

Comming Soon

  • User groups
  • Row-level permissions
  • Multiple databases
  • NoSQL data sources
  • Pro Bussines intelligence features

License

The gem is available as open source under the terms of the MIT License.

About

Low-code Admin panel and Business intelligence Rails engine. No DSL - configurable from the UI.

https://motor-admin.herokuapp.com/

License:MIT License


Languages

Language:Ruby 80.8%Language:JavaScript 12.1%Language:HTML 5.2%Language:SCSS 1.7%Language:CSS 0.3%