Skip to main content

๐Ÿ—„ DataHub Implementation Guide

Overviewโ€‹

DataHub is the RABS platform's flexible data management system, providing a structured workspace โ†’ board โ†’ table โ†’ row/column hierarchy for organising operational data. It supports multiple layout modes, inline editing, threaded comments, and integration with the Reggie context system.

Conceptual Modelโ€‹

Workspaces
โ””โ”€โ”€ Boards
โ””โ”€โ”€ Tables
โ”œโ”€โ”€ Columns (shared schema per board)
โ””โ”€โ”€ Rows
โ””โ”€โ”€ Cells (column + row intersection)

Workspacesโ€‹

Workspaces are the highest-level grouping, representing major operational domains (e.g., Participants, Operations, HR). Each workspace is rendered by datahub_workspace.html and serves as a navigation container for its boards.

Boardsโ€‹

Each workspace contains multiple boards. Boards define the shared column schema, context bucket (used for Reggie integration), and layout mode.

AttributeDescription
tablesCollection of tables within the board
columnsShared column schema โ€” all tables in a board share the same columns
context bucketReggie context integration identifier

Board Layoutsโ€‹

Three layout modes are available:

LayoutDescription
Standard tablesFull table view with all columns visible
Compact tablesCondensed rows, reduced column width
Featured cardsCard-based layout highlighting key fields

Tablesโ€‹

Tables hold rows and inherit the board's column schema. Individual tables can override the board's context bucket for Reggie integration. Columns within a table are reorderable, hideable, and support width presets.

Column and Cell Typesโ€‹

TypeDescription
textFree-text input
numberNumeric value
boolBoolean toggle
dateDate picker
jsonStructured JSON data
dropdownSingle-select dropdown
dropdown_multiMulti-select dropdown
statusStatus badge with colour coding
fileFile attachment

Row Editing Workflowโ€‹

Slide-Over Panelโ€‹

Clicking a row opens a slide-over panel with two sections:

SectionContent
TopEditable fields for all row cells
BottomThreaded comments

When a row has more than 4 comments, the panel switches to split mode โ€” side-by-side editor and comments view.

Inline Quick Editโ€‹

Status and dropdown badges support inline quick editing directly from the table view. The edit writes via the updateRow endpoint with the following payload shape:

{
cells: {
columnKey: {
value: "single value" // for single-select types
// OR
values: ["val1", "val2"] // for multi-select types
}
}
}

Commentsโ€‹

Row comments are loaded via authenticated API call:

GET /api/v1/datahub/rows/:rowId/comments
Authorization: Bearer <token>

Comment avatars are resolved via:

GET /api/v1/profile-photo/serve/resolved

Database Schemaโ€‹

All DataHub tables reside in the datahub schema:

TablePurpose
datahub.workspacesWorkspace definitions and metadata
datahub.boardsBoard configuration, layout mode, context bucket
datahub.tablesTable definitions within boards
datahub.columnsColumn schema โ€” type, order, visibility, width
datahub.rowsRow data containers
datahub.cellsCell values at column ร— row intersections
datahub.row_commentsThreaded comments attached to rows

Key Filesโ€‹

FilePurpose
admin/src/js/pages/datahub_board.jsPrimary board logic โ€” rendering, editing, CRUD
admin/src/html/datahub_board_*.htmlThree layout wrapper templates (standard, compact, featured)
admin/src/html/datahub_workspace.htmlWorkspace landing page

UX Design Standardsโ€‹

The DataHub interface follows these design conventions:

ElementSpecification
Visual aestheticFrosted participant style
Status chipsSquared corners, 0.35rem border radius
Inline editQuick-edit menus for status and dropdown badges
Row editorSlide-over panel with split mode at >4 comments
Context labelsDisplay "Reggie's Context" badge when context bucket is active

Buildโ€‹

DataHub is part of the admin frontend and is built with Vite:

npm --prefix admin run build