{tenantData[tenant].name} - {ruleType.charAt(0).toUpperCase() + ruleType.slice(1)} Rules
Plan: {tenantData[tenant].plan} | Features: {tenantData[tenant].features.join(', ')}
🎯 The Ultimate JSON-Based Rule Engine for Modern Applications
Quick Start • Packages • Examples • Documentation • Why This?
{JSON.stringify(rule, null, 2)}
🎨 Visual Rule Constructor for React Applications
{JSON.stringify(rule, null, 2)}
Made with ❤️ by the @usex/rule-engine community
GitHub • npm • Documentation
Create rules to automatically adjust pricing based on customer, product, and context factors.
$5.99 base + $0.50/lb
$12.99 base + $1.00/lb
$24.99 base + $2.00/lb
Define complex promotional rules with multiple conditions and customer targeting.
Define role-based access control rules with fine-grained permissions.
Create intelligent MFA rules based on risk assessment and context.
Create comprehensive validation rules for user registration forms.
{JSON.stringify(formData, null, 2)}
Create conditional validation rules that adapt based on form context and user role.
Create intelligent lead scoring based on company fit and engagement metrics.
Automate inventory decisions with intelligent reordering and stock level management.
Plan: {tenantData[tenant].plan} | Features: {tenantData[tenant].features.join(', ')}
Build complex business rules with a tree structure
{JSON.stringify(testResult.result, null, 2)}
{testResult.error}
{`$.users[?(@.age > 18)]`}
{stats.additions} lines added
{stats.deletions} lines removed
Property Changes:
{stats.addedProperties && stats.addedProperties.length > 0 && (Added ({stats.addedProperties.length}):
Removed ({stats.removedProperties.length}):
Modified ({stats.modifiedProperties.length}):
{stats.changes} of {stats.totalLines} lines changed
No conditions in this group
{!readOnly && (No fields found
{allowCustom && ( )}{field.description}
)}$.field
Access a root-level field
$.parent.child
Access nested field
$.array[*]
All array elements
$..fieldName
Recursive search
Evaluate your rule against sample data in real-time
{entry.description}
{selectedEntry.description}
Change tracking was not available for this version
Comparing v {history.indexOf(compareEntry) + 1} → v {history.indexOf(selectedEntry) + 1}
Choose a history entry from the list to view its details, changes, and JSON structure
{jsonString}
{selectedField.description}
Maximum nesting depth ({maxNestingDepth}) reached
{mergedLabels.noRules}
{!readOnly && ({regexError}
)}{flagInfo.name}
{flagInfo.description}
{match.value}
Index: {match.index}
Click to use, or copy pattern
{sampleJson}
{fieldName}
No conditions yet. Start by adding a rule or group.
{!readOnly && ({selectedField.description}
Field is required
)}{operatorHelp[localConstraint.operator].name}
{operatorHelp[localConstraint.operator].description}
{operatorHelp[localConstraint.operator].description}
{example.field} {localConstraint.operator}{" "}
{JSON.stringify(example.value)}
{example.explanation}
Value is required
)}{operatorHelp[localConstraint.operator].name}
{operatorHelp[localConstraint.operator].description}
{operatorHelp[localConstraint.operator].tips && operatorHelp[localConstraint.operator].tips!.length > 0 && (💡 {tip}
))}
{testResult.error}
{mergedLabels.noRules}
{!readOnly && ({entry.description}
• Press Ctrl+Z to undo
• Press Ctrl+Y or Ctrl+Shift+Z to redo
Evaluate your rule against sample data in real-time
{entry.description}
{selectedEntry.description}
Change tracking was not available for this version
Comparing v {history.indexOf(compareEntry) + 1} → v {history.indexOf(selectedEntry) + 1}
Choose a history entry from the list to view its details, changes, and JSON structure
This value references another field
{operator.toUpperCase()} Operator
{getOperatorDescription()}
Preview:
{field} {operator} [
{items
.map((i) => (typeof i === "string" ? `"${i}"` : i))
.join(", ")}
]
{validationInfo.description}
✓ Valid Examples
{example}
))}
✗ Invalid Examples
{example}
))}
Interactive Demo
Rule Preview:
{field} {operator}
"true"
or
"false"
1
or
0
Pattern matching:
{value}
Relative Date Check
{getOperatorDescription()}
{getOperatorDescription()}
{getOperatorDescription()}
{operatorInfo.description}
{operatorInfo.examples.length > 0 && (Examples:
{example}
))}
Rule Preview:
{field} {operator}
{validationInfo.description}
{validationInfo.examples.length > 0 && (Examples:
{example}
))}
{validationInfo.description}
{validationInfo.description}
{validationInfo.description}
{validationInfo.examples.length > 0 && (Examples:
{example}
))}
Rule Preview:
{field} {operator}
{validationInfo.description}
{validationInfo.examples.length > 0 && (Examples:
{example}
))}
{validationInfo.description}
{validationInfo.description}
{validationInfo.description}
{validationInfo.examples.length > 0 && (Examples:
{example}
))}
Rule Preview:
{field} {operator}
Example:
{field} {operator} [{fields.join(", ")}]
{validationInfo.description}
{validationInfo.examples.length > 0 && (Examples:
{example}
))}
RegEx Tips:
Rule Preview:
{field} {operator} {value && `"${value}"`}
{typeInfo.description}
{typeInfo.examples.length > 0 && (Examples:
{example}
))}
{operator === "email" && "Add a pattern to further restrict email format"} {operator === "url" && "Specify required protocol (http, https, ftp, etc.)"} {operator === "uuid" && "Specify UUID version (1, 3, 4, 5)"}
Rule Preview:
{field} {operator} {value && `"${value}"`}
JSON
JSON
Start building powerful business logic with condition groups. Add rules that evaluate data and trigger actions based on your criteria.
Test rules with live data evaluation
Ctrl/Cmd + E to toggle
Ctrl/Cmd + Shift + E
Evaluation Error
{error}
Details
{evaluationResult.isPassed ? "All conditions were satisfied" : "One or more conditions failed"}
{JSON.stringify(
evaluationResult.value,
null,
2,
)}
{isLiveMode ? "Waiting for rule changes..." : 'Click "Evaluate" to test your rule'}
Run an evaluation to see detailed breakdown
Edit the data used for evaluation
{isLiveMode ? "Live mode is active - changes will evaluate automatically" : "Click evaluate to test your rule, or enable live mode"}
{!isLiveMode && ( )}