Mengseang.
← Software/mrhr-control-plane
Platform / Infrastructure2025

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.

CONTROL PLANE · FLEET-OPSFLEET TOPOLOGYT-01T-02T-03T-04T-05T-06T-07CPTENANT HEALTHOKOKOKOKALERTDBS3FLEET MIGRATION v3.2.0canary ✓rolling5/10STRAY RESOURCES2 orphan DB1 stale bucketBILLING · ABA + KHQR8 paid2 trial1 overdue
Tech Stack
NestJSNext.jsPostgreSQLRedisDockerABA PaywayKHQR
Metrics
PlatformWeb
Tenants10+ managed
AuthSuper-admin + IP
BillingABA Payway + KHQR
MigrationsFleet-wide
StatusProduction
Links
Tags
Control PlaneSaaS OpsMulti-tenantBillingMonitoring
Skills & Tools
NestJSNext.jsPostgreSQLRedisDockerABA PaywayKHQRMulti-tenant OpsMigration ManagementHealth MonitoringAudit Logging
Key Features
01

Tenant lifecycle: create, suspend, decommission, and reactivate tenants

02

Per-tenant health monitoring: database size, active connections, pool status, migration version, error rates

03

Stray resource detection: identifies orphaned databases, unused storage buckets, and dangling S3 objects across the fleet

04

Per-tenant PostgreSQL database provisioning and lifecycle management

05

Per-tenant S3-compatible storage with full S3 API capability: bucket creation, lifecycle policies, presigned URLs, and multipart uploads

06

Fleet-wide schema migrations with canary rollout (test on one tenant, then deploy to all)

07

Billing and subscription management with ABA Payway and KHQR: plan tiers, usage limits, invoice generation, payment tracking

08

Aggregated usage metrics: total employees, active tenants, payroll volume, attendance logs per day, DB and storage usage per tenant

Also Included

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