Skip to Content
Getting StartedCore Concepts

Core Concepts

Before diving into the API, it helps to understand the backend that the Studio runs on, and the four core building blocks of the platform.

Backends

The Studio runs on one of two backends:

  • Buildpad Engine: a standalone API server. It holds the database, the users, the sign-in and the files. The browser that shows the Studio, and your application, call the Engine directly.
  • Supabase: the Studio’s own API routes, over a Supabase project (PostgreSQL, Supabase Auth and Supabase Storage).

How the Studio picks its backend

The Studio reads the backend from its environment when its server starts:

SettingBackend
DAAS_BACKEND=go, with DAAS_GO_URL set to the Engine’s originBuildpad Engine. This is also called Go mode
DAAS_BACKEND not set, or any other valueSupabase

A change needs a restart of the Studio, not a new build. To see which backend a running Studio uses, send GET /api/server/health to the Studio. The answer holds backend.mode: go for the Buildpad Engine, supabase for Supabase. These docs use the same answer to show the backend of the Studio that serves them. See Run the Studio on the Buildpad Engine for the setup.

What differs

The API paths, the response format, the filter syntax and the access model (permissions, policies, roles) are the same on the two backends. These features differ:

FeatureBuildpad EngineSupabase
Where the API isAt the Engine’s URL. The Studio URL serves only the StudioAt the Studio’s URL
Sign-inThe Engine’s /api/auth/login, and a Supabase-compatible /auth/v1/token. Sign-in with an XAppHub ID token is available when the operator configures itSupabase Auth, through /api/auth/login
SessionsBearer tokens only. The Engine sets no cookieBearer tokens or session cookies
Access rulesThe Engine applies roles and permissions before each request. There is no PostgreSQL row-level security (RLS) to writeRoles and permissions in the API, and RLS policies in PostgreSQL
TenantsEach first-level scope is a tenant with its own data model, users and files. Each session belongs to one tenant. The platform operator works in the host. See Host and TenantsEvery scope, first level included, is a row filter in one set of tables
Static tokensA credential for the MCP endpoint. A token written as a data token, for an account that is not an administrator, also works on the item routesA credential on every route
FilesKept on the Engine’s disk or in a private Amazon S3 bucket. Served at /api/files/assets/:id, with image transformsKept in Supabase Storage. Served at /api/assets/:id
Hooks, cron jobs and custom servicesStored in the database and run by the Engine. File-based extensions and /api/ext/* endpoints are not availableStored in the database, plus file-based extensions with custom endpoints
Deleting a userThe account is kept with the status deleted, and an administrator can restore itThe account is removed
API ExplorerShows the Engine’s OpenAPI documentShows the Studio’s OpenAPI document

A change of backend does not move your data. To move a project from Supabase to the Buildpad Engine, see Move to the Buildpad Engine.

Collections

A collection is a database table (or view). Every collection has a name, a primary key, and zero or more fields.

daas_users ← system collection (managed by the platform) daas_roles ← system collection posts ← custom collection you create products ← custom collection you create

You interact with any collection’s data through the Items API:

GET /api/items/posts → list posts POST /api/items/posts → create a post GET /api/items/posts/:id → get one post PATCH /api/items/posts/:id → update a post DELETE /api/items/posts/:id → delete a post

Fields

A field maps to a database column. Each field has a name, a data type, and optional metadata (interface type, display options, validation rules).

Field typePostgreSQL type
stringtext / varchar
integerint4
bigIntegerint8
floatfloat8
booleanbool
jsonjsonb
dateTimetimestamptz
uuiduuid

Additional types such as text, decimal, date, time, csv, hash, and binary are also supported.

Relational patterns — M2O (many-to-one), O2M (one-to-many), and M2M (many-to-many) — are local types that describe how a field relates to other collections. At the storage level, they use uuid columns with foreign key constraints.

Fields also carry interface metadata that drives the Data Studio’s form renderer (e.g., show a <input>, a rich-text editor, a file picker, etc.).

Items

An item is a single row in a collection. The platform treats every table the same way — system tables and user-defined tables share the same CRUD API surface.

Items support:

  • Filtering — ?filter[status][_eq]=active
  • Field selection — ?fields=id,title,author
  • Sorting — ?sort=-created_at
  • Pagination — ?limit=20&page=2
  • Relational data — ?fields=*,author.* (deep reads)
  • Aggregates — ?aggregate[count]=*

See Filter Rules for the complete filter syntax.

Access Control Model

Access control is built on four layers that compose from the most granular to the broadest:

Permissions

A permission is the most granular unit of access control. It is always scoped to a collection and an action (create, read, update, delete, share), and can further restrict:

  • Item filter — which rows the rule applies to, using the same filter syntax as the API (e.g., only rows where user_created = $CURRENT_USER)
  • Field access — which columns are readable or writable for that action
  • Field validation — value constraints that must pass before a write is accepted
  • Field presets — default values automatically injected on create or update

A permission can grant all access, no access, or custom access for its collection/action pair.

Collection: posts Action: read Item filter: { "status": { "_eq": "published" } } Fields: id, title, slug, published_at

Policies

A policy is a named bundle of permissions that can be assigned to any number of roles or users. Instead of configuring permissions per-role, you define them once in a policy and reuse that policy wherever it applies.

Each policy also carries three top-level flags:

  • Admin access — bypasses all permission checks entirely
  • App access — allows the user to log in to the DaaS Studio
  • Delegate access — allows a service account to act on behalf of another user via the X-On-Behalf-Of request header

Policies can additionally grant module access keys — named app capabilities (e.g. system:logs to view the Logs page) configured on the policy’s Module-Level Access tab. A user’s module access is the OR-merge of the keys across all their policies. See Roles & Policies.

When a user has multiple policies (through multiple roles, or ones attached directly), their effective access is the additive union of all applicable policies:

  • Field access is merged — if Policy A exposes title and Policy B exposes body, the user sees both.
  • Item filters are combined with OR — a user matching either policy’s row condition can access those rows.

Policies only expand access — they can never revoke access granted by another policy. Design each policy around the minimum access it needs, then layer policies up to build more permissive roles.

Roles

A role is an organisational group (e.g., viewer, editor, moderator). Roles hold one or more policies and can be assigned to any number of users. Users can belong to multiple roles simultaneously — their effective permissions are the union of all policies across all their roles.

Two roles are seeded by default:

RoleLinked policyBehaviour
AdministratorAdmin Policy (admin_access = true)Full system access — bypasses all permission checks.
UserUser Policy (admin_access = false)Standard user access — subject to all permission rules.

You can create additional roles and attach any combination of policies to them.

Public access applies to every authenticated user regardless of role. It is represented by policy entries in daas_access with no role and no user set. Any policy linked this way grants its permissions to all logged-in users as a default layer. Unauthenticated access is not supported — every data API route requires authentication. On the Buildpad Engine, the one exception is a file: a request with no session can read a file that the public policy grants, from the tenant that its X-Tenant-Id header names. All access is off by default — opt-in only.