Getting Started

From a fresh clone to a built engine and a passing test suite.

Prerequisites

  • Rust (the exact version is pinned in rust-toolchain.toml; rustup picks it up automatically)
  • just command runner
  • Node.js (for frontend development)
  • Docker (for pipeline integration tests and full stack)
  • mold on x86_64 Linux, including dev containers. packages/.cargo/config.toml passes -fuse-ld=mold there, so linking fails without it.

Run just dev-setup once before your first build. It installs mold, points every worktree at one shared target directory, and moves that directory to fast local storage when the repo sits on a slow mount. See Dev Environment for what it does and why.

Clone and Build

git clone https://github.com/MinBZK/regelrecht.git cd regelrecht

Quick Check

Run all quality checks to verify your setup:

just check

This runs formatting, linting, schema validation, and all tests.

Development Stack

Start the full development environment with hot reload:

just dev

This starts:

ServiceURLDescription
Editorhttp://localhost:3000Law editor + Corpusinwinning section (hot reload)
Admin APIhttp://localhost:8000Harvester REST API (auto-recompile; UI is the editor’s Corpusinwinning section)
Grafanahttp://localhost:3002Metrics dashboard
Prometheushttp://localhost:9090Metrics collection
PostgreSQLlocalhost:5433Database

Stop everything with:

just dev-down

Common Commands

just # List all available commands just format # Check Rust formatting just lint # Run clippy lints just test # Run unit tests just bdd # Run BDD tests (cucumber-rs) just validate # Validate law YAML files just bench # Run performance benchmarks

Project Structure

regelrecht/ ├── packages/ │ ├── engine/ # Rust execution engine │ ├── law-model/ # Rust implementation of the schema contract │ ├── pipeline/ # PostgreSQL job queue │ ├── harvester/ # BWB law downloader │ ├── editor-api/ # Backend for the law editor │ └── admin/ # Harvester-admin API ├── frontend/ # Law editor (Vue 3 + Vite) ├── frontend-lawmaking/ # Law-making process visualization ├── frontend-demo/ # The demo, engine as WASM in the browser ├── corpus/ # Machine-readable laws (YAML) ├── bdd/ # Canonical BDD grammar + conformance features ├── schema/ # Law format JSON schema └── docs/ # Documentation site (Astro) + RFCs

Next steps

RegelRecht

An exploration by Bureau Architectuur of the Dutch Ministry of Economic Affairs and Climate Policy into the possibilities of transparent, executable legislation.

Links

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

Contact

regelrecht@minbzk.nl

Part of

Bureau Architectuur
Ministry of Economic Affairs and Climate Policy