Examples¶
Choose a runnable app by the behavior you want to try. The login app implements the tutorial; the larger examples show distinct lifecycle and coordination problems.
| Example | What it shows | Pair with |
|---|---|---|
| state_machine_walkthrough | A small transition table; guards and actions kept with the spec; pure machine-transition tests; the same machine value in the browser and on the JVM |
First machine, The table |
| login | The first machine's :auth.login/flow as a working app: :schemas on the machine's :data and its event, managed HTTP answered by an in-page stub, a controlled form, and a session token that never enters the machine |
First machine |
| boot | App start-up as a machine: one :spawned loader for config, a :spawn-all fan-out joined with :join :all, a failure state with retry, and a UI that mounts only at :ready |
Actors, Fan-out and join, Automatic transitions |
| nine_states | Parallel regions for orthogonal UI axes; tags as render semantics; a render-priority table; one view branch instead of a cross-product |
Parallel regions, Tags |
| long_running_work | A parent :spawn-all of N workers; :join :all; progress as a targetless self-transition; cooperative cancel and teardown on every exit |
Fan-out and join, Actors |
| websocket | Hierarchical connection states; a :spawned socket actor; :after exponential backoff; :always queue flush; tags for status; :current-socket? drops events from a replaced socket |
Hierarchical states, Actors, Automatic transitions |