The Visualizer
Turn on the built-in admin UI to browse rules, dry-run them, and watch them live.
On this page
The Visualizer
So far you have inspected rules in code. RuleBox also ships a small admin UI that shows the same things in a browser. It is off by default.
Turn it on
In the same variables.moduleSettings from lesson 7, add a visualizer
block:
variables.moduleSettings = {
rulebox = {
rulebooks = {
"loan" : {
"source" : "config/rules/loan.json",
"actions" : { "decide" : "DecisionAction" }
}
},
visualizer = {
enabled = true,
// This is the default store, written out so the setting is complete.
metricsStore = "InMemoryMetricsStore@rulebox"
}
}
}
Restart your app, then open:
/rulebox-visualizer
Lock it down. RuleBox does not secure the Visualizer for you. Put
/rulebox-visualizerbehind your normal login (for example a cbSecurity rule) before you turn it on anywhere that is not your own machine.
A tour






The sidebar links the five screens.
Dashboard. Every rulebook you declared, with its rule count, results and
a feed of recent activity. Your loan rulebook is here. Above it, Problem
rules lists the rules that fail most and Slowest rules the ones that take
longest, so you know where to look first.
Rule Visualizer. Click View chain on a rulebook to see its rules in the order they really run, with their priorities, their descriptions and which ones stop the chain. This is lesson 4 as a picture. The rulebook's description sits under its name, and if it declares its facts (lesson 3), they are listed above the rules, with a badge that says whether they are enforced.
Dry Run. Pick a rulebook, fill in its facts, and press Run dry run.
It is dryRun() from lesson 5 with a button. Nothing is executed or
recorded. A rulebook that declares its facts gets a form, with a field for
each fact; switch to JSON to type them as { "creditScore": 640 }
instead. If the rulebook enforces its facts, leave out a required one and
the problem shows next to its field.
Metrics. Totals and averages per rulebook, gathered across every run, not just one RuleBook instance. The Rule health table shows each rule's completion rate, error rate, durations and last error. Remember lesson 8: when a rule throws, the error still reaches your code, and the Visualizer also records it here. Open Show errors to see each distinct error once, with how many times it happened, what caused it, and where.
Live Tracker. Every rule evaluation, as it happens. Run your handler from lesson 7 in another tab and watch the rows arrive. A failed evaluation shows up in red with its error.
The screenshots above come from RuleBox's own test app, so your rulebook names will differ.
Try it
Enable the Visualizer, open the Dry Run screen, choose loan, and enter
{ "creditScore": 540 }. You should see declineLowScores would execute and
stop the chain. Then enter { "creditScore": 720, "requestedAmount": 100000 }.
The Rule Visualizer guide covers every setting, including a SQLite store that keeps metrics across restarts.
Next: wrap up.