---
title: "Admin Dashboard and User Management"
description: "Manage users, testimonials, the waitlist and banners in the Nuxt Starter Kit admin dashboard, built on better-auth's admin plugin with role-based access."
canonical_url: "https://nuxtstarterkit.com/docs/admin"
---

> Index of every page on this site: [llms.txt](https://nuxtstarterkit.com/llms.txt)

<note>

You can test all features by logging in with the demo admin user. Click the `Login` button inside the alert on [the demo app login page](https://demo.nuxtstarterkit.com/auth/login):

![Demo Admin Login](https://nuxtstarterkit.com/docs/demo-admin-login.png)

All non-GET requests are blocked for the demo app, to prevent any changes to the database. You can test all features in the demo app, but you can't make any changes to the database.

</note>

## Enable Admin Role

The kit uses better-auth's admin plugin. A user is an admin when the `role` column of the user contains `admin` (better-auth stores several roles comma-separated, e.g. `user,admin`).

You can set it via:

- **Drizzle Studio**: Run `pnpm db:studio` and edit the user directly
- **SQL query**: Connect to your PostgreSQL database and run:
```sql
UPDATE "user" SET role = 'admin' WHERE email = 'your-email@example.com';
```

## Features

The user admin is part of the required `dashboard` layer:

- List all users and perform actions:

  - Create
  - Delete
  - Ban/unban
  - Impersonate

The optional layers add their own admin pages and register them in the admin navigation. Delete a layer and its admin page goes with it:

- Manage testimonials (`testimonials` layer)
- Manage the waitlist (`waitlist` layer)
- Manage app-wide banners (`banner` layer)

## Access Control

Admin pages are protected by the dashboard's `admin` middleware. Every admin API handler also calls `requireAdmin(event)`, which returns `401` without a session and `403` without the admin role. See [Authentication](https://nuxtstarterkit.com/docs/authentication#require-the-admin-role).

## Sitemap

See the full [sitemap](https://nuxtstarterkit.com/sitemap.md) for all pages.
