Organizations
Create and configure organizations — first-class User records (type=2) in the unified user model.
Provision the backend
Status: Preview — some backend operations for this flow are not yet available end-to-end. The blocks install and render, but parts of the flow cannot complete yet. Provision the b2b preset onto your database — it installs the database modules this flow needs (listed under Backend below).
# Orgs require the full B2B stack (org-scoped memberships/permissions/invites/hierarchy).
# There is no preset smaller than b2b for org flows — see Backend below.
pgpm installInstall the blocks
Requires the one-time host setup — the @constructive registry namespace mapped in your components.json.
npx shadcn@latest add @constructive/org-create-card @constructive/org-settings-formWire them up
Mount the runtime once at the app root so every block resolves its hook.
import { StepUpProvider } from '@/blocks/auth/use-step-up/step-up-provider';
// org-settings-form gates danger-zone deletion behind a step-up.
<StepUpProvider>{children}</StepUpProvider>Usage
A representative usage of this flow.
import { OrgCreateCard } from '@/blocks/org/create-card/create-card';
// Creates a users row with type=2 (an organization).
<OrgCreateCard onSuccess={(org) => router.push(`/orgs/${org.id}`)} />Built with org-create-card, org-settings-form.
Backend
Provision the b2b preset — it installs these database modules (scoped modules shown as name:scope):
users_modulemembership_types_modulememberships_module:appmemberships_module:orgsessions_moduleuser_state_moduleuser_credentials_moduleconfig_secrets_moduleemails_modulerls_moduleuser_auth_modulesession_secrets_modulerate_limits_moduleconnected_accounts_moduleidentity_providers_modulewebauthn_credentials_modulewebauthn_auth_modulephone_numbers_modulepermissions_module:apppermissions_module:orglimits_module:applimits_module:orglevels_module:applevels_module:orgprofiles_module:appprofiles_module:orghierarchy_module:orginvites_module:appinvites_module:orgdevices_module
GraphQL operations this flow makes live: createUser, updateUser, currentUser