git @ Cat's Eye Technologies StateLab / master
master

Tree @master (Download .tar.gz)

StateLab

StateLab is an interactive web app for experimenting with state machines. In a text box, the user may define a state machine in Mermaid.js format. As the user makes edits, an accompanying state machine diagram is updated, giving immediate visual feedback as to the event-and-state structure of the state machine.

An interactive simulator of the state machine is additionally updated whenever the state machine definition is changed. In this simulator, the current state is shown, and a set of buttons, one for each possible event, are provided to allow the user to transition the machine to a new state. Only buttons for events that are possible in the current state are enabled; all others are disabled.

Development

To set up and run the project:

  1. Open a terminal in your project directory and run:

    npm install
    

    This will install all the dependencies listed in package.json.

  2. After the installation is complete, you can start the development server by running:

    npm start
    

    This will start the app on http://localhost:3000 by default.

  3. To build the app for production, run:

    npm run build
    

    This will create a 'build' folder with optimized production-ready files.