Skip to main content
Databases in Brainbox provide spreadsheet-like functionality with rich data types, custom fields, and multiple view layouts. Think Notion databases or Airtable - but local-first and self-hosted.

Creating Databases

Databases are containers for structured records with custom fields:
1

Add a database

Click + in any folder or space, then select Database.
2

Name your database

Give it a descriptive name like “Tasks”, “Contacts”, or “Inventory”.
3

Add fields

Click Add Field to define custom properties for your records.
4

Create records

Add rows to store your data. Each record can have a rich text page attached.

Database Structure

A database consists of:
{
  type: "database",
  name: "My Database",
  avatar: "📊",
  parentId: "space_xyz",
  fields: {
    "field_abc": {
      id: "field_abc",
      type: "text",
      name: "Name",
      index: "a0"
    },
    "field_def": {
      id: "field_def",
      type: "select",
      name: "Status",
      index: "a1",
      options: {
        "opt_1": { name: "Todo", color: "gray" },
        "opt_2": { name: "In Progress", color: "blue" },
        "opt_3": { name: "Done", color: "green" }
      }
    }
  },
  nameField: {
    name: "Title"
  }
}

Field Types

Brainbox supports 17 different field types for storing various data:

Text

Single or multi-line text content

Number

Numeric values with optional formatting

Boolean

Checkbox for true/false values

Date

Date picker with optional time

Database Records

Each record in a database is a node with:
  • Fields - Values for each custom field
  • Name - Record title (from name field)
  • Avatar - Optional emoji or icon
  • Document - Rich text page content (optional)
Records can have full page content just like regular pages. Click any record to open its page view and add notes, documentation, or details.

Database Views

Views provide different ways to visualize and interact with your data. Each database can have multiple views with independent configurations.

View Types

Classic spreadsheet layout with rows and columns.Features:
  • Resize column widths
  • Show/hide columns
  • Reorder columns by dragging
  • Inline editing
  • Sort by any field
  • Filter records
Perfect for:
  • Task lists
  • Contact databases
  • Inventory tracking
  • Any tabular data

View Configuration

Each view stores its own configuration:
{
  type: "database_view",
  layout: "table" | "board" | "calendar",
  name: "My View",
  parentId: "database_xyz",
  fields: {
    "field_abc": {
      id: "field_abc",
      width: 200,        // Column width (table view)
      display: true,     // Show/hide column
      index: "a0"        // Column order
    }
  },
  filters: {},          // Filter configuration
  sorts: {},            // Sort configuration
  groupBy: "field_status",  // Group field (board view)
  swimlanesBy: "field_priority", // Swimlane field (board view)
  nameWidth: 300        // Name column width
}

Filtering Records

Views support powerful filtering to show only relevant records:
1

Add a filter

Click the Filter button in any view toolbar.
2

Choose a field

Select which field to filter on.
3

Select operator

Choose how to compare the field value (equals, contains, is empty, etc.).
4

Enter value

Provide the value to filter by.

Filter Operators

Available operators depend on field type:
Field TypeOperators
TextContains, Does not contain, Is empty, Is not empty, Equals
NumberEquals, Does not equal, Greater than, Less than, Is empty
SelectIs, Is not, Is empty, Is not empty
DateIs, Is before, Is after, Is empty, Is not empty
BooleanIs checked, Is not checked

Complex Filters

Combine multiple filters with AND/OR logic:
{
  filters: {
    "filter_1": {
      id: "filter_1",
      type: "group",
      operator: "and",
      filters: [
        {
          id: "f1",
          type: "field",
          fieldId: "status",
          operator: "equals",
          value: "In Progress"
        },
        {
          id: "f2",
          type: "field",
          fieldId: "priority",
          operator: "equals",
          value: "High"
        }
      ]
    }
  }
}

Sorting Records

Sort records by one or more fields:

Single Sort

Click any column header to sort ascending or descending.

Multi-Level Sort

Add multiple sort rules to break ties (e.g., Status → Priority → Date).
{
  sorts: {
    "sort_1": {
      id: "sort_1",
      fieldId: "priority",
      direction: "desc"
    },
    "sort_2": {
      id: "sort_2",
      fieldId: "created_at",
      direction: "asc"
    }
  }
}

Permissions

Database access follows workspace permissions:
RoleCreate DBAdd FieldsEdit RecordsDelete
Admin
Member
Viewer
Guest
Deleting a database permanently removes all records and views. This action cannot be undone.

Real-Time Collaboration

Multiple users can work on the same database simultaneously:
  • Live updates - See new records and changes instantly
  • Conflict resolution - CRDT technology merges concurrent edits
  • Offline support - Create and edit records offline, sync when reconnected
See Collaboration for technical details.

Use Cases

Track tasks, bugs, and features with Status, Assignee, Priority, and Due Date fields. Use board view for sprints and table view for backlogs.
Manage contacts with Email, Phone, Company, and Deal Stage fields. Use select fields for lead status and pipeline stages.
Plan blog posts, social media, and campaigns with Date, Status, Platform, and Author fields. Calendar view shows your publishing schedule.
Monitor stock with Number fields for quantity, Select for categories, and File fields for product images.
Track applications with Company, Position, Status, Date Applied, and Notes fields. Board view for application stages.

Next Steps

Pages

Learn about rich text documents

Files

Attach files to database records

Collaboration

Understand real-time editing

API Reference

Programmatic database access

Build docs developers (and LLMs) love