Skip to main content
L0product

Admin Portal

Operator creates and manages customer organisations, reference data, and superadmin access without database intervention. The control surface that unlocks customer 2.

72
Priority Score
Pain × Demand × Edge × Trend × Conversion
Customer Journey

Why should I care?

Five cards that sell the dream

1Why

One org forever blocks customer two.

Can I create a new org without opening the database?

The friction: Every new customer org requires a developer with DB credentials. /org/new returns 404. admin.dreamineering.com returns 403.

The desire: A form at /admin/orgs/new. Submit. Org live in 30 seconds. Customer logs in and sees their dashboard.

The proof: The organisations table exists. The multi-tenancy schema works. The only gap is the control surface.

Picture
A platform operator stares at a terminal showing 404 where /org/new should be. Database client open in another window. Dark room, single monitor glow. Cinematic, 16:9
1 / 5

Same five positions. Different seat.

The customer sees the control surface. The builder sees the security model. The outer game sells operator freedom. The inner game proves isolation holds.

Feature Dev Journey

How does this get built?

Five cards that sell the process

1Job

The job: org lifecycle without SQL.

Can you state the struggling moment in one sentence?

Situation: Platform operator needs to create customer orgs. Currently: /org/new returns 404. All org management requires direct DB access.

Intention: Superadmin creates orgs, manages reference data, and controls access — all from a UI. Zero database access required.

Obstacle: No superadmin role claim. No org creation action. Every server action scopes by organisationId — the bypass must live in one place.

Picture
A terminal cursor blinking on an INSERT INTO organisations statement. Dark room. Cinematic, 16:9
1 / 5

The pitch is the shape. The flow diagrams prove the thinking. The VV stories validate the value.

Problem

Situation

Platform operator needs to create customer orgs, manage global reference data, and grant superadmin access. admin.dreamineering.com deployed but returns 403 (Better Auth invalid origin). /org/new returns 404. All org management requires direct DB access. Resource types only editable via seed function.

Intention

Any user with superadmin role can create orgs, see all orgs, manage resource types, and grant superadmin to others — zero database access required. Admin portal at admin.dreamineering.com fully operational.

Obstacle

No superadmin role claim. No org creation server action. No /admin route with middleware guard. Every server action scopes by organisationId — the admin layer needs a controlled bypass inaccessible to org-level admins. Better Auth trustedOrigins missing admin.dreamineering.com.

Hardest Thing

Superadmin queries span all orgs. That requires removing the organisationId filter that protects multi-tenant isolation. The bypass must live in middleware — not scattered across server actions — so there is exactly one place to audit and one place that can break.

Scorecard

Priority (5P)

3/5
Pain
2/5
Demand
2/5
Edge
3/5
Trend
2/5
Convert

Readiness (5R)

Principles2 / 5
Performance1 / 5
Platform2 / 5
Process1 / 5
Players1 / 5

What Exists

ComponentState
Better Auth authenticationWorking
organisations tableWorking
Multi-tenancy schemaWorking
governance_resource_types tablePartial
Next.js middlewareWorking
Auth custom claimsMissing
/admin routeMissing
Org pickerMissing
admin.dreamineering.comDeployed

Relationships

PRDContributes
Identity & AccessParent — this extends org-level user management to the operator layer.
Agent PlatformPeer — Agent Platform manages agent identities within orgs; Admin Portal manages the orgs themselves.
Sales CRMDownstream — new customer orgs created here are the orgs CRM data lives in.
ETL Data ToolDownstream — ETL pipelines are per-org; org creation here enables per-org data import.
Kill Signal

If customer 2 is ready to sign and onboarding is still manual, pain jumps to 5 and this becomes top priority. If no second customer prospect emerges by 2026-09-18, move to backburner.

Questions

If org creation is operator-initiated, what is the path for a customer who wants to sign up without contacting the operator?

  • Is the org picker the right UX, or should users maintain a default org preference that bypasses the picker on most logins?
  • When a superadmin adds a resource type, should it propagate to all existing orgs automatically, or only appear when an org admin explicitly seeds permissions?
  • What is the recovery path if a superadmin accidentally suspends the Dreamineering org itself?