Skip to content
ޔައުމިއްޔާDocumentation
Menu

Admin console (NOT VERIFIED IN UI)

Last updated 30 September 2026

On this page

Role identified in application implementation, but UI workflow could not be safely verified during this documentation run. The admin console shows real customers' emails, payment slips, spend and margins. Granting the QA account admin rights and capturing that data would have exposed private information, so the console was deliberately not opened. Everything below is VERIFIED THROUGH CODE only.

Overview#

/admin is visible only to accounts with profiles.is_admin (checked by getAdminContext() in lib/admin-guard.ts). Anyone else gets a 404. Settings shows admins a Payment approvals & users link.

Sections (from app/(app)/admin/page.tsx and components)#

SectionPurposeSource
Card capacity this monthGemini + Recall spend against the configured capacity; alert past a thresholdapp/(app)/admin/page.tsx
SpendModel spend today / this month, unit economics per credit, credits soldcomponents/admin-spend.tsx
VendorsVendor balances, reconciliation, payments ledgercomponents/admin-vendors.tsx
CostsCost per customer (Gemini / Recall / total / margin), daily spendcomponents/admin-costs.tsx
ContractsActivate a contract (account, contract, PO reference, start, term); pause/resume grants, call-off, renew, endcomponents/admin-contracts.tsx
SlipsPending payment slips (oldest 25), view slip, Approve / Reject with reasoncomponents/admin-client.tsx
Users50 per page; wallet and pool; minutes and asks this month; Add credits; Make admin / Remove admin (not yourself)components/admin-client.tsx

Approvals, plan changes and admin grants run as audited SQL functions (e.g. review_payment_slip, activate_contract).

Notes#

  • The payment workflow a customer sees is in Plans, credits & payment. The admin approval that completes it is not verified here.
  • Admins are deliberately not allowed to read other people's meetings: mayReadMeeting returns 404 for them.