Browse documentation

Root package.json declares workspaces: ["apps/*", "packages/*"]. Turborepo (turbo.json) drives build, test and lint across them.

The workspaces

PathPackagePublishedPurpose
apps/server@motherbase/servernoProject API and Platform Console
apps/studiostudionoNext.js 15 + React 19 admin app
packages/client@motherbase/clientyes (npm)Supabase-compatible SDK
packages/ssr@motherbase/ssryes (npm)Cookie-based SSR helpers for the SDK
packages/ui@motherbase/uiyes (npm)Configurable React auth, account and upload components
packages/create-appcreate-motherbase-appyes (npm)Next.js and React app scaffolder
packages/cli@motherbase/cliyes (npm)Operator CLI (motherbase)
packages/ai@motherbase/ainoProvider-agnostic agent loop
packages/contracts@motherbase/contractsnoShared route paths and types

Dependency direction

apps/studio ───────────────┐
                           ▼
apps/server ──▶ @motherbase/ai
      │
      └──────▶ @motherbase/contracts ◀── @motherbase/client ◀── @motherbase/ssr

@motherbase/contracts is the only package both the server and the SDK depend on. It holds the route paths and payload shapes that must not drift between them — change a path there and both sides move together.

Commands

npm run install:all      # npm ci --legacy-peer-deps
npm run build            # turbo run build
npm run test             # turbo run test
npm run lint             # turbo run lint
 
npm run dev              # project API
npm run console:dev      # Platform Console
npm run studio:dev       # Studio against a live API
npm run studio:mock      # Studio against mocks
npm run sdk:build        # build @motherbase/client only
npm run cli -- <args>    # run the CLI from source

Node >=22.12.0 is enforced by a preinstall hook (scripts/check-node-version.cjs), matching .nvmrc / .node-version.

Module format

@motherbase/client, @motherbase/ssr and @motherbase/ai are TypeScript compiled to dist/, with main → dist/index.js and types → dist/index.d.ts. Internal imports carry the .js extension (./http.js) because the output is consumed as real ES modules.

Publishing

The SDK release process is documented in docs/publishing-the-sdk.md in the backend repo.

Per-package pages

For SDK usage (as opposed to internals) see the SDK reference; for CLI usage, the CLI docs.