Skip to main content
Bludia has a small set of building blocks. Once you know them, the rest of the docs read quickly.

The building blocks at a glance

How the pieces fit together

A project is the boundary around one application. Collections, records, keys, guards, functions, and settings never leak between projects. Team members are invited per project. See Projects.
A collection defines a type of data, like customers or bookings. Each collection has a slug used in API URLs: /collections/customers/records.Fields define the shape of each record: type (text, number, date, select, relation, file…), whether it’s required or unique, and validation rules.Records are the stored items. Every record has system fields: id, slug, created_at, updated_at, published_at. In API responses, field values appear as top-level keys named after the field.
Relations connect collections: one_to_one, one_to_many, or many_to_many. You can expand related records in API responses with the with query parameter. See Relations.
Every API request carries an API key in the X-BLUDIA-API-KEY header. A key has an auth type:
  • platform: acts with full project access. Use only on trusted servers.
  • end_users: requires a signed-in end user’s Authorization: Bearer <access_token> on data routes. Role permissions and row policies apply. Use in browser and mobile apps.
See API authentication.
An authentication guard connects login to one of your collections. You pick the collection (for example users) and the login field (for example email); Bludia adds a password field. End users then register and log in at /auth/{guard}/register and /auth/{guard}/login and receive a short-lived JWT access token plus a refresh token.End users are records in your own collection, so you can add any profile fields you like. See Authentication.
  • Authentication answers who is this? (guards, login, tokens).
  • Authorization answers what may they do? (roles, collection permissions, row policies).
Bludia checks both on every end-user request: first the collection permission for the action (read, create, update, delete), then the row policies that filter which records are visible. See Authorization.
A role belongs to a guard. Each guard starts with a default role, user, which new registrations get automatically.Collection permissions grant a role actions on a collection: can_read, can_create, can_update, can_delete, plus can_export, can_import, can_execute_actions, can_manage_schema.Row policies narrow access to specific records, for example only records I created (owner), records where status = published (field_equals), or records linked to me through a relation (relation). With no allow policy, end users see only records they created. See Row-level security.
A function is business logic written as plain steps, not code. It starts from one of three triggers:
  • A button on a record in the dashboard, optionally asking the user for inputs first.
  • A record event: a record in a collection is created, updated, or deleted.
  • A schedule: a cron expression, an interval, or a set time, optionally once for each matching record.
Steps can get, query, create, update, and delete records, check a rule and stop with a message (guard), calculate values, and create a PDF. Each run happens in one database transaction: if any step fails, every change is undone. You can test a function in a dry run that shows every step and saves nothing, and every saved change creates a new version. See Scheduled functions.
A channel stores delivery settings (for example an SMTP email account). A template stores reusable content with {{variables}}. Authentication flows, like email verification, send messages through them. Email (SMTP) is supported today. See Messaging.
Reports query and aggregate records. Dashboards show widgets (KPIs, charts, tables, maps). PDF templates render records into documents. Scheduled functions run business logic once, on an interval, or on a cron schedule, optionally once for each matching record.

End users vs team members

This distinction matters and is easy to mix up:

End users

People who use your app. They live as records in your collection, sign in through a guard, and are controlled by guard roles and row policies.Authentication →

Team members

People who build and manage the Bludia project in the dashboard. They have Bludia accounts and project roles.Team members →

The request lifecycle

What happens when your app calls POST /collections/bookings:

The development model

1

Model

Collections, fields, relations.
2

Expose

API keys and the REST API.
3

Secure

Guards, roles, collection permissions, row policies.
4

Automate

Functions, messaging, reports, and PDF documents.
5

Connect

Your frontend, mobile app, or server.
Start simple. You can add authentication, policies, and functions later without changing your frontend’s data calls.