Skip to main content

Open-source transaction monitoring engine for business rules

Project description

ezrules

Open-source transaction monitoring for teams that need clear rule control, auditability, and fast operational changes.

ezrules gives fraud, risk, and compliance administrators a web workspace for managing decision rules without turning every policy update into an engineering project. Rules can be drafted, tested, reviewed, promoted, paused, rolled out, and audited from one place, while your systems keep sending events to a simple evaluation API.

ezrules dashboard

Why Teams Use It

  • Own the rule lifecycle. Create rules, keep drafts separate from live logic, pause risky rules, restore older revisions, and promote changes deliberately.
  • See what happened. Review evaluated events, the outcome returned, every rule that fired, and the exact event fields those rules used.
  • Improve rules with evidence. Use labels, precision/recall reports, backtests, shadow rules, and percentage rollouts before changing production decisions.
  • Run with admin controls. Manage roles, permissions, API keys, outcomes, user lists, field types, strict mode, and audit history inside the product.
  • Self-host it. Run the full stack yourself with PostgreSQL, Redis, FastAPI, Celery, and the web UI.

Demo

The demo stack starts with sample rules, outcomes, labels, and evaluated events.

git clone https://github.com/sofeikov/ezrules.git
cd ezrules
docker compose -f docker-compose.demo.yml up --build

Then open:

Service URL
Web UI http://localhost:4200
API http://localhost:8888
Mail UI http://localhost:8025

Login with admin@example.com / admin.

To stop and remove the demo data:

docker compose -f docker-compose.demo.yml down -v

Trace A Decision Field By Field

Hover across triggered rules to see referenced payload fields

Product Tour

Manage Live Rules

Create and maintain the rule set from a reviewable UI. Active rules, drafts, ordering, lifecycle actions, and rule status are visible in one place.

Rules list

Inspect Rule Logic And Performance

Each rule has its own detail view with source logic, test payloads, historical revisions, backtesting, and hit/outcome performance.

Rule detail

Review Tested Events

The Tested Events view connects decisions back to the raw payload, triggered rules, labels, and resolved outcomes. Referenced fields are highlighted so an admin can see why a rule fired.

Tested events

Measure Rule Quality

When events are labeled, ezrules can compare outcomes to ground truth and rank rules by precision, recall, F1, true positives, false positives, and false negatives.

Rule quality

How It Fits Into Your System

Your application sends an event to ezrules, and ezrules returns the resolved outcome.

curl -X POST http://localhost:8888/api/v2/evaluate \
  -H "Content-Type: application/json" \
  -H "X-API-Key: <api-key>" \
  -d '{
    "event_id": "txn_123",
    "event_timestamp": "2026-04-23T12:00:00Z",
    "event_data": {
      "amount": 875.50,
      "currency": "EUR",
      "customer_country": "US",
      "shipping_country": "MX",
      "has_3ds": 0
    }
  }'

The result is stored for review in the UI, including the winning outcome and the rules that contributed to the decision.

Core Workflows

  • Rule authoring: write rule logic with validation, observed field references, configured outcomes, and list references.
  • Shadow deployment: observe what a rule would do on live traffic without changing production outcomes.
  • Rule rollouts: send a stable percentage of traffic through a candidate rule before full promotion.
  • Backtesting: compare proposed logic against historical events before release.
  • Labeling and quality reports: upload or assign labels, then measure how rules perform against known outcomes.
  • Audit and access control: keep change history and separate admin, editor, and read-only responsibilities.

Documentation

The documentation site is also available at ezrules.readthedocs.io.

Development

For contributors, the project uses Python 3.12, uv, FastAPI, SQLAlchemy, Celery, PostgreSQL, Angular, Tailwind CSS, and Playwright.

uv sync
uv run poe check

Frontend dependencies live in ezrules/frontend/.

cd ezrules/frontend
npm install
npm start

See docs/contributing.md for contribution guidance.

License

Apache License 2.0. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ezrules-1.16.0.tar.gz (6.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ezrules-1.16.0-py3-none-any.whl (571.0 kB view details)

Uploaded Python 3

File details

Details for the file ezrules-1.16.0.tar.gz.

File metadata

  • Download URL: ezrules-1.16.0.tar.gz
  • Upload date:
  • Size: 6.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ezrules-1.16.0.tar.gz
Algorithm Hash digest
SHA256 4d2677db6fc05781c4ae2c0f16d2220a535d22e42c9e806fd36b2ef3a4330293
MD5 fad93832a0a9dd4dc8f9c9606b781249
BLAKE2b-256 8eef62aeb7e37a90075c0b167029af7f45f6bda20baf0b5f17349bce8c6dcc15

See more details on using hashes here.

File details

Details for the file ezrules-1.16.0-py3-none-any.whl.

File metadata

  • Download URL: ezrules-1.16.0-py3-none-any.whl
  • Upload date:
  • Size: 571.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ezrules-1.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71cea960731aa8d9e748fcedde5a7584b5b52da48683172ea67f8a7cce773a67
MD5 e94934b2be001cce845536a1cc12fae4
BLAKE2b-256 1fbfa6d208b058370ca9abb7b8f320d60b910b264f81dca0b878079771ca5bfe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page