This is a simple example of how to start using Scratch Blocks in web a application. To learn more about it, checkout Scratch Blocks documentation.
Blockly is a client-side library for the programming language JavaScript for creating block-based visual programming languages and editors. A project of Google, it is free and open-source software released under the Apache License 2.0. It typically runs in a web browser, and visually resembles the language Scratch. Wikipedia
A live demo can be found at https://rafaeltmbr.github.io/scratch-get-started