Hello, I'm developing a webapp and I would like to allow users to build their own logic flow diagrams and apply the business logic they put in the diagram for their account.

For example a very simple diagram would be smth. like:

Is user 1st login:
-> yes -> assign user role "new visitor"
-> no -> remove user role "new visitor"

Of course an actual diagram will...