Skip to content

PhoenixKit progress: An admin panel to manage users and roles in Phoenix

PhoenixKit now has an admin panel. Owners and Admins of an app get a dashboard and pages to manage users and roles, all built with Phoenix LiveView.

Dashboard

The dashboard shows how many users the app has and how they are split between roles, with a refresh to see the latest numbers.

Users

The users page lists every account with search and a filter by role, page by page. From it an admin can:

  • create a user directly, without the registration form;
  • give or take away roles, one at a time or several at once;
  • deactivate an account and turn it back on.

Roles

On the roles page, admins can create their own roles next to Owner, Admin and User, rename them and delete the ones no longer needed. The built-in roles can’t be deleted, and neither can a role that is still assigned to someone.

Your app, your layout

The admin panel lives under PhoenixKit’s own path, and only Owners and Admins can open it. Next up: making all of this install into a Phoenix app with a single command.