Fibretrace Monet docs/Knowledge base/Persona: FT Admin

Persona 01 — FT Admin

Confidence markers and citation shorthand per README.md. L: = Lovable clone at origin/main (ffab85ca), M: = apps/dashboard, QC: = QC script line.

Who they are

FibreTrace’s own operations staff — the platform team that provisions everything customers cannot self-serve. In the real world this is the FibreTrace back office (and during QC, whichever tester “holds FT Admin”). They are not a customer persona: the /admin console is a separate application shell with its own layout, its own left nav and its own optional login gate, reached via /admin/login, not a section of the customer sidebar. VERIFIED (L:src/components/AdminLayout.tsx:66-72; the customer AppSidebar has no Admin entry — agent-verified at origin/main).

A good day for FT Admin: a new programme goes live with producers, participants and an owner registered; reservation requests are triaged; a new customer’s signup request is approved and the company can log in; scanners and SDUs are assigned; nobody is blocked waiting for provisioning. The QC script’s own build-order shows why this persona matters: 7 of the 11 test-environment object types are FT-Admin-gated (programme, programme registrations, reservations, licences, scanners, SDUs, product categories). VERIFIED (.local/qc-test-script/analysis.md section d).

Access model

The /admin block is gated only when the adminLoginRequired auth setting is on; by default it is off, meaning the console opens without a login — acceptable in a demo, flagged as a live bug in the July GUI walkthrough. VERIFIED (L:src/components/AdminLayout.tsx:66-72; BL:persona-case-matrix.md Part C item 4). Admin identity is client-side (localStorage), independent of the customer session. VERIFIED (same). Admin can also impersonate any customer user — a pure client-side context swap. VERIFIED (L:src/pages/admin/AdminUsers.tsx:83-86).

Every screen they touch (Lovable origin/main routes)

Route What they see / do Notes
/admin (AdminHome, also /admin/dashboard) Admin landing/overview New in the Aug window VERIFIED L:src/App.tsx
/admin/programs Programme list + create/edit; per-programme producers (ceiling_mt, scans_per_mt), participants, manufacturers, single owner company; reservation panel with per-entry expiry and negative adjustments Old /admin/programmes redirects VERIFIED L:src/App.tsx:215-216; owner registration is delete-then-insert enforcing max one owner VERIFIED L:src/pages/admin/AdminProgrammes.tsx:262-272
/admin/explore-programs CMS for the participant-facing “Explore fibre programs” discovery cards VERIFIED route; content model GAP vs real BE (memory reference_explore_fibre_programs)
/admin/product-categories CU rate cards: HS codes, baseline net weight, default blend %, internal loss multiplier, client scoping VERIFIED L:src/pages/admin/AdminProductCategories.tsx
/admin/companies Company list, quick-create (name+code), company modules toggles (billing, verified_cta, verifications_menu, scanners_menu, program_owner), programme registrations VERIFIED L:src/pages/admin/AdminCompanies.tsx:81,197-199,250-254
/admin/users User list, create (default role “user”), impersonate VERIFIED L:src/pages/admin/AdminUsers.tsx:68,83-86
/admin/signup-requests Approve/reject self-service signups; approve bootstraps companies + company_details + first facility + first admin user + welcome notification in one action VERIFIED L:src/pages/admin/AdminSignupRequests.tsx:63-121
/admin/reservation-requests Pending/approved/rejected tabs; approve inserts the real reservation (throws if CU <= 0), rejection with reason; notifies the requester VERIFIED L:src/pages/admin/AdminReservationRequests.tsx:97-135
/admin/overrides READ-ONLY calibration report: nomination-line and claim-line values diffed against category defaults, CU impact, CSV export. No add-override form exists VERIFIED L:src/pages/admin/AdminOverrides.tsx:48-84,161-175 — contradicts QC A-13 step 1
/admin/scanners Create scanners, assign to facilities VERIFIED route; note the REAL backend has no scanner-delete or facility-assignment endpoints — Lovable admin scanner CRUD is Supabase-only fiction (memory reference_scanner_endpoints_auditor_centric)
/admin/facilities Create/manage facilities across companies VERIFIED route
/admin/licensing Edit per-company license_count; used = non-free active facilities; available = count - used. No cost or period fields VERIFIED L:src/pages/admin/AdminLicensing.tsx — contradicts QC A-12’s “cost, period”
/admin/sdu Register SDU devices (sliver_delivery_units.insert) VERIFIED L:src/pages/admin/AdminSDU.tsx:88
/admin/pigment-ids Manage pigment identities and company/programme assignments VERIFIED route
/admin/verifications, /admin/fibre-production, /admin/evidence-packs Cross-company review lists of sessions, production records, packs VERIFIED routes
/admin/claim-verifications Confirmed-claims list with per-claim link panel: PO-linked and manually-linked verifications, Unlink action (“Obfuscation restored if the global setting is on”). No add-verification UI found in this page VERIFIED L:src/pages/admin/AdminClaimVerifications.tsx — QC A-14 step 1 (“Add a verification”) has no obvious surface here; the add path is the retailer-side claim page
/admin/settings Global toggles including “Obfuscate verification IDs” (default ON) VERIFIED L:src/pages/admin/AdminSettings.tsx:163-175
/admin/notifications, /admin/onboarding, /admin/billing, /admin/banners, /admin/cms(/:key), /admin/guide, /admin/help-pages(/:id), /admin/cron-jobs, /admin/integrations/open-supply-hub Supporting consoles: notification templates, onboarding tasks, billing, admin banners, CMS pages, admin guide, help pages, cron monitor, OS Hub integration VERIFIED routes at L:src/App.tsx

What they can create/read/update/delete

Create: programmes, programme registrations (producer/participant/manufacturer/owner), reservations (including negative releases), product categories, companies, users, facilities, scanners, SDUs, pigment ids, licences (count), banners, CMS/help content. Approve/reject: signup requests, reservation requests. Update: company modules, global settings, licence counts. Unlink: claim verifications. VERIFIED (pages above). Revoke/void claims: an admin-only revoke mutation invalidates a claim’s certificate without releasing CU, and a separate void deletes the claim and frees CU. VERIFIED (L:src/hooks/usePurchaseOrders.ts:936-1008).

Gates on FT Admin itself: reservation-request approval requires CU > 0 — negative capacity entries are only possible on the programme’s reservation panel, never through the request queue. VERIFIED (L:src/pages/admin/AdminReservationRequests.tsx:101 vs AdminProgrammes.tsx:542,588,1463). One owner company per programme (delete-then-insert). VERIFIED (AdminProgrammes.tsx:262-272).

Business rules that bind specifically to them

  • Reservations default to the programme’s default_reservation_term_months (18) when expiry is left blank; every adjustment is its own ledger row. VERIFIED (AdminProgrammes.tsx:110,209,247,553-586; QC:10 states the same).
  • Negative adjustments reuse the latest live expiry so history shows the release. VERIFIED (AdminProgrammes.tsx:588-616).
  • Role is derived from registration tables, not activity (QC A-05 expected result). STATED (QC:46) — consistent with the persona hooks. VERIFIED (L:src/hooks/usePersonaContext.ts:36-41).
  • Obfuscation defaults ON and unmasking happens only via claim linkage. VERIFIED (L:src/hooks/useObfuscateVerificationIds.ts:4).

Dependencies

Everyone depends on FT Admin; FT Admin depends on no other persona. The QC dependency chain is: product categories -> programme -> companies/users -> programme registrations -> reservations + licences -> scanners + SDUs -> everything downstream. VERIFIED (.local/qc-test-script/analysis.md section d). The one inbound dependency: reservation requests and signup requests originate from customers and wait in admin queues.

First-login / empty state

With adminLoginRequired off the console simply opens; there is no admin-specific empty-state design documented. AdminHome is new in the Aug-19 window. VERIFIED route, UNKNOWN empty-state content.

Likely failure modes and confusions

  • Looking for “Add override” on /admin/overrides (QC A-13) — it does not exist; overrides arise from editing blend/qty on nomination lines and are only reported here. VERIFIED.
  • Trying a negative CU entry in the reservation-requests queue (QC A-04) — actively rejected there by design. VERIFIED.
  • Looking for an Insights module toggle (QC A-08) — the module registry has exactly 5 modules, none named Insights. VERIFIED (L:src/pages/admin/AdminCompanies.tsx:81).
  • Expecting licence cost/currency (QC A-12) — the model is count-based with no money fields. VERIFIED.
  • Assuming admin scanner CRUD works against the real backend — it does not; real scanner endpoints are auditor-centric with no delete/facility-assign. VERIFIED (memory reference_scanner_endpoints_auditor_centric).

Implementation state

Lovable: fully working against Supabase (the whole console). Monet: an early stale port of 13 admin pages exists but lags Lovable by 5+ screens (no /admin/programs-as-named, no reservation-requests, signup-requests, overrides, claim-verifications, admin-settings), and nearly all its data tables are no-op stubs. VERIFIED (M:src/App.tsx:167-184; .local/qc-test-script/analysis.md section b). Project policy: the admin console is OUT of monet MVP scope — a Supabase-backed demo/spec backend, never audited for GUI parity. STATED (memory feedback_dashboard_mvp_equals_lovable_gui_no_extend). Real-backend admin surface: only session-authed web routes for programme rosters and reservations exist (Vu’s collection), not /api/monet/v1. VERIFIED (.local/backend-specs/fibre-program/README.md:29-35).