Provisioning a platform
From superadmin creation to a working dashboard: grants, keys, schemas, seeds.
Updated
On this page
The steps
- Create the platform — superadmin only; there is no self-serve path, by design. Name, slug, description. New platforms start in test mode.
- Grant modules — toggle the catalog for this platform. Dependencies apply (forms needs records; websites and invoices need customers). Unknown keys can't be stored.
- Issue keys — a secret key for the platform front end's server, a public key (with origins) if the browser needs direct reads. Values shown once; put them in the front end's env (
DASH_PLATFORM_KEY, neverNEXT_PUBLIC_*for the secret). - Declare record types — the platform's schema: its entities, fields, flags. This is where the vertical becomes real.
- Stand up the front end — the dashboard/portal app on the platform SDK; nav and routes derived from
whoami().platform.modules.
Seeds make it repeatable
Provisioning that lives in a runbook decays; provisioning that lives in seed scripts survives. The working pattern: idempotent per-concern scripts (record types, app settings, categories, demo content) that update_or_create by key, so re-running refreshes rather than duplicates — the same discipline these docs are published with.
Provisioning a client site (agency-style platforms)
- Create the customer; send the portal invite when they should have access.
- Create the project, then its website record (1 project = 1 website).
- Issue the site's
dfd-site-*keys from the site's panel. - Scaffold the site from the platform's reference site on the paired site SDK.
- Deploy through the managed flow — keys are injected into the app's env automatically.