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:

  1. Package API client — reads and writes site, store, portal, content, and form data.
  2. Unified declaration compiler — defines database fields, validation, and form structure from one source tree.
  3. 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.90
pnpm add @businessdash/sdk@0.9.90
yarn add @businessdash/sdk@0.9.90
bun add @businessdash/sdk@0.9.90
npx jsr add @businessdash/sdk@0.9.90

Node 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 (fields is the exact alias) builds typed fields.
  • Enums() creates literal-safe values and human labels.
  • layoutContainers defines steps, conditions, repeaters, and branches.
  • createFormSchemaOrchestrator() compiles databaseSchema and uiFormTree.

Start with Core Concepts, build through Schema Declarations, then add UI structure with Unified Form Orchestration.

Entrypoints

Import pathContents
@businessdash/sdkMain clients, contracts, auth, schema builders, orchestration, SEO, and shared utilities
@businessdash/sdk/contractsPublic contract types
@businessdash/sdk/enumsEnum utilities
@businessdash/sdk/collectionscollection, createSchema, fields / bd, validation, relation, measurement, and schema types
@businessdash/sdk/formsHeadless form runtime plus layout, layoutContainers, and orchestration
@businessdash/sdk/staticStatic data helpers including Enums()
@businessdash/sdk/nativeReact 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/reactReact components and hooks — the full surface, plus the hosted iframe widgets
@businessdash/sdk/elementCustom-element form binding — plus the headless storefront, cart, checkout, blog, chat, portal, auth, followers, marketing and verification bindings (parity matrix)
@businessdash/sdk/vanillaVanilla form mount API — plus the headless storefront, cart, checkout, blog, chat, portal, auth, followers, marketing and verification bindings (parity matrix)
@businessdash/sdk/vueVue form binding — plus the headless storefront, cart, checkout, blog, chat, portal, auth, followers, marketing and verification bindings (parity matrix)
@businessdash/sdk/svelteSvelte form binding — plus the headless storefront, cart, checkout, blog, chat, portal, auth, followers, marketing and verification bindings (parity matrix)
@businessdash/sdk/solidSolid form binding, plus every headless surface and the hosted iframe widgets (versions + parity)
@businessdash/sdk/qwikQwik form binding — plus the headless storefront, cart, checkout, blog, chat, portal, auth, followers, marketing and verification bindings (parity matrix)
@businessdash/sdk/angularAngular form binding — plus the headless storefront, cart, checkout, blog, chat, portal, auth, followers, marketing and verification bindings (parity matrix)
@businessdash/sdk/react-analyticsReact analytics component
@businessdash/sdk/react-attributionReact attribution footer
@businessdash/sdk/analytics-coreFramework-independent analytics
@businessdash/sdk/proxyCustomer-portal proxy helpers
@businessdash/sdk/seoTyped JSON-LD builders
@businessdash/sdk/data-model-schemaDirect data-model schema entry
@businessdash/sdk/marketing-schemaSchema-driven marketing content
@businessdash/sdk/next/revalidateNext.js revalidation handler
@businessdash/sdk/adapters/revalidateFramework-neutral revalidation adapter
@businessdash/sdk/storeHeadless storefront + cart controller (createStoreController)
@businessdash/sdk/chatHeadless Front Desk chat controller
@businessdash/sdk/blogHeadless blog controller — posts, comments, likes
@businessdash/sdk/checkoutHeadless checkout — mint a Stripe session, resolve the real payment status
@businessdash/sdk/portalHeadless customer portal — the 34-method surface
@businessdash/sdk/accountCustomer session (/me) and followers
@businessdash/sdk/marketingHeadless marketing pages
@businessdash/sdk/verifyEmail / phone verification state machine
@businessdash/sdk/socialSocial-link rows, icon URLs and layout styles
@businessdash/sdk/seedPush a schema and seed data from any build step
@businessdash/sdk/mcp-adaptersMount the MCP connector on SvelteKit, Nuxt, Qwik City or Express
@businessdash/sdk/framework-supportWhich framework versions each adapter targets, and the capability matrix
@businessdash/sdk/bd-forms.cssDefault 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.