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:
-
Open a terminal in your project directory and run:
npm install
This will install all the dependencies listed in package.json.
-
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.
-
To build the app for production, run:
npm run build
This will create a 'build' folder with optimized production-ready files.
Commit History
@master
git clone https://git.catseye.tc/StateLab/
- Update `homepage` to allow hosting under an arbitrary path. Chris Pressey 13 days ago
- Place under an MIT license. Chris Pressey a month ago
- Update example, styling. Reset current state when changed. Chris Pressey a month ago
- Add HTML file that hosts the app. Chris Pressey a month ago
- Initial import of files for StateLab. Chris Pressey a month ago