Skip to content

Protocol ​

The backend and the frontend share nothing but a versioned JSON protocol over HTTP. Any backend that speaks it can drive the panel — that is how the Rust, PHP and Go cores stay in parity.

Key rules ​

  • The server sends schema and data, never HTML. The frontend renders from a closed set of pre-built components.

  • Schema, data, state and commands are separate.

    PartContainsLives
    Schemacomponents, layout, rulesserver, cacheable per permissions
    Datarecords, options, metricsserver, paginated
    Statefield values, filters, open dialogs, selectionclient only
    Commandsactions, create / update / delete, validateseparate requests
  • Record keys are opaque strings. An integer id, a UUID or a ULID is always sent as a JSON string, and so are foreign keys and ids lists. The backend decides what a key looks like; a key it cannot read is a 404.

  • Dates are ISO 8601. A moment is in UTC with Z (2026-12-03T10:15:30Z, fractional seconds optional); a day is YYYY-MM-DD. The frontend shows moments in the user's time zone and days without shifting.

  • Validation errors: 422 { message, errors }, exactly one message per field.

  • Flags are written only as true. An optional flag that is off is simply absent.

  • Sessions, not tokens. The panel is a same-site SPA: framework session plus CSRF (XSRF-TOKEN cookie → X-XSRF-TOKEN header).

JSON Schema ​

The protocol is described in JSON Schema 2020-12, one file per area. Conformance tests validate every response of every core against these files.

SchemaDescribes
commonKey, Moment, Day, options, errors
authcurrent user, channel auth
bootstrappanel bootstrap, menu, notification config
fieldsform fields, columns, filters, entries
resourceresource schema, table, actions
pagepage schema, layout, blocks
recordsrecords, abilities, list pages, summaries
actionsaction results, effects, runs
metricsvalue, progress, partition, trend
notificationsnotifications

Each file's $id is its URL on this site: https://kabinethq.com/protocol/1/<name>.schema.json.

Version 1, not frozen

The protocol is at version 1 while kabinet is experimental. Capability negotiation between client and server versions is designed but not implemented yet.

Experimental. Not ready for production use.