We apologize for the instability of composr.app and appreciate your patience. We are working on the statistics addon and trying to find an optimal way to store and render data. Unfortunately, we have yet to find a solution that can handle the traffic (and therefore, tens of millions of statistical records) of composr.app. We're working hard on one.
See our contact page code for an example:
https://github.com/ocproducts/composr/blob/master/pages/minimodules_custom/contact.php
~ 95% of that file is just defining the settings for our contact tree.
The core code pattern in a minimodule is just...
<?php
$decision_tree = array(
...
);
require_code('decision_tree');
$ob = new DecisionTree($decision_tree);
$tpl = $ob->run();
$tpl->evaluate_echo();