An admin account has an Admin item in its menu that opens /admin: every account with what it holds and how it uses AI, and three actions per row. An admin also has every Pro feature without a subscription.
How to use it
Tiles above the table count users, projects, AI calls and AI tokens over 30 days, and, where payments are on, packs sold and packs refunded. The table lists every account: user, joined, last seen, projects, tokens, AI calls and AI tokens over 30 days (split by your key, credits, the plan grant and welcome credits), credits, welcome credits, plan, and sign-in methods. The search box filters it. Each row's menu offers Make admin or Remove admin, Give export access or Remove export access, and Delete user, each behind a confirm. Your own row has no menu.
Export access gives an account every Pro feature without a subscription, as an admin has; the row shows export access under its plan. It grants no monthly credits and changes nothing on the account's /credits page.
Funnel in the page header opens /admin/funnel: one row per signup week for the last twelve weeks (verified, welcome credits, wizard started and finished, paywall seen, checkout, paid, exported, came back), and a weekly activity table. Admin accounts are left out.
The first admin is made from the command line on the server (pnpm db:promote-admin <email>); every later one from this page.
How it works
The role is read from the database on every admin request, never from the session alone, and a non-admin gets a 404 for the page and its routes, not a 403. The menu item follows the session's claim, refreshed every five minutes, so a demoted admin keeps the item for at most that long and loses the page at once.
Neither action works on the caller's own row, so the last admin cannot lock everyone out. Deleting an account runs the same deletion the owner would, with the same block: an account on a live subscription is refused, with a message naming the merchant of record rather than a page the operator cannot use for someone else.
An admin's Pro features are the access plan; billing stays on the account's own plan, so an admin gets no monthly grant and sees its real plan on /credits. A demotion closes the exports at once.
What can go wrong
/adminis a 404: the account is not an admin, or was demoted.Delete userrefused: the account has a live subscription; it has to be cancelled with the processor first.