Docs · Wardris Rules

Getting started

Run it

One command — the image bundles its own MongoDB, Kafka, and event store for trying it out:

docker run -d -p 8107:8107 -p 4400:4400 \
  -e RULES_ADMIN_USERNAME=admin \
  -e RULES_ADMIN_PASSWORD=changeme \
  ghcr.io/wardris/rules

The decision engine's API is on :8107; the operator console is on :4400 — open that in a browser and sign in with the admin credentials above. You're on the free Community tier with no license key needed.

Ask it for a decision

curl -u admin:changeme http://localhost:8107/api/evaluate \
  -H "Content-Type: application/json" \
  -d '{
    "ruleSetKey": "payment-routing",
    "input": { "amount": 1250, "currency": "EUR", "country": "MT" }
  }'

Author the payment-routing rule set itself from the console first — the API just evaluates whatever rules exist.

Add a license key

Set LICENSE_KEY to unlock a paid tier. Get a key from the Portal once you've picked a plan.

docker run -d -p 8107:8107 -p 4400:4400 \
  -e RULES_ADMIN_USERNAME=admin \
  -e RULES_ADMIN_PASSWORD=changeme \
  -e LICENSE_KEY=WARD-XXXX-XXXX-XXXX-XXXX \
  ghcr.io/wardris/rules

Rules validates the key against the Wardris License Server on startup and every 6 hours. If it's briefly unreachable, Rules keeps running at your last validated tier for 7 days before falling back to Community.

Environment variables

VariableDefaultWhat it does
RULES_ADMIN_USERNAME / RULES_ADMIN_PASSWORD—Bootstraps the first admin account on first boot.
LICENSE_KEYunset (Community tier)Unlocks your licensed tier — validated live against the license server.
LICENSE_TOKENunsetFor fully air-gapped deployments — a long-lived signed token instead of a live key. Ask us for one.
LICENSE_SERVER_URLhttps://portal.wardris.comOnly change this if we ever tell you to.
MONGODB_URIbundled MongoDBPoint at your own MongoDB — see "Production setup" below.
KAFKA_BROKERbundled KafkaPoint at your own Kafka for event-driven triggers, or ignore it entirely if you only ever call /api/evaluate directly.
RISK_DEPOSIT_THRESHOLD_AMOUNT / _HARD_CAP_AMOUNT / _WINDOW5000 / 25000 / 24hExample built-in risk-tracking thresholds shipped as a starting point — tune or ignore per your own rule sets.
RULE_ENGINE_HTTP_TIMEOUT_MS / _MAX_BYTES2500 / 1MBLimits for outbound HTTP actions a rule can trigger.

Production setup

The all-in-one image is a trial/quickstart packaging. For a real deployment, run your own external MongoDB, Kafka, and ClickHouse, and point the relevant env vars at them, so your data and event history survive a container restart independently of the app. Business+ tiers also unlock the tenant-scoped control plane (X-Tenant-Id header) for running multiple isolated customers on one instance.

What Rules does with the license key

The key is validated, never your rules, your data, or the facts you evaluate against. The only outbound call Rules makes to Wardris is the periodic license check.

Need help?

Questions or something not working as documented: info@wardris.com.