Business Dash SDK
@businessdash/sdk 0.9.50 is the integration layer between a website you own and
the BusinessDash platform.
It contains three distinct systems:
- Package API client — reads and writes site, store, portal, content, and form data.
- Unified declaration compiler — defines database fields, validation, and form structure from one source tree.
- Framework bindings — renders Live BusinessDash forms, auth, chatbot, analytics, attribution, and other customer-facing surfaces.
0.9.50 is an alpha release. Pin the exact version while integrating and read the migration notes before adopting new schema APIs.
Install
npm install @businessdash/sdk@0.9.90pnpm add @businessdash/sdk@0.9.90yarn add @businessdash/sdk@0.9.90bun add @businessdash/sdk@0.9.90npx jsr add @businessdash/sdk@0.9.90Node 18 or newer is required.
Which client do I need?
High-level site client
import { createBdApiClient } from '@businessdash/sdk'
const client = createBdApiClient({
apiKey: process.env.BD_API_KEY!,
baseUrl: process.env.BD_PACKAGE_API_BASE_URL!,
})
const site = client.site(process.env.BD_SITE_ID!)
Use this client for the broad site-scoped resource surface.
Forms-focused client
import { createBdClient } from '@businessdash/sdk'
const formsClient = createBdClient({
apiKey,
siteId,
baseUrl,
})
This is the high-level form/gallery client used by <BdForm> and
createFormController().
The names are similar, so let the resource you need drive the choice rather than treating them as aliases.
0.9.50 unified declarations
import {
Enums,
bd,
collection,
createFormSchemaOrchestrator,
layoutContainers,
} from '@businessdash/sdk'
collection()defines stored record groups.bd(fieldsis the exact alias) builds typed fields.Enums()creates literal-safe values and human labels.layoutContainersdefines steps, conditions, repeaters, and branches.createFormSchemaOrchestrator()compilesdatabaseSchemaanduiFormTree.
Start with Core Concepts, build through Schema Declarations, then add UI structure with Unified Form Orchestration.
Entrypoints
| Import path | Contents |
|---|---|
@businessdash/sdk | Main clients, contracts, auth, schema builders, orchestration, SEO, and shared utilities |
@businessdash/sdk/contracts | Public contract types |
@businessdash/sdk/enums | Enum utilities |
@businessdash/sdk/collections | collection, createSchema, fields / bd, validation, relation, measurement, and schema types |
@businessdash/sdk/forms | Headless form runtime plus layout, layoutContainers, and orchestration |
@businessdash/sdk/static | Static data helpers including Enums() |
@businessdash/sdk/native | React Native / Expo entry — the data layer with the server-only surface (auth handler, proxy, revalidation) removed. The root export pulls Node's Buffer, which React Native does not provide. |
@businessdash/sdk/react | React components and hooks — the full surface, plus the hosted iframe widgets |
@businessdash/sdk/element | Custom-element form binding — plus the headless storefront, cart, checkout, blog, chat, portal, auth, followers, marketing and verification bindings (parity matrix) |
@businessdash/sdk/vanilla | Vanilla form mount API — plus the headless storefront, cart, checkout, blog, chat, portal, auth, followers, marketing and verification bindings (parity matrix) |
@businessdash/sdk/vue | Vue form binding — plus the headless storefront, cart, checkout, blog, chat, portal, auth, followers, marketing and verification bindings (parity matrix) |
@businessdash/sdk/svelte | Svelte form binding — plus the headless storefront, cart, checkout, blog, chat, portal, auth, followers, marketing and verification bindings (parity matrix) |
@businessdash/sdk/solid | Solid form binding, plus every headless surface and the hosted iframe widgets (versions + parity) |
@businessdash/sdk/qwik | Qwik form binding — plus the headless storefront, cart, checkout, blog, chat, portal, auth, followers, marketing and verification bindings (parity matrix) |
@businessdash/sdk/angular | Angular form binding — plus the headless storefront, cart, checkout, blog, chat, portal, auth, followers, marketing and verification bindings (parity matrix) |
@businessdash/sdk/react-analytics | React analytics component |
@businessdash/sdk/react-attribution | React attribution footer |
@businessdash/sdk/analytics-core | Framework-independent analytics |
@businessdash/sdk/proxy | Customer-portal proxy helpers |
@businessdash/sdk/seo | Typed JSON-LD builders |
@businessdash/sdk/data-model-schema | Direct data-model schema entry |
@businessdash/sdk/marketing-schema | Schema-driven marketing content |
@businessdash/sdk/next/revalidate | Next.js revalidation handler |
@businessdash/sdk/adapters/revalidate | Framework-neutral revalidation adapter |
@businessdash/sdk/store | Headless storefront + cart controller (createStoreController) |
@businessdash/sdk/chat | Headless Front Desk chat controller |
@businessdash/sdk/blog | Headless blog controller — posts, comments, likes |
@businessdash/sdk/checkout | Headless checkout — mint a Stripe session, resolve the real payment status |
@businessdash/sdk/portal | Headless customer portal — the 34-method surface |
@businessdash/sdk/account | Customer session (/me) and followers |
@businessdash/sdk/marketing | Headless marketing pages |
@businessdash/sdk/verify | Email / phone verification state machine |
@businessdash/sdk/social | Social-link rows, icon URLs and layout styles |
@businessdash/sdk/seed | Push a schema and seed data from any build step |
@businessdash/sdk/mcp-adapters | Mount the MCP connector on SvelteKit, Nuxt, Qwik City or Express |
@businessdash/sdk/framework-support | Which framework versions each adapter targets, and the capability matrix |
@businessdash/sdk/bd-forms.css | Default form styles |
layoutContainers is exported by the root and /forms entrypoints. It is
not exported by /collections.
Feature map
Marketing and content
- schema-driven page bundles and locale-aware sections,
- legacy marketing pages,
- static data collections and rows,
- typed JSON-LD builders,
- programmatic parallel pages,
- social profiles and business details.
Storefront and billing
- products, variants, add-ons, and related products,
- cart, checkout, and checkout result,
- Stripe Connect and Link,
- coupons and promotion validation,
- shipping rates and tracking,
- subscriptions and billing lifecycle states.
Blog and reviews
- posts, categories, tags, comments, reactions, and paywalls,
- Mux-backed video,
- paginated public reviews.
Customer experience
- tenant auth and session management,
- customer portal jobs, quotes, invoices, contracts, comments, and activity,
- notification preferences and channel verification,
- followers/subscribers,
- scheduling,
- gallery media.
Chatbot and forms
- hosted and inline chatbot bindings plus the headless hook,
- Live form schema/read/submit/upload APIs,
<BdForm>and native framework bindings,createFormController()runtime state,- 0.9.50 data/validation/layout orchestration.
Operations
- analytics writes and page-view reads,
- attribution policy and footer,
- cache revalidation,
- dashboard embeds,
- email templates,
- custom database reads and schema sync.
Configuration
BD_API_KEY=sk_...
BD_SITE_ID=...
BD_PACKAGE_API_BASE_URL=https://businessdash.us/api/package/v1
Browser integrations use a publishable pk_… token and a public site id.
Server integrations use the secret API key. Never prefix a secret key with
NEXT_PUBLIC_, PUBLIC_, or an equivalent framework-exposure prefix.
Use the apex https://businessdash.us host. Cross-origin redirects can strip the
authorization header or break a browser preflight.
CLI
The package installs the bd binary. Run it through your package runner:
npx bd --help
Main flows:
# Marketing schema/content
npx bd print-schema
npx bd sync-schema --dry-run
npx bd sync-content --dry-run
# Custom database
npx bd print-data-model
npx bd view-data-model --diff
npx bd sync-data-model --dry-run
npx bd sync-records --dry-run
See Collections and CLI Changes.
Current 0.9.50 boundaries
The following names appear in design proposals but are not current exports:
parseFields()bd.integer()createSingleResourceForm()
Use field builders directly, use idType: 'integer' for an integer primary
key, and build resource-action views in the consuming application.
For exact release changes, see the Changelog.