Appearance
Data Model
How the key entities in VBIC relate to each other.
Entity overview
Organisation
└── CardLayout (one or more per org)
└── CardLayoutVersion (immutable snapshots, v1 v2 v3 …)
└── Template (one or more per org)
├── references a CardLayoutVersion
└── cards: InspectionCardDef[]
└── boxes: BoxMap (field ID → BoxConfig)
└── TemplateAuditEntry (audit trail)
└── TemplateShareInvite (outgoing share codes)
└── TemplateShare (active cross-org grants)Organisation
The top-level tenant. Every user belongs to one organisation.
| Field | Type | Description |
|---|---|---|
name | string | Display name (e.g. Acme Wind Services) |
code | string | Short unique code, stored uppercase |
status | string | active | archived | deleted |
tier | string | Subscription tier (e.g. free) |
maxUsers | integer | User seat limit (optional) |
maxTemplates | integer | Template limit (optional) |
CardLayout
Represents a named layout definition. The layout itself doesn't store the rows and cells directly — those live in CardLayoutVersion.
| Field | Type | Description |
|---|---|---|
ownerOrgId | string | null | Owning org. null = public/platform-owned |
name | string | e.g. Vestas V164 Standard |
currentVersion | integer | The latest published version number |
isPublic | boolean | If true, visible to all organisations |
CardLayoutVersion
An immutable snapshot of a layout's row/cell structure. Layouts are versioned so templates can pin to a specific version while a newer version is being developed.
| Field | Type | Description |
|---|---|---|
layoutId | string | Parent CardLayout ID |
ownerOrgId | string | Copied from the parent for authorisation |
version | integer | Version number (1, 2, 3 …) |
layoutDefinition | JSON | The LayoutDefinition object (rows + cells) |
LayoutDefinition
ts
{
rows: LayoutRow[];
rowSpanTotal: number; // must equal 6 (the grid column count)
labelFontSize?: number; // px, default 8
valueFontSize?: number; // px, default 12
}Each LayoutRow contains an array of LayoutCell objects. See Cell types reference.
Template
A named set of inspection cards.
| Field | Type | Description |
|---|---|---|
ownerOrgId | string | Owning organisation |
name | string | e.g. V164 Internal Blade Q1 |
tags | string[] | Optional filter tags |
isPublic | boolean | If true, appears in the Public Library for all orgs |
layoutId | string | References a CardLayout |
layoutVersion | integer | Pinned version of the layout |
cards | JSON | Array of InspectionCardDef |
status | string | draft | published | archived |
Template status lifecycle
draft → published → draft (unpublish)
draft → archived → draft (restore)Technicians can only see and run published templates.
InspectionCardDef
One card within a template.
| Field | Type | Description |
|---|---|---|
id | string | Stable UUID for this card |
boxes | BoxMap | Map of cell ID → BoxConfig |
BoxConfig (field mode)
Each data cell on a card has a BoxConfig that controls how its value is determined.
| Mode | Shape | Meaning |
|---|---|---|
fixed | { mode: 'fixed', value: string } | Value is baked in at template-build time |
editable | { mode: 'editable' } | Value is entered live by the technician during the inspection |
fromSetup | { mode: 'fromSetup' } | Value is entered once on the Setup screen and appears on every card |
TemplateShareInvite
An invite code generated by the sharing org.
| Field | Type | Description |
|---|---|---|
code | string | 8-character unique code |
templateId | string | The template being shared |
createdByOrgId | string | Sharing org |
expiresAt | datetime | When the code stops being redeemable |
redeemedByOrgId | string? | Set once redeemed |
TemplateShare
An active grant — one row per {templateId, sharedWithOrgId} pair.
| Field | Type | Description |
|---|---|---|
templateId | string | The shared template |
sharedByOrgId | string | Org that shared |
sharedWithOrgId | string | Org that received access |
TemplateAuditEntry
An immutable audit log record.
| Field | Type | Description |
|---|---|---|
orgId | string | Organisation the action occurred in |
templateId | string | Template that was acted on |
templateName | string? | Name at the time of the action |
action | string | created | updated | deleted | published | unpublished | archived | restored | inspection_started |
userEmail | string? | Email of the user who triggered the action |
occurredAt | string? | ISO datetime |