Mr.HR Control Plane
Super-admin platform for managing the entire Mr.HR tenant fleet. Tenant lifecycle, health monitoring, fleet-wide migrations, billing, and subscription management. Runs as a separate NestJS instance with its own auth layer, isolated from tenant databases.
Tenant lifecycle: create, suspend, decommission, and reactivate tenants
Per-tenant health monitoring: database size, active connections, pool status, migration version, error rates
Stray resource detection: identifies orphaned databases, unused storage buckets, and dangling S3 objects across the fleet
Per-tenant PostgreSQL database provisioning and lifecycle management
Per-tenant S3-compatible storage with full S3 API capability: bucket creation, lifecycle policies, presigned URLs, and multipart uploads
Fleet-wide schema migrations with canary rollout (test on one tenant, then deploy to all)
Billing and subscription management with ABA Payway and KHQR: plan tiers, usage limits, invoice generation, payment tracking
Aggregated usage metrics: total employees, active tenants, payroll volume, attendance logs per day, DB and storage usage per tenant
Super-admin auth with IP allowlisting and per-action audit logging
Read-only tenant data access through a strict query allowlist, no direct write access to tenant databases
Tenant provisioning automation: database creation, storage bucket setup, initial migrations, default roles, Redis pool entry
Alerting system for tenant health anomalies: connection spikes, migration failures, error rate thresholds, storage quota breaches
Tenant configuration management: feature flags, module toggles, custom limits per tenant