Koovira Dev Docs
26-admin/overview.md

Admin / Back-Office (padmin)

Status: ๐ŸŸข Production ยท Last validated: 2026-09-06

The super-admin back office lives under padmin/ (276 top-level pages, confirmed by file count 2026-09-06). Self-contained on classs/admin/. Nav = padmin/includes/nav_registry.php.

Correction (2026-09-06): the "symlink to padminnew" claim does not hold in this checkout โ€” padmin/ is a real directory with its own 276 top-level .php files, while padminnew/ has only 1 top-level page and 9 total (not a mirror). Whether production actually serves /padmin via a symlink to padminnew could not be confirmed from this local repo โ€” Requires Verification against the live server; do not assume the two trees are kept in sync.


Boot & structure

  • padmin/includes/boot.php / padmin/includes/auth_shell.php โ€” admin session + authz shell

(separate from customer auth; admin sessions are the actor_type='padmin' rows in kv_auth_sessions). Corrected 2026-09-06: previously cited as padmin/boot.php / padmin/auth_shell.php (wrong path โ€” both files live under padmin/includes/).

  • padmin/includes/ โ€” shared kit: nav_registry.php, command_palette.php + page_catalog_data.php

(search index), dashboard_kit.php, breadcrumb.php, authz_ext.php, compliance_logs_lib.php, audit_panel.php, import_lib.php.

Workflow areas (validated presence)

AreaPages / codeNotes
User managementpadmin/ user screens; classs/AdminUserManagerModule.phpcustomer/merchant/staff admin
Merchant & module managementmodule toggles โ†’ kv_module_control; padmin/developer_api.phpthe control plane
KYC / claimsclaim review; ClaimKycModule::setClaimStatusapprove/reject/appeal
Membershipplans/prices (kv_membership_plans, kv_membership_plan_prices)
Orders / payments / walletorder + wallet admincentral, cross-module
Refunds / disputesrefund + kv_order_disputes (25, 2026-09-06 โ€” was 26)
Settlementscommerce_settlement_lines/commerce_settlement_settings, kv_settlement_master (corrected 2026-09-06 โ€” commerce_settlements is not a real table) + padmin settlement screensmoney
Accountingpadmin/accounting_*.php (6 screens) + AccountingEngine โ†’ accounting_journal (2,422, 2026-09-06 โ€” was 2,249)hidden from nav โ€” reachable only via command palette; the pagegroup references a nav group that doesn't exist
Reports / analyticsdashboards; analytics_* tables
Moderationmoderation_worker + review screens; post_media_moderation (791)
Marketing / launchMarketing โ†’ "Launch Plan" (kv_marketing_tasks)live
Security controlspadmin/security_controls.php + SecurityControls::enabled() (classs/admin/SecurityControls.php:318)74-control switchboard (corrected 2026-09-06 โ€” was cited as 72; live count via SecurityControls::catalog(), 15 groups)
DB management / migrationspadmin-gated migration system (the ONLY DDL path)KVGuardedPDO blocks web/cron DDL
Configadmin_global_settings (40 rows, JSON per key โ€” e.g. ecommerce.allow_cod)

Key admin-owned tables

admin_global_settings (40), kv_module_control (22), platform_commission_settings (11), accounting_journal (2,422, 2026-09-06 โ€” was 2,249), kv_order_disputes (25, 2026-09-06 โ€” was 26), kv_marketing_tasks.

Business rules

  • BR-ADM-001 โ€” schema changes go only through the padmin migration system (never app/cron/deploy).
  • BR-ADM-002 โ€” module go-live is a kv_module_control flag change (audited: changed_by/reason).
  • BR-ADM-003 โ€” commission %/config is admin-owned (platform_commission_settings, admin_global_settings).

Errors (prefix ADM-E)

  • ADM-E001 accounting screens unreachable โ€” hidden from nav_registry.php; reach via command palette.
  • ADM-E002 a DDL statement silently no-ops from a script โ€” KVGuardedPDO blocked it; use a migration.

Change-impact

Admin toggles change platform-wide behaviour instantly (a module flag, a commission %, a config key). Re-test the affected consumer/merchant surface after any kv_module_control / admin_global_settings change; every such change is audited.

To expand

Per-workflow pages (user mgmt, KYC review, settlement run, refund flow) โ€” start with the money ones (settlement, refunds/disputes) and the module control plane.