It was a busy week in Software Brothers, but we finally released a new version of AdminBro — an autogenerated admin panel for Node.js apps that uses React framework to display a beautiful UI.

To put it simply, with AdminBro you can build an admin panel within minutes instead of days.

So what is in the latest version?

Access control

Usually, when the admin panel is used by multiple people, you may want to have some kind of access control. You don’t want everyone to be able to access all of the resources.

Now you can adjust the access to each action in every resource by simply setting isAccesible property in the options:

// options passed to AdminBro

...

actions: {

// only superuser can edit given resource

edit: {

isAccessible: data => data.currentAdmin.role === ‘superuser’

}, // everyone can see resource records

show: { isAccessible: true }, // no one can delete records

delete: { isAccessible: false },

}

...

For more information about isAccessible method — check out the API documentation: https://softwarebrothers.github.io/admin-bro-dev/BaseAction.html#.isAccessible

Action hooks

The next big thing is “action hooks”. Along with refactoring of how actions are handled internally, we allowed people to write custom before() and after() hooks.

In the before hook, you can adjust a request passed by your backend before it gets to the AdminBro API. It means that you can prefill custom fields or remove unnecessary data.

Along with the before hook comes an after hook — in which you can adjust the default action response. It may be worth using it when you want to add more data to the response which requires a more advanced population of records.

Check out the API here:

First 1.x.y release

This is the first 1.0.0 release, which means we freeze an API and from now on there shouldn’t be any changes that are not backwards compatible.

What’s next?

There are still a couple of issues that have to be addressed and we will work on them.

We are eager to make AdminBro the best admin panel out there, so the next release will come sooner rather than later.

If you like AdminBro — star the repo and check out the rest of our open-source projects.