Terminal UI (TUI)

An interactive terminal dashboard for browsing the corpus and running the engine.

The TUI is an interactive terminal dashboard for developers working with the regulation corpus and engine.

Overview

  • Language: Rust (Ratatui + Crossterm)
  • Location: packages/tui/
  • Binary: rrtui

What it does

A full-screen terminal application for the local checkout: browse the corpus, run the engine and the BDD suites, validate regulations, inspect execution traces and follow log output. It links the engine crate directly, so it needs no running service.

Screens

There are ten tabs, in the order the tab bar shows them:

ScreenPurpose
DashboardCorpus statistics: laws, articles, features and scenarios, laws per regulatory layer, the most referenced laws and the laws with most implementations
BDDRun and view BDD test results
EngineExecute laws with custom parameters
CorpusBrowse and search ruleworks
PipelinePlaceholder, see below
ValidationRun schema validation
TraceInspect execution trace trees
DependenciesWhich laws reference which, both ways, plus declared and implemented open terms
LogsView log output
ActionsRun the just quality targets (format, lint, and the rest) and watch their output

The Pipeline tab is a stub. packages/tui/src/views/pipeline.rs never connects to a database: it always shows “Not connected” with a hint to set DATABASE_URL, and setting that variable changes nothing. Job and law status from the pipeline are visible in the harvester admin (the Corpusinwinning section of the editor) and in Grafana, not here.

Running

cd packages cargo run -p regelrecht-tui

No configuration needed. The TUI walks up from the working directory to the first directory with a justfile and treats that as the repository root, then reads the corpus from corpus/regulation/ below it.

Further reading

RegelRecht

An exploration into transparent, executable legislation, and one of the three projects in the starting selection of the Nederlandse Digitale Dienst.

Links

GitHub repository
How it works
Stay informed
Roadmap (Dutch)
Documentation
Research

Contact

regelrecht@minbzk.nl

Part of

Nederlandse Digitale Dienst
Ministry of Economic Affairs and Climate Policy