The core part of the code is MPL.js, a library for parsing and evaluating well-formed formulas of modal propositional logic. See the API Reference here.
I've also extracted the directed graph editing code so that it can be easily repurposed. You can find it here.