programmati.ca Open Studio

Examples · Dashboard

A business dashboard with charts: 52 lines of AppSPEC

A three-screen dashboard with a ticker, KPI tiles with sparklines, line, donut and bar charts, a revenue table, capacity meters and an activity and alert feed.

Running live in the sandbox with fixed demo data. Anything you add is saved in this browser; nothing leaves your device.

The state graph

3 screens, 0 wires

Screens are nodes and WIRE labels are edges. Screens in blue appear in the navigation; orange edges write a record on the way.

overviewrevenuehealth

How it works

Walking through the spec

01Screens are states

3 screens, each a <STATE>. overview, revenue, health appear in the navigation because they carry a NAV label. Children lay themselves out by containment: ROW, COL and GRID arrange them, and everything else stacks.

<STATE ID="overview" NAV ICON="layout-dashboard">
…
<STATE ID="revenue" NAV ICON="chart-column">
…
<STATE ID="health" NAV ICON="heart-pulse">

02Screens connect by label

This app needs no <WIRE>: navigation comes from NAV labels, and its buttons call component actions directly, such as player.play({id}) or paint.keep(sketches).

03Data flows through the key-value pipe

Every input publishes its value into the pipe under its ID, and every screen can read the pipe with {placeholders}. The pipe drives filtering and display; no wire writes a record.

04Components made of components

<DEFINES> builds PAGEHEAD from existing components, with named parameters, and the states use them like built-in tags.

<DEFINES>
  <!-- A page title with a "demo data" note: a component made of components -->
  <PAGEHEAD TITLE="" NOTE="">
    <ROW JUSTIFY="between" ALIGN="end">
      <COL GAP="2px">
        <TEXT STYLE="eyebrow" TEXT="Tidewater · demo data" />
        <TEXT STYLE="h1" TEXT="{title}" />
      </COL>
      <TEXT STYLE="small" TEXT="{note}" />
    </ROW>
  </PAGEHEAD>
</DEFINES>

05One attribute sets the look

THEME="fintech" sets every colour, radius and typeface. Change the word and the whole app restyles; all 31 themes work with every component.

<APP ID="pulse" NAME="Pulse" THEME="fintech" LOGO="activity" LAYOUT="side" WIDTH="1280px">

Convention over configuration

What the engine infers

Every attribute this spec leaves out has a default inferred from names, data and context. These are the ones this app relies on; writing any of them out would override it.

  • STATE NAV → Overview, Revenue, HealthNAV with no label uses the state ID, humanised
  • CHART X → month, labelThe first text or date field
  • CHART Y → revenue,expenses, valueThe numeric fields
  • COL LABEL → Month, Revenue, ExpensesFrom FIELD
  • COL TYPE → moneyThe values are amounts of money

What this would typically take

The pieces a conventional stack needs

A typical implementation of the same app assembles these parts, each with its own code, libraries and configuration. The size depends on the team and the tools, so we do not quote a number for it.

Here the same app is one 52-line document built from general-purpose components: CARD, CHART, FEED, GRID, KPI, METER, PAGEHEAD, TABLE, TEXT, TICKER.

ChartingA charting library, its configuration per chart, tooltips, legends and axis formatting.
KPI tilesComponents for values, changes and sparklines.
Data loadingFetching each dataset and wiring it into the right widget.
LayoutA sidebar shell, a responsive grid and navigation between screens.
Tables and feedsA sortable table, a meter component and an activity list.
Build toolingA bundler, a dev server and a build configuration.
The full specpulse.appspec · 52 lines
The same spec with every inferred attribute written out (52 lines)
<APP ID="pulse" NAME="Pulse" THEME="fintech" LOGO="activity" LAYOUT="side" WIDTH="1280px">

  <DEFINES>
    <!-- A page title with a "demo data" note: a component made of components -->
    <PAGEHEAD TITLE="" NOTE="">
      <ROW JUSTIFY="between" ALIGN="end">
        <COL GAP="2px">
          <TEXT STYLE="eyebrow" TEXT="Tidewater · demo data" />
          <TEXT STYLE="h1" TEXT="{title}" />
        </COL>
        <TEXT STYLE="small" TEXT="{note}" />
      </ROW>
    </PAGEHEAD>
  </DEFINES>

  <STATE ID="overview" NAV ICON="layout-dashboard">
    <PAGEHEAD TITLE="Overview" NOTE="Updated 27 Sep 2026, 17:00 UTC" />
    <TICKER SRC="tickers" />
    <KPI SRC="kpis" COLS="4" />
    <ROW ALIGN="stretch" GAP="16px">
      <COL SPAN="2" MIN="320px">
        <CHART SRC="revenue" TYPE="line" NAMES="Revenue,Expenses" UNIT="$" TITLE="Revenue and expenses" SUBTITLE="Last 12 months" HEIGHT="260px" />
      </COL>
      <COL MIN="300px">
        <CHART SRC="channels" TYPE="donut" UNIT="%" TITLE="Traffic by channel" SUBTITLE="Share of sessions, September" HEIGHT="260px" />
      </COL>
    </ROW>
    <GRID COLS="2" MIN="320px">
      <CHART SRC="regions" TYPE="hbar" UNIT="$" TITLE="Revenue by region" SUBTITLE="September, thousands" HEIGHT="220px" />
      <CARD TITLE="Activity" SUBTITLE="Last 24 hours"><FEED SRC="activity" /></CARD>
    </GRID>
  </STATE>

  <STATE ID="revenue" NAV ICON="chart-column">
    <PAGEHEAD TITLE="Revenue" NOTE="Monthly, USD" />
    <CHART SRC="revenue" TYPE="bar" Y="revenue" UNIT="$" TITLE="Monthly revenue" HEIGHT="300px" />
    <TABLE SRC="revenue">
      <COL FIELD="month" />
      <COL FIELD="revenue" />
      <COL FIELD="expenses" />
    </TABLE>
  </STATE>

  <STATE ID="health" NAV ICON="heart-pulse">
    <PAGEHEAD TITLE="System health" NOTE="Thresholds: amber at 70%, red at 90%" />
    <GRID COLS="2" MIN="320px">
      <CARD TITLE="Capacity"><METER SRC="systems" /></CARD>
      <CARD TITLE="Alerts"><FEED SRC="activity" WHERE="tone IN warning|error" STYLE="alerts" /></CARD>
    </GRID>
  </STATE>

</APP>