Last year I've been searching for some administration engine for my Rails side project and I was not able to find a suitable option. I hate writing a ton of custom code for internal admin/tools so I decided to write even more code to build a general-purpose, no-code Motor Admin
Motor Admin allows to convert raw data into a powerful admin panel to cover almost every operation needed for most businesses.
Features:
- CRUD out of the box with many customization options
- Custom data reports with SQL
- Business intelligence dashboards with fields and variables
- Forms builder for custom workflows to integrate with API
- Report alerts via Email or Slack
- User roles and permissions
- Audit log
- English, Spanish, Portuguese UI languages
- Works nicely on mobile screens
Motor Admin is distributed as a single executable binary - it can be easily self-hosted on Heroku or via Docker. Also, it's possible to try it locally with binaries for macOS and Ubuntu Linux.
Would be glad to receive any feedback or answer any questions regarding the project.
The Dockerfile is simply downloading a release from GitHub. Docker Compose file is referring to an existing image on DockerHub. How can I build a Docker image for myself starting from the code?
It would be nice to see Motor Admin listed in CapRover's (open-source PaaS for self-hosting) "One Click Apps" catalog: https://github.com/caprover/one-click-apps/
Regarding your question - Motor Admin Ruby/Rails code is available under: https://github.com/motor-admin/motor-admin - so you can dockerize this Rails app from here.
But binaries still should be a much better option - you can join https://discord.com/invite/mFFJKSTgw3 if you have any questions.
I followed the steps to install it on MacOS from the GitHub page and I'm thinking maybe I ran the curl command from the wrong directory, as when I try to run ./motor-admin, it gives two dlyd errors:
1) "lazy symbol binding failed: Symbol not found: ___darwin_check_fd_set_overflow"
2) "Symbol not found: ___darwin_check_fd_set_overflow"
And it shows the "Referenced from:" being my current directory, somewhere in my Documents folder, and then "Expected in: /usr/lib/libSystem.B.dylib"
Any idea what might be causing the error?
Thanks!
You can try it in docker instead - also it's possible to deploy it on heroku for free.
ActiveAdmin serves us well, although shows its age, and recently it feels a bit abandoned (don't want to say anything bad, it's a tremendous piece of open source and we got a ton of value from it).
It's hard to say how difficult it could be but some companies already migrated from activeadmin to motor admin gem for their rails projects and they claim that it was worth it :)
Motor Admin has a simple unified Admin UI without the need of actually building the UIs unlike in Retool WYSIWYG.
The versatility of Motor Admin can be achieved via in-app UI configurations, custom forms, reports, and dashboards.
Btw, here is a short demo: https://www.youtube.com/watch?v=ZD4Six8ZEP8
Also, Motor Admin has a simple self-hosted deployment option.
Then, admin panels could all interoperate in terms of showing e.g. “pretty” names for things; and could also pick up presentation metadata burned into the DB’s objects at creation time (by e.g. your app's DB migration logic), even if the admin panel is not able to change the data itself.
(Of course, you could use something like this for more than presentation metadata; you could use it to encode type-binding hints for particular ORMs, for example. Think of it as the equivalent of the old macOS “resource fork” for the object — an unstructured thing that could be informally structured into a sort of user xattrs storage if people are willing to cooperate.)
In this case, the "Helm chart" is an app like Wordpress that runs DB migrations; the "monitoring resources" it deploys are the SQL-comment microformat data created by those migrations; and "Grafana" here is the DB admin panel, taught to look for that data.
Edit: I installed it. It only supports MySql and Postgres. It would be nice if your website mentioned this. :(
Full disclosure: I currently work for Internal but if you have any questions on our platform let me know!
You can learn about how to upgrade to the latest version here:
https://github.com/motor-admin/motor-admin/releases/tag/late...
But SQL Server might come in the future - stay tuned!
https://discord.com/invite/mFFJKSTgw3 - feel free to join Motor Admin discord server to get notified once SQL Server support is added.
"Deploy to cloud" is just an answer to the "where and how" - a singular option.
This is (typically, though not always) different from SaaS and on-prem, the former being hosted/managed/monitored by a third party, and the latter meaning hosted by you, usually managed and monitored by a third party - often for regulatory or whitelabelling reasons.
You can try it yourself locally on macOS, Ubuntu or in docker if you're on windows:
> Docker Run docker container image by specifying DATABASE_URL and SECRET_KEY_BASE
I glossed over that instruction, and since the CLI commands are scrollable overflow, I didn't see the variables in the command.
You need other, non-technical users at a company to use this type of tool for it to be useful and it's really tough to get a team to adopt a new tool. My solution? Build it on top of something they're already using: Google Sheets.
Not ready for a formal launch, but would love to chat with anyone that wants to try it out: https://www.wax.run/
It's at a price point most people at a startup can put it on their corporate card without question. But yes, it's tough to get a fortune 500 to go for something like this.
Do the hooks have to be Ruby code?
So let's say to want to add user to some LDAP directory once the user is created in Motor Admin.
In order to do that you need to override the default user creation form and send data from that form to your API back end so you can handle user creation in LDAP from there: https://monosnap.com/file/3CD1qKgNoTBOhwTwzLiNJXTUNgi8yH
All those API requests are sent with JWT header - so it's possible to validate them on the back end.
I've stumbled upon this too, tried over time many web frameworks and tools like retool, and I had two biggest complaints: a) there is no one-size-fits-all solution; b) web stack sucks.
A) The classic dilemma of using general-purpose solution vs custom-tailored solution. Creating admin panel with 3 screens with basic CRUD functionality should be a no brainer in 2021, but the complexity of underlying stack is so high, that there is virtually no choice except of using general purpose solutions.
To be clear, I'm talking about "I should be able to make such an app alone in couple of hours max" essential complexity levels.
B) Web is based on 3 pillars – HTML/JS/CSS, and I don't know how we ended up here, but those components were okay for linked text documents in 90s. They have never been designed for making modern reliable UI apps, and they are really bad design choices if we were building fullstack framework nowadays from scratch. No amount of complexity stuffed on top of this can solve the underlying nature of browser's stack. In short, it sucks at the fundamental level. And as more and more generations of programmers start their careers in the web world, objections to those stack choices are not answered, because they are no longer even raised.
Personally I find it hard to maintain projects I did with all possible web frameworks after a year or so. And the amount of security issues, amount of accidental complexity it brings to the development framework and the ever growing frustration with the technical limitations of this stack makes me invest a lot into abandoning this "modern web stack".
Plus, after 20+ years of writing SQL, I still find it suboptimal language for interaction with DB, and it contributes to the slowdown of development (and the need for general purpose solutions) too.
--- So, instead of doing yet another framework, I decided to go the different path for my projects. First, I rethink the stack from the ground up and choose tech with the least amount of accidental complexity and cognitive overhead. Second, I do template the typical CRUD functionality, so I can quickly create new admin-like project and add new screens/entities (while keeping it independent source from the tool that generates the code).
My current stack now is EdgeDB+Go+gRPC+Flutter.
- EdgeDB has fantastic tooling and decades of PostgreSQL engine reliability under the hood, but the real magic for me is in their query language – you don't want to return to SQL ever again after EdgeQL.
- Go – no comments, easy to write, easy to read, extremely fast (I almost never have to scale server for performance reasons) and the code I wrote 6 years ago works and compiles today and easy to maintain.
- gRPC solves the single point of truth for API, serialization/deserialization and other API things, that has never been in the original thought of the typical JSON/REST/HTTP stack. It's super mature and saves me a lot of time in the syncing backend and frontend API code.
- Flutter is a game changer many people not aware about. I write admin and user facing code in Flutter for almost 3 years now (2 of them using their Flutter for Web), and it's just insanely good. In one go I get native iOS/Android/Windows/Mac/Linux and Web apps that are indistinguishable in the look and feel. The best thing that happen in UI development in the last 20 years, as for me (I've made Qt apps in the early 2000, and Qt was the previous best thing). I also develop my own admin UI library for my typical apps, that has all the "must have" features and design.
So with this stack in mind, I simple wrote a command line tool in Go that does initial bootstrapping for new projects and adds new entities to the app with predefined templates (db schema, db code, conversion code, grpc handlers implementation, protobuf, flutter screens and API code). It takes around 2 seconds to generate a new screen given the fields definition. I then modify generated code as much as I want, not being "tied" to the tool. There is not a single line of JS/HTML/CSS there too, which is fantastic.
I'm still polishing the tool and admin UI lib, and it's not opensource yet, but I can't describe how great it feels to have this tool in my toolkit. Some apps built with it are already in production (including web apps) and work amazingly, and I'm mostly working solo on them.
With gRPC and UI side of things I think there is some issues, like no standard way to handle validation errors (e.g. email field has incorrect value), so everyone reinvents the wheel.
Edit: Also this EdgeQL seems like nice way to interact also from UI. gRPC is not mentioned in the EdgeDB at all.
I'm not sure if those are my biases, but I still try to keep things into separated layers (i.e. DB, backend, communication and frontend), so I can change them without affecting the overall design too much.
GraphQL API is not supported yet.
Motor Admin generates json-rest API under the hood on top of the database - I might be wrong but I don't know any good use case where Graphql API server as a proxy between the data and the admin UI could be useful.
If you want a view that consists of multiple entities. Example: a view that displays a customer with his last 5 orders and current inventory count for the items in those orders. That's probably 3 entities (customer, orders, inventory). Sure, you can do this with REST but typically it will require calls to 3 different endpoints to gather that data. A graphQL server can serve the same data with 1 endpoint using a custom graphQL query. I'm not saying one is better than the other; just trying to give you an example.
Due to this approach it should be much easier to build admin panels using Motor Admin.
My team has been using Motor for almost six months now, on a greenfield project at an early stage startup, and it has been absolutely phenomenal. It does everything we need it to, saves us loads of dev time, and has been intuitive for our non-technical folks to work with. We’ve also been able to easily extend it for our specific use cases. It’s a very well-designed piece of software.
The handful of times we’ve experienced issues, Pete has been quick to step in and help, usually publishing a fix within hours.
Great work, Pete, and thanks for Motor Admin!
After my startup failed and I found myself with a bunch of admin panel code I thought of building something like this but the number of competitors (both paid like retool, forest or OSS rails-admin, keybase) always deterred me.
Building your own is not what makes or break a startup: small startup would love this but they would not want to spend the money and just deal with things manually, building only what they need; bigger companies already have their system in place, built slowly over the years.
I'd be curious to know how you're planning to sell this.
I wonder if you could use a "standard" REST backend as a data source?
You lose the ability to use raw SQL queries, but then you could use this for any API and use the full CRUD with whatever actions and safeguards the server has programmed.
Specifically, I'm thinking about feathersjs with it's hooks instead of just accessing the database directly.
My concern is that with REST backend it would become a much complex tool and will make it harder to build an admin panel - Retool does a good job building internal tools with visual builders and connecting APIs - but that definitively takes more time to build admin panel with it than with Motor Admin.
>reactive state based on custom forms.
I'd say there is something like that already in Motor Admin.
So for custom forms it's possible to use conditions to display certain fields based on other field values.
Also it's possible to feed form field with selector options via SQL queries and those queries-options are "reactive" via variables as well.
You can learn more about it here: https://github.com/motor-admin/motor-admin-rails/blob/master...
Here is an example of complex forms: https://motor-admin.herokuapp.com/demo/forms/2
Hope that's something similar to what you expected to achieve with the admin tool.
What's the configuration / deployment story? How do you move a configured Motor Admin configuration from development to staging and then production?
All configurations are stored in motor.yml file which is automatically generated in root directory.
There might be two ways handling configurations: 1. Use git to create commits with new configurations in motor.yml and deploy/pull that git repo on the production host in order to update the configs.
2. rake motor:sync to sync configurations directly to production app host via API.
There a bit of info about configurations sync between environment here:
https://github.com/motor-admin/motor-admin-rails#configurati...
- It's missing a "you"