Skip to main content
Source snapshot: 13 October 2026. These pages describe the current implementation, including unfinished controls. See coverage and review notes.

Tenant command center

Host: control.<ROOT_DOMAIN> · Route: /tenants/[tenantId]

Purpose and access

Inspect and administer one tenant’s identity, features, operations, subscription, invoices, payments, and audit history.You need an account session and platform access. Platform privileges are separate from tenant roles; privileged writes remain subject to endpoint role checks.

Screen layout

TenantCommandCenter provides tabbed sections for Mahalle Profile, Masjid/religious leadership, jurisdiction, office bearers, module overrides, subscription, invoices, payments, and audit. It also opens public/admin sites and tenant operations views.

Fields and displayed information

Displayed table columns: Overview & Profile, Mahall Admin Operations, Feature Flags, Plans & Billing, Audit Stream.

Fields and filters: Tenant status actions

Fields and filters: Edit tenant dialog

Displayed table columns: Feature, Effective, Override.

Fields and filters: Tenant features editor

Fields and filters: Tenant subscription editor

Displayed table columns: Amount, Description, Status, Issued, Due.

Fields and filters: Create invoice dialog

Displayed table columns: Amount, Method, Reference, Recorded.

Fields and filters: Record payment dialog

Displayed table columns: Full Name, Phone Number, Associated Family, Family Name, Address, Primary Phone, Event Title, Location, Starts At, Title, Status / Published, Program Name, Description, Admin Full Name, Email Address, Assigned Role.

Actions

Linked navigation

Interaction sequence

Select a tenant → choose a tab → Edit profile or change a feature override → save and refresh. Use billing tools to assign plans, issue invoices, or record payments. Suspend/reactivate toggles tenant status; permanent delete requires the confirmation slug.

States and rules

Feature overrides offer Inherit, Force on, Force off. Missing tenants use notFound. Opening the admin site does not itself create a support session or impersonate a tenant administrator; backend permission rules still apply.Explicit validation messages in the rendered forms:
  • Mahalle name cannot be empty
The rendered action controls bind loading indicators to pending state. Failed API saves keep their documented error/notification path; a loading indicator alone does not establish persistence.

Implementation references

Paths below are relative to the application repository. This is source-reviewed behavior, not a recorded browser test.
  • apps/web/src/app/sites/control/(app)/tenants/[tenantId]/page.tsx
  • apps/web/src/features/platform/tenant-command-center.tsx
  • apps/web/src/features/platform/tenant-status-actions.tsx
  • apps/web/src/features/platform/edit-tenant-dialog.tsx
  • apps/web/src/features/platform/tenant-features-editor.tsx
  • apps/web/src/features/platform/tenant-subscription-editor.tsx
  • apps/web/src/features/platform/invoices-panel.tsx
  • apps/web/src/features/platform/create-invoice-dialog.tsx
  • apps/web/src/features/platform/payments-panel.tsx
  • apps/web/src/features/platform/record-payment-dialog.tsx
  • apps/web/src/features/platform/tenant-operations-viewer.tsx
Data and access helpers: apps/web/src/lib/session.ts, apps/web/src/lib/server-api.ts, apps/web/src/lib/platform.ts, apps/web/src/lib/features.ts, apps/web/src/lib/billing.ts, apps/web/src/lib/api-client.ts

API behavior references

  • apps/api/src/platform/platform-tenant-access.controller.ts
  • apps/api/src/platform/platform.controller.ts
  • apps/api/src/billing/plans.controller.ts
  • apps/api/src/billing/tenant-billing.controller.ts
  • apps/api/src/features/features.controller.ts
  • apps/api/src/features/tenant-features.controller.ts
  • apps/api/src/forms/forms.controller.ts
  • apps/api/src/analytics/analytics.controller.ts
  • apps/api/src/analytics/tenant-analytics.controller.ts