Admin

How to grant admin access to the landing page dashboard.

Overview

The landing page app (starterlander/) has an admin dashboard under /admin.

Admin checks use:

  1. DB-backed admin list (recommended): admin_emails table
  2. Env fallback (emergency): ADMIN_EMAILS (comma-separated)

The check is implemented in starterlander/src/lib/admin.ts.

Recommended: DB-backed admins

  1. Apply the new table:
bun run db:push
  1. Grant admin access by email:
bun run admin:grant you@domain.com
  1. List admins:
bun run admin:list
  1. Revoke admin:
bun run admin:revoke you@domain.com

Notes:

  • Emails are stored lowercased.
  • The user must sign in with the same email address.

Fallback: ADMIN_EMAILS env var

Set in starterlander/.env:

ADMIN_EMAILS=you@domain.com,another@domain.com

Use this as an emergency backdoor if you can’t access the DB (or you locked yourself out).