General
Authentication

Admin UI

Learn how to create admin users and access the admin UI.

The starter kit comes with an admin role and a UI for managing users and organizations out of the box. The only thing you need to do is to create a new user and assign it the admin role.

Create admin user via database

You can create an admin user directly in the database. First, start Drizzle Studio:

Terminal
npm run db:studio

Then:

  1. Navigate to the users table
  2. Create a new user or find an existing user
  3. Set the role field to admin
  4. Save the changes

Assign admin role to existing user

If you have already created a user and want to make it an admin, you can update the database entry directly.

Using Drizzle Studio

  1. Start Drizzle Studio:
Terminal
npm run db:studio
  1. Select the User table and find the user you want to make an admin
  2. Click on the role field and change it to admin
  3. Save the changes

Using SQL

You can also update the role directly using SQL:

update-user-role.sql
UPDATE users SET role = 'admin' WHERE email = 'admin@example.com';

Next Steps

Once you've created an admin user, you can:

  • Access the Admin Panel - Log in and navigate to the Admin section (see Admin Panel Overview)
  • Manage your application - Use the admin panel to manage users, organizations, subscriptions and more