Application kit
++ Console Kit for Next.js +
++ {DESCRIPTION} Pass the secret-free tenant descriptor returned by + provisioning; the first-party wrapper handles standalone auth, + capability discovery, endpoint-scoped requests, and pack adapters. +
++ Product states +
++ Console Kit is a tenant-user console. Switch presets and signed-out, + discovering, partial, ready, incompatible, and unavailable states + without a live fixture. Missing public routes are expected degraded + states, not silent backend failures. +
++ Choose an install surface +
++ One matrix covers the umbrella, core, Console modules, standalone + packs, and official presets. Installed code never grants authority; + each surface only becomes interactive when public evidence supports it. +
++ Install the full console +
++ One registry item installs the Console Kit, all seven feature + modules, the runtime and catalog contracts, the single modular + Zustand store, and the shadcn Base UI app shell dependency graph. +
++ Install an official preset +
++ Each preset registry item installs the core and the exact feature + modules mapped to its Constructive DB preset. Runtime navigation + still follows the contracts discovered from the active tenant, + so installed code never grants a capability by itself. +
++ {preset.title} +
++ {preset.modules} +
++ Compose feature modules independently +
++ Install the leaf-independent core and only the Console Kit modules + your product needs. Every console module installs its standalone, + provider-neutral feature-pack view transitively, then adds + discovery, navigation, its Constructive adapter when available, + and any pack-owned store slice. Install a feature-pack item alone + when the host supplies the view props without Console Kit. +
++ Start from the tenant endpoint contract +
++ The host supplies a database ID and its routable public GraphQL + endpoints; Console Kit does not need a preset name or a + control-plane receipt at runtime. Keep credentials on the user + side of the sign-in form, because the secret-free descriptor is + safe to pass from a server component to the client. A host-owned + session must carry the same database ID, which prevents identity + state from crossing between tenants. +
++ {boundary.title} +
++ {boundary.body} +
++ Use the lower-level Console Kit endpoint resolver for embedded or + non-Constructive providers. Endpoint fallback stays opt-in, so an + admin operation cannot silently cross onto the data endpoint. +
++ Bootstrap CSRF for hardened auth +
+
+ When a tenant enables{' '}
+
+ require_csrf_for_auth
+
+ , pass an async token provider. Its host endpoint creates a
+ short-lived anonymous session with a cryptographically random
+ secret through a trusted backend connection and returns that
+ secret once; Console Kit sends it only as the auth mutation's{' '}
+
+ csrfToken
+
+ . Constructive consumes the anonymous session after successful
+ authentication, so the provider must mint a fresh token for each
+ attempt and must never cache it in browser storage.
+
+ Complete email verification without exposing the token +
+
+ Unverified signed-in accounts can send a fresh verification
+ email from Account security. Your verification route reads the{' '}
+
+ email_id
+ {' '}
+ and{' '}
+
+ verification_token
+ {' '}
+ values from a URL fragment. When{' '}
+
+ callback
+ {' '}
+ is omitted, Console Kit captures those credentials into its closure-owned
+ vault, scrubs the fragment, and then the auth adapter calls{' '}
+
+ verifyEmail
+ {' '}
+ using the freshly delivered credential, including from a fresh signed-out
+ browser. After sign-in, Console Kit reloads the account so the
+ verified state is authoritative. Treat the token as a credential:
+ route these values through the URL's{' '}
+
+ #
+ {' '}
+ fragment so they stay out of the HTTP request. Pass{' '}
+
+ callback={'{false}'}
+ {' '}
+ only when the host owns the complete callback lifecycle.
+
+ One store, modular slices +
++ Each Console Kit instance creates one Zustand vanilla store and + composes the core navigation, tenant, session, endpoint, + discovery, runtime, and adapter slices with slices contributed by + installed feature modules. The store is scoped to the mounted + console, so server renders and multiple consoles cannot leak + identity or navigation state across instances. If the host owns + the store, it must compose the same module slices; Console Kit + verifies that composition and resets its scoped state when the + tenant or identity changes. +
++ Metadata is a compatibility gate +
+
+ The runtime checks every configured, reachable endpoint with
+ standard GraphQL introspection and Constructive's versioned{' '}
+
+ _meta
+ {' '}
+ contract. This release accepts contract version{' '}
+
+ 2026-07
+ {' '}
+ only; each feature module selects its evidence from the endpoint
+ map, and incompatible metadata stops that feature instead of
+ guessing at tables, relations, or mutation shapes.
+
-
+ {[
+ {
+ title: 'Preflight',
+ body: 'Resolve each explicit semantic endpoint and read a fresh token from the active database-scoped session.'
+ },
+ {
+ title: 'Discover',
+ body: 'Load _meta plus GraphQL root operations, types, and input objects independently for every reachable endpoint.'
+ },
+ {
+ title: 'Expose',
+ body: 'Show a module only when its schema contract is exposed, then let PostgreSQL privileges and RLS decide each operation.'
+ }
+ ].map((step, index) => (
+
-
+
+ {String(index + 1).padStart(2, '0')}
+
+
+ {step.title} +
++ {step.body} +
+
+ ))}
+
+ Prove compatibility against native tenants +
+
+ Start the untouched Constructive DB services with{' '}
+
+ fun up
+
+ , then let the Blocks fixture call the native provisioning
+ procedure for the three official presets and one supported
+ storage-routed tenant. The generated secret-free manifest feeds
+ the integration route, while the live suite exercises auth,
+ identity-scoped CRUD, cross-tenant rejection, capability
+ discovery, and RLS through public GraphQL endpoints. Cleanup uses
+ only the exact tenant database IDs recorded by that run.
+
+ Route-neutral app shell +
++ Console Kit composes the Constructive App Shell, App Bar, and the + shadcn Base UI Sidebar. The shell renders typed navigation, + breadcrumbs, brand, account actions, search, and action slots, but + links remain plain anchors until your host supplies a Next.js or + other framework renderer. +
+
+ Omit a controlled route to let Console Kit own navigation, optionally
+ starting from defaultRoute.
+ For URL-owned navigation, parse the current URL into a typed semantic
+ route and provide the route, href encoder, change callback, and link renderer together.
+
+ Compose only what you need +
++ Use the shell directly for a custom application, install a + focused pack for one workflow, or start with Console Kit when + you want the complete discovery and navigation layer. +
+ + Browse feature packs + +