The web app
Airframe’s web app opens a project folder in the browser and lets you browse, check and edit its design system: the tokens with their values in every appearance and density, the contrast pairs, the components, who reads each token, what changed since another version, and the specimen sheets.
It shows exactly what the CLI computes. The app runs Airframe’s own Go core, compiled to WebAssembly, in a worker: lint, resolution, contrast, naming, diff and every edit are the core’s, never a second implementation in the browser. Nothing leaves your machine. There is no server, no account and no telemetry, and the fonts are served with the app.
The app ships in v0.11.0. The website publishes it at
https://airframe.uijig.com/app/ with each release after v0.11.0; you can
also run it from this repository (see
Running it locally).
Opening a project
Section titled “Opening a project”The first screen (#/) offers three ways in:
- Open folder… (Chromium browsers: Chrome, Edge, Arc, Brave). Choose
the folder that holds
airframe.yaml. The browser asks once whether Airframe may edit the files in it; the app then reads and writes them in place. The folder is listed under Recent, so you can reopen it in one click; the browser asks again for access when you do. - Open folder (view only) (Firefox and Safari, which cannot write to a folder), or drop the folder on the page. You can browse and edit, and your changes are collected for you to download (see Saving).
- Explore the example: the
testdata/demoproject from this repository, held in memory: two platforms, appearance and density, a ruled component and two contrast invariants. It lints clean but for one contrast pair it fails on purpose, so each view has something to show.
What the app reads
Section titled “What the app reads”The app asks the core which files the project reaches, the same way the CLI decides what to load, and reads only those:
airframe.yamland everything under the content root (token files,invariants.yaml, components, retired treatments);- each platform’s consumer files, as its
consumersglobs match them; gantry.yamland its rulings, when the project uses Gantry;- the build outputs, so lint can tell whether they are stale. An output over 1 MiB is left out, and lint then reports it as stale;
- the files components name as their implementations, by name only: lint only checks that they exist.
It never reads .git or node_modules. This is the one place the app and
the CLI can differ: a consumer glob that reaches into node_modules is
scanned by the CLI and not by the app.
The header shows the project’s name, the lint summary (errors and warnings, linking to the findings), whether your changes are saved, and the app’s version.
The views
Section titled “The views”- Tokens (
#/tokens): every token, in sections by tier (primitive, semantic, component) and grouped by the first segment of its path.- Each appearance value has its own column, side by side. When a token varies on density, a group of density columns shows each density’s value.
- A colour is a swatch with its hex and OKLCH written beside it; any other value is its CSS value.
- Build and accent sets the axes that are not side by side: the
build-bound and fan-out axes, and
group: accentaxes. The values follow. - Find searches the tokens by what they are for, as
airframe finddoes. - Readable by file takes a consumer file, such as
web/src/App.tsx, and keeps the tokens it may read, each with the reason; uncheck “Show only the tokens it may read” to see the refusals too. - A token’s name opens the inspector (
#/tokens/<name>): its mode keys with their alias chains and resolved values, the names each platform’s emitter writes for it, and links to its usages and its edit page.
- Contrast (
#/contrast): every contrast pairinvariants.yamldeclares, measured in each context it applies to (appearance under each accent value). Each cell gives the ratio as lint writes it, the minimum, and pass or fail in words. Filter to the failing cells, or to one invariant. - Components (
#/components): each component’s noun, ruling and status, and on each platform its implementation, itsn/areason, or missing. A component’s page (#/components/<id>) lists the tokens it owns, its owners and hosts, and the files that read its tokens on each platform, with counts. - Usages (
#/usages/<token>): every read of a token, by platform, at file, line and column: the text as written, whether it is direct or through a declared wrapper, and, for a component’s token, whether the reader owns it. Then the tokens that alias it. - Diff (
#/diff): see Diff. - Lint (
#/lint): every finding, errors first, each linking to its rule’s page and to the token or component it names. - Specimen (
#/specimen): the sheetsairframe specimendraws (colours, type and spacing), with a variant picker for a project that fans out.
Editing
Section titled “Editing”A token’s edit page (#/tokens/<name>/edit) has its value, type,
description, tier, component, emit list, retired flag, a value for each
density, and its other mode values. A component’s
(#/components/<id>/edit) has its noun, ruling, tokens, owners, host,
shared flag and an implementation for each platform. Values are DTCG JSON:
an alias in quotes, such as "{gray.50}", or a literal object.
The colour picker
Section titled “The colour picker”A colour token’s value fields (its value, and each density and mode
value) have Pick a colour. The picker starts from the field’s OKLCH
literal or, for an alias, the token’s resolved value. Set lightness,
chroma, hue and alpha, or take a colour from your system’s picker (sRGB).
It shows the colour’s OKLCH, whether it fits sRGB and Display P3, and a
row for each platform format that writes a colour (CSS, Apple colorsets,
Kotlin, XAML): the gamut option that maps it, the value exactly as
airframe build would write it, and, where the colour lies outside the
space that format writes, a warning with the colour difference (ΔE, in
OKLab) between your colour and what is written. Use this colour puts
the colour into the field as a DTCG OKLCH object; Preview and Save as for
any edit. Every conversion is the core’s (its gamut function): the
picker computes no colour itself. The desktop app has the same picker.
The form starts from the record as it is, and an edit changes only the
fields you change. Preview shows what the edit would do, as the CLI’s
airframe mcp tools compute it: the unified diff of every file it writes,
the outputs it regenerates, and the lint findings it would add or resolve.
An edit that would leave the project not loading or not building is
refused, and the preview says why. The record’s source file is shown
below the form, read-only.
Saving, by browser
Section titled “Saving, by browser”Save writes the edited sources and the regenerated outputs together,
formatted as airframe fmt formats them.
- Chromium, with a folder opened in place: the files are written to the folder.
- Firefox and Safari, or any folder opened view only: the changes are kept, and the header says Not saved to disk with their count. Open it and choose Download changes: one file downloads as itself, several as a zip of project-relative paths. Copy them into the project.
- The example lives in memory: saving changes it for the session.
Changed on disk
Section titled “Changed on disk”The app never writes over someone else’s change. Before it saves an edit,
it reads the record’s source file again; if an editor, an agent or a git checkout changed it since your preview, nothing is written and the app
says the record changed on disk; reload. Choose Reload, check the
record as it is now, and make your edit again. Separately, every save
checks each file it writes, and coming back to the window checks them
all: a file changed outside the app is reloaded (“Reloaded: changed on
disk”) rather than overwritten.
The diff shows how the open project’s tokens differ from another version of them: added, removed, possibly renamed (a removed and an added token with the same values everywhere) and changed tokens, each changed value with its before and after swatch in each context. Two ways to get the other version:
- Compare with a folder…: open a second folder, such as a checkout of another branch or tag. It is read view only, with the same rules as opening a project.
- Import a diff JSON…: the report
airframe diff --format jsonprinted, shown as the CLI wrote it.
A browser cannot read git, so comparing with a git ref is the CLI’s:
airframe diff main, or airframe diff main --format json > diff.json to
import the result here. The desktop app compares git refs
itself.
Offline and privacy
Section titled “Offline and privacy”After its first load the app works offline: a service worker keeps the app, the core and the fonts, and the example. When a new version is available, the app says so and reloads when you choose.
Installed as an app (from the browser’s install button), its window’s
title bar and its splash screen are Airframe’s midnight blue (#101E30)
in light and dark alike: the web app manifest has one theme colour. The
header the app draws below it is the same midnight in the light theme and
a deeper one (#0B1522) in the dark.
Your project never leaves the browser. The app makes no request to any other origin (its Content-Security-Policy forbids it), has no account and collects nothing. Recent folders are remembered in the browser’s own storage, on this machine only.
Running it locally
Section titled “Running it locally”From the repository root, with Go and Node (the version in web/.nvmrc)
and corepack’s pnpm:
make wasm web-installbuilds the core to WebAssembly and installs the web workspace from its lockfile.pnpm -C web buildbuilds the core’s client and the app.- Either
pnpm -C web/app devfor the development server, orpnpm -C web/app previewto serve the production build, which is what works offline. Open the address it prints, under/app/.
The pnpm -C … commands run from the repository root, where corepack
does not see web/package.json’s packageManager pin and runs your
default pnpm, which must then be that version. Inside web/ corepack uses
the pin itself, as the make targets do: there, pnpm build and
pnpm --dir app dev are the same steps.
make web-test runs the web workspace’s lint, build and tests, and
make web-e2e its end-to-end tests in Chromium, WebKit and Firefox.