Vaktor v0.1

Page

Page = title + list of components. All content lives in items, grouped by section.

{
  "contract_version": "0.1.0",
  "page": {
    "id": "home",
    "title": "Home",
    "items": [ /* components */ ],
    "search": {
      "endpoint": "/pages/home?q={query}",
      "placeholder": "Search"
    },
    "toolbar": [
      {
        "icon": "plus",
        "title": "Create",
        "shortcut": "cmd+n",
        "action": {
          "type": "navigate",
          "endpoint": "/pages/orders/new"
        }
      }
    ],
    "refresh": true,
    "refresh_interval": 0
  }
}
FieldTypeDescription
idstringidentifier
titlestringnavbar title
items[]arraypage components
searchobject?search bar; {query} substituted by the client
toolbar[]array?actions on the navbar trailing side
refreshbool?pull to refresh (default true)
refresh_intervalint?auto-refresh every N seconds; 0/nil — off
sourceobject/array?external data — see Data binding
mapsobject?map transform tables
"search": {
  "endpoint": "/pages/home?q={query}",
  "placeholder": "Search"
}

{query} is substituted on input; the server returns a filtered page.

Adding a navbar button

A toolbar item = icon/title + action, with an optional shortcut. On macOS it is mirrored into the window toolbar and the app menu.

Live page

refresh_interval: 5 — data is re-fetched every 5 seconds, changed rows update in place. Use it only where data actually changes.

What the server controls, what the client controls

ServerClient (cannot change)
title, toolbar, searchback button, title style, navbar colors