Use case · Schema Editor

Visual Statechart Design and XState v5 Code Generation for Frontend Engineers

How frontend leads and state machine authors eliminate boolean flag bugs by modeling statecharts visually and exporting typed XState v5 TypeScript machines.

Open Schema Editor Add to VS Code
Free · runs in your browser · your files are never uploaded

TLDR

Managing complex frontend UI flows with boolean flags (isLoading, isError, isSubmitted) leads to $2^N$ impossible state combinations and unmaintainable components. GINEXYS Schema Editor FSM mode lets you design state nodes, initial/final markers, and event transitions visually on an interactive canvas, compiling your statechart directly into production-ready, fully typed XState v5 TypeScript code.


The Persona & The Pain Point

You build complex user flows, checkout funnels, async modals, or canvas web apps in React, Vue, Svelte, or TypeScript.

When user flows expand, adding more boolean state variables causes bugs where mutually exclusive states run at the same time (e.g. both isLoading and isSuccess being true). State machines solve this cleanly, but writing raw XState v5 machine configs by hand is verbose, and reviewing complex JSON machine definitions with teammates or product managers is difficult.


The Workflow in Practice

  1. Switch to FSM Mode: Open Schema Editor and choose FSM Mode from the top mode selector.
  2. Place State Nodes & Initial Markers: Click the canvas to place an initial state marker and declare state nodes (idle, authenticating, authenticated, error).
  3. Draw Event Transitions: Connect states with directed arrows and label them with event triggers (SUBMIT, RESOLVE, REJECT, RETRY).
  4. Interactive Simulation: Press Space to enter simulation mode. Click events to watch states transition in real time, verifying that there are no dead-ends or unhandled UI conditions.
  5. Export Typed XState v5 Code: Click Export > XState v5 TypeScript to generate clean setup() and createMachine() TypeScript code ready to paste directly into your project repository.

Key Benefits for Frontend Engineers

ProblemBoolean Flag SpaghettiGINEXYS Schema Editor FSM
State Combinations$2^N$ possible states; impossible states can occurStrictly finite states; only 1 active state at a time
Team ReviewBuried in component hooks and nested if checksClear visual statechart anyone on the team can inspect
Code GenerationManual handwritten state objectsAutomatic export to fully typed XState v5 TypeScript
Test Matrix GenerationManual test case drafting1-click export of transition permutations to Table Formatter

Real-World Example & Output

Modeling a multi-step user authentication state machine:

// Generated XState v5 TypeScript from Schema Editor
import { setup } from 'xstate';

export const authMachine = setup({ types: { events: {} as | { type: 'SUBMIT'; payload: { email: string } } | { type: 'RESOLVE' } | { type: 'REJECT'; error: string } | { type: 'RETRY' } } }).createMachine({ id: 'authFlow', initial: 'idle', states: { idle: { on: { SUBMIT: 'authenticating' } }, authenticating: { on: { RESOLVE: 'authenticated', REJECT: 'error' } }, authenticated: { type: 'final' }, error: { on: { RETRY: 'authenticating' } } } });


Ready to try it?

Schema Editor — Draw and edit wiring diagrams, schematics, ERDs, and state machines as real SVG.