๐ 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.
| Attribute | Description |
|---|---|
tables | Collection of tables within the board |
columns | Shared column schema โ all tables in a board share the same columns |
context bucket | Reggie context integration identifier |
Board Layoutsโ
Three layout modes are available:
| Layout | Description |
|---|---|
| Standard tables | Full table view with all columns visible |
| Compact tables | Condensed rows, reduced column width |
| Featured cards | Card-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โ
| Type | Description |
|---|---|
text | Free-text input |
number | Numeric value |
bool | Boolean toggle |
date | Date picker |
json | Structured JSON data |
dropdown | Single-select dropdown |
dropdown_multi | Multi-select dropdown |
status | Status badge with colour coding |
file | File attachment |
Row Editing Workflowโ
Slide-Over Panelโ
Clicking a row opens a slide-over panel with two sections:
| Section | Content |
|---|---|
| Top | Editable fields for all row cells |
| Bottom | Threaded 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:
| Table | Purpose |
|---|---|
datahub.workspaces | Workspace definitions and metadata |
datahub.boards | Board configuration, layout mode, context bucket |
datahub.tables | Table definitions within boards |
datahub.columns | Column schema โ type, order, visibility, width |
datahub.rows | Row data containers |
datahub.cells | Cell values at column ร row intersections |
datahub.row_comments | Threaded comments attached to rows |
Key Filesโ
| File | Purpose |
|---|---|
admin/src/js/pages/datahub_board.js | Primary board logic โ rendering, editing, CRUD |
admin/src/html/datahub_board_*.html | Three layout wrapper templates (standard, compact, featured) |
admin/src/html/datahub_workspace.html | Workspace landing page |
UX Design Standardsโ
The DataHub interface follows these design conventions:
| Element | Specification |
|---|---|
| Visual aesthetic | Frosted participant style |
| Status chips | Squared corners, 0.35rem border radius |
| Inline edit | Quick-edit menus for status and dropdown badges |
| Row editor | Slide-over panel with split mode at >4 comments |
| Context labels | Display "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