cadence
One Go+ program, multiple interface runtimes
Cadence is the target-independent foundation for full-stack Go+ interfaces. A program owns one model, one closed message algebra, one update function, and explicit commands. Browser, server, terminal, and native GUI packages interpret that same program without moving domain policy into JavaScript or widget code.
v0.4.0: Elm Architecture across targets
program.LogicdefinesInit,Update, andSubscriptions.- Opaque commands cover emit, batch, sequence, delay, cancellation, and typed effects; interpreters decide how target capabilities execute.
sel.Elementis a semantic element language for controls that translate cleanly across browser, terminal, and GUI targets.- Immutable semantic styles separate intent from CSS, Lip Gloss, or Gio details.
- Components provide child model/message lifting without giving child code access to parent state.
Execution plans, not mode flags
Plan separates five orthogonal decisions: initial render, state owner,
activation, transport, and fallback. Hosts accept only ValidatedPlan, so
incoherent combinations cannot reach an interpreter.
plan := cadence.Hydrated(cadence.ActivateLoad{})
live := cadence.LiveServer(cadence.ActivateLoad{})
floor := cadence.WithoutClient(plan)
Presets include static, deferred-server, streamed-server, hydrated, client-only, and server-owned live execution. The universal-floor fallback remains a law: disabling the client produces readable server-rendered content rather than a permanent loading shell.
Architecture
| Layer | Owns |
|---|---|
cadence/program | Model/update loop, commands, subscriptions, codecs, components |
cadence/sel | Target-capability semantic elements and renderer contracts |
cadence/style | Immutable semantic styling and themes |
quicken/web | DOM, SSR, hydration, commands, and live transport |
quicken/tui | Bubble Tea v2, Bubbles, and Lip Gloss interpretation |
quicken/native | Shared Gio widgets, layout, and event interpretation |
quicken/desktop | Windows, macOS, and Linux application lifecycle |
quicken/mobile | iOS and Android lifecycle and capabilities |
Install
go get goforge.dev/cadence@v0.4.0
Cadence is MIT licensed and authored in .gp sources. Consumers compile the
checked-in generated Go and do not need Go+ installed.