Skip to Content

Admin UI

The optional greenlight-ui Next.js app manages channels, prompts, and dashboard stats. It talks to the core API server-side with a scoped X-API-Key (GREENLIGHT_API_KEY).

Community self-host: one super admin account created at /setup; no org switcher and no additional human users in the open-source UI today. Enterprise and Cloud add multi-user and organization models — see Editions & admin identity.

First-time setup

  1. Start the stack (npm run dev or npm run docker:full)
  2. Open http://localhost:3001/setup 
  3. Create the super admin (email + password, min 8 characters)
  4. Sign in at /login

If /setup redirects to /login and you never created an account, reset:

docker exec greenlight-dev-postgres psql -U greenlight -d greenlight \ -c "DELETE FROM admin_users;"

Then visit /setup again.

Pages

PathPurpose
/setupFirst-run admin creation
/loginSign in
/dashboardHealth and prompt stats
/channelsRegister / list / delete channels
/messagesMESSAGE channel history and send
/promptsCreate prompts and view history
/settingsConnectivity, retention, and account

Register a channel in the UI

  1. Go to Channels → Add channel
  2. Choose platform and channel type (PROMPT or MESSAGE)
  3. Enter channel_id (stable slug), target_chat_id, and credentials
  4. For MESSAGE channels, set a reachable callback_url
  5. Save — the channel detail page shows the webhook URL

Webhook pattern:

{PUBLIC_WEBHOOK_URL}/webhooks/{organization_id}/{platform}/{channel_id}

Create a prompt in the UI

  1. Go to Prompts → New prompt
  2. Pick a PROMPT channel
  3. Enter text and optional button options
  4. Optionally set callback_url, TTL, and allow free-text replies

Send a message in the UI

  1. Go to Messages → Send message (or use Send message on a MESSAGE channel)
  2. Pick a MESSAGE channel
  3. Enter text and submit

Inbound chat on MESSAGE channels is also stored automatically. See Messages.

Data retention

Under Settings → Data retention:

Scheduled deletion — enable separately for prompts, inbound messages, and outbound messages; each has its own day count when enabled.

Do not store — skip persisting inbound or outbound messages entirely (zero retention).

Defaults: prompts scheduled deletion off; inbound and outbound scheduled deletion on for 30 days; zero retention off for both directions.

Required env vars for the UI

VariablePurpose
DATABASE_URLSame Postgres as core (admin users table)
GREENLIGHT_API_URLCore base URL (default http://localhost:8100)
GREENLIGHT_API_KEYCalls core API (X-API-Key) — admin-scoped key (bootstrap or from Settings)
AUTH_SECRETNextAuth sessions

For hybrid npm run dev, set GREENLIGHT_API_KEY in the root .env. Core and UI use the same value.

See Configuration for the full list.

API-only deployments

You can omit the UI entirely. See API-only mode.