Superadmin
God-view operator role — seeded from env, mandatory 2FA, fully audited.
Superadmin is the highest role in Vlnry. It sits above Admin and can see and change everything across every account. It exists for the humans who run the instance — not for customer use.
How it is seeded
The superadmin account is created by the boot seeder. It reads SUPERADMIN_EMAIL and SUPERADMIN_PASSWORD from root .env. The seeder runs after database migrations, is idempotent, and writes both the identity store and the user profile store in the same transaction. Missing values fail the boot loudly — there is no silent skip.
The password is never logged, never returned by an API, and never bundled into the client. Update it in root .env and recreate the API container to change it.
Mandatory 2FA on first login
On the very first login the superadmin is forced through 2FA enrollment (TOTP). The /superadmin surface is gated by an enrolled and verified factor on every request. There is no bypass, no "remember this device forever", no fallback token. If the factor is lost, use the recovery workflow documented in the operator runbook.
Hidden by 404
To anyone below superadmin — including an Admin — the /superadmin page and every /api/superadmin/* route return 404, not 403. The existence of the surface is not leaked.
On sign-in a superadmin is auto-redirected to /superadmin. Regular users never see the redirect.
What Superadmin can do
- Filter, search, and sort across every account, user, target, and run.
- Change plans, refund credits, and revoke API keys — every mutation writes an audit entry with actor, IP, and before/after.
- Impersonate a user for support. Impersonation is loud (a persistent banner), time-boxed, one-click revocable, and cannot target another superadmin.
- A last-superadmin guard prevents demoting or deleting the only remaining superadmin.
Analytics tab
/superadmin?tab=analytics shows product analytics read from PostHog: Overview (visitors, sessions, page views, events, signups, pages per session, with the change from the previous period and a daily chart), Pages, Sources (referrer and UTM tags), Audience (countries, devices, browsers, operating systems), Events (an explorer with filters and paging), People (signed-in users who allowed analytics) and Funnel (visit → sign-up → target → run → checkout). Pick a range of 1, 7, 30 or 90 days and filter by surface, country or device; every choice is kept in the URL.
Until the operator configures read access, the tab shows a setup guide that lists the missing variables. Only people who chose Allow appear, and staff are never captured. Opening People or Events writes an audit entry. Operators: see product-analytics.en.md.