rmnr
DocsTourSlicesBest PracticeAgentsInstall

Command Palette

Search for a command to run...

New

Slice · AI prompt

Platform Admin — Multi-Tenant Control Plane

Multi-tenant SaaS control plane. Workspace lifecycle ops (list/delete/cascade), per-tenant tier presets (gates + quota), KPI dashboard grid. Consumer-domain bits injected via adapter props (tenantTablesAdapter / tierPresets / kpiSources). Contract-only scaffold; canonical implementation lands via /rr-send from superspace. See docs/contract-negotiations-2026-05-15.md §4.

Resource detail View source
Copy this prompt into Claude / Codex / Cursor
platform-admin.prompt.mdmarkdown
# Install `platform-admin` — Platform Admin — Multi-Tenant Control Plane

> Multi-tenant SaaS control plane.

📚 Knowledge base : https://resource.rahmanef.com/llms.txt
📦 Slice detail   : https://resource.rahmanef.com/slices/platform-admin
🧠 JSON catalog   : https://resource.rahmanef.com/api/knowledge?slice=platform-admin
🔗 Source         : https://github.com/rahmanef63/resource-site/tree/main/frontend/slices/platform-admin

## 1. Install

```bash
npx rahman-resources add platform-admin
# alias: npx rr add platform-admin
```

The CLI copies `frontend/slices/platform-admin/` into your project + augments `.env.example` + installs npm deps automatically. Run it from your project root.

## 2. What it ships

- peer slices (cascade install):
  - `convex-auth` — Actor identity for audit + tier-set ops.
  - `audit-log` — padmin_audit table feeds through audit-log TenantAdapter.
  - `dashboard-shell` — Control-plane panels mount inside the dashboard-shell app chrome — no chrome of its own.
- env vars:
  - `PLATFORM_ADMIN_EMAILS` (convex, required) — Comma-separated list of platform admin email addresses.

## 3. Wire it up

Run `npx rr add platform-admin`. Contract-only scaffold. Wait for superspace /rr-send platform-admin before adopting. Distinct from per-instance `admin` slug.

## Rules of engagement

- shadcn-only UI primitives. No raw `<button>` / `<dialog>` / native date or file inputs.
- 200-line hard cap per source file (extract neighbours when over).
- All Convex queries hit an index (`.withIndex(...)`); never bare `.collect()`.
- Public mutations/queries declare `args:` validators + authz.
- Full ruleset: https://resource.rahmanef.com/best-practice

The agent will fetch /llms.txt for the full ruleset and use /api/knowledge for the JSON catalog.