For **Admin panel only** projects, the login is `/`, the home page is `/dashboard`, and other panel pages omit the `/admin` prefix. The proxy matches `/dashboard/:path*`, `/users/:path*` and `/settings/:path*`. Components use `@/components` and `@/components/ui`. API endpoints such as `/api/admin/users/export` keep their paths. Examples below use the combined public website + admin panel layout; generated standalone guides use the app's actual paths.

Dinvolt includes email/password sign-in, an admin panel, and password recovery with Better Auth. Use the built-in screens first, then customize the application-owned source as needed.

This guide applies to **Public website + admin panel** and **Admin panel only** projects.

## Set up authentication

### 1. Complete the database setup

Run this from your generated project:

```sh npm
npx dinvolt setup
```

```sh bun
bunx dinvolt setup
```

```sh pnpm
pnpm dlx dinvolt setup
```

```sh yarn
yarn dlx dinvolt setup
```

Setup completes the selected database environment and offers to create its first administrator. See [database setup](/guides/database) if the connection or tables are still pending.

### 2. Keep your local auth configuration

The generated `.env.local` already contains a random `BETTER_AUTH_SECRET` and your project's Portless origin. Preserve the secret when adding credentials.

For a project named `my-app`, the local origin is:

```dotenv
BETTER_AUTH_URL=https://my-app.localhost
```

Start the development server with your package manager:

```sh npm
npm run dev
```

```sh bun
bun run dev
```

```sh pnpm
pnpm run dev
```

```sh yarn
yarn run dev
```

See [local development](/quickstart#run-locally) for Portless setup. Restart the server after editing environment variables.

### 3. Open the admin panel

Open `/admin` on the local origin and sign in with the administrator created by setup.

| Route                    | Purpose                        |
| ------------------------ | ------------------------------ |
| `/admin`                 | Sign in                        |
| `/admin/home`            | Admin home                     |
| `/admin/users`           | Search, create, and edit users |
| `/admin/forgot-password` | Request a password reset       |

The login form appears immediately and remains usable while the client checks an existing session. Administrators continue to Home; signed-in users without the admin role see an access-denied message and can sign out.


## In this section

- <span id="create-the-first-administrator"></span><span id="staging-and-production"></span><span id="wizard-created-credentials"></span><span id="manage-users"></span><span id="find-an-account"></span><span id="create-a-user"></span><span id="edit-an-account"></span>[Administrators and users](/guides/authentication/administrators): Create the first administrator and manage user accounts.
- <span id="read-and-protect-a-session"></span><span id="use-the-client-api"></span><span id="validate-on-the-server"></span><span id="require-an-administrator"></span>[Sessions and authorization](/guides/authentication/sessions): Read sessions and protect server operations.
- <span id="password-recovery-and-email"></span><span id="1-configure-resend"></span><span id="2-request-a-reset"></span><span id="3-customize-the-email"></span><span id="recovery-safeguards"></span>[Password recovery](/guides/authentication/password-recovery): Configure Resend and use the included reset flow.
- <span id="configure-auth-environments"></span><span id="customize-authentication"></span><span id="change-options-or-plugins"></span><span id="server-and-cli-entry-points"></span><span id="provider-transactions"></span><span id="customize-the-admin-interface"></span>[Auth configuration](/guides/authentication/configuration): Set deployment origins, change plugins and update the schema.

