VIASTATE · BEHAVIOUR MODELLING
Draw what happens next.
ViaState turns states, events and transitions into a model you can execute. Build the diagram, send an event, inspect the result and export code from the same definition.
Runs in the browser. Machines are saved under your Quiet Grid Labs account.
LIVE MACHINE · TURNSTILE
Current state: locked
The gate starts locked.
01
ONE MODEL, THREE JOBS
Design, check and run the same machine
Model the behaviour
Place states on the canvas, connect events and add guards, actions, nested states or parallel regions where the process needs them.
Step through events
The simulator shows the active configuration, context values, transition path and actions fired after each event.
Catch structural mistakes
Validation points to missing targets and unreachable states before the machine reaches application code.
02
STARTING POINTS
Choose the machine that matches the problem
A UI flow and a Turing-machine exercise need different data beside the graph. ViaState starts each model with the relevant context and gives the simulator a matching tape, stack, queue or register view.
Finite automaton
States, alphabet and accepting states
Mealy machine
Output produced on each transition
Pushdown automaton
Input plus a visible stack
Turing machine
Tape, head position and symbols
Queue automaton
FIFO memory beside the active state
Statechart
Nested states, guards, actions and context
03
EXPORT
The diagram can leave the editor
Export the model as XState v5 TypeScript, a Python state-machine class, Mermaid or JSON. Layout lives in metadata, so the behavioural definition remains readable by other tools.
Open the editorturnstile.machine.ts
export const turnstile = createMachine({
id: 'turnstile',
initial: 'locked',
states: {
locked: { on: { COIN: 'unlocked' } },
unlocked: { on: { PUSH: 'locked' } }
}
})ViaState questions
Which machine formats does ViaState support?
The editor stores XState v5-compatible machine definitions. Built-in starting points cover finite automata, Mealy machines, pushdown automata, Turing machines, queue automata and hierarchical statecharts.
Can I run a machine before exporting it?
Yes. Send events from the Run panel and inspect active states, context changes, fired actions and the transitions taken on each step.
What can ViaState export?
ViaState exports XState v5 TypeScript, a python-statemachine class, Mermaid diagrams and the original machine JSON.
