A powerful, flexible rules engine built with Java, TypeScript, and Vue. Everything is designed to make rules management simple, efficient, and scalable.
RuleEngine is a modern rules engine framework designed for enterprise applications. It provides a flexible, dynamic way to define, manage, and execute business rules without requiring code changes or redeployment.
Key Features:
- β¨ Dynamic Rule Definition: Define rules on-the-fly without recompilation
- π High Performance: Optimized execution engine for large rule sets
- π¨ User-Friendly UI: Vue-based frontend for intuitive rule management
- π Easy Integration: Spring Boot starter for seamless integration
- π Rule Versioning: Track and manage multiple versions of rules
- π‘οΈ Type-Safe: Strong typing with TypeScript and Java
RuleEngine/
βββ rule-engine-core/ # Core engine logic (Java)
βββ rule-engine-starter/ # Spring Boot starter integration (Java)
βββ rule-engine-ui/ # Web UI (Vue + TypeScript)
| Module | Language | Purpose |
|---|---|---|
| rule-engine-core | Java | Core rule execution engine, parser, and evaluator |
| rule-engine-starter | Java | Spring Boot auto-configuration starter |
| rule-engine-ui | Vue/TypeScript | Web-based rule editor and management interface |
- Java 8 or higher
- Node.js 14+ (for UI development)
- Maven 3.6+ (for building)
Add to your pom.xml:
<dependency>
<groupId>com.ruleengine</groupId>
<artifactId>rule-engine-starter</artifactId>
<version>1.0.0</version>
</dependency>cd rule-engine-ui
npm install
npm run serve@SpringBootApplication
public class MyApplication {
@Autowired
private RuleEngine ruleEngine;
public void executeRule(String ruleName, Map<String, Object> context) {
RuleResult result = ruleEngine.execute(ruleName, context);
System.out.println("Rule executed: " + result.isSuccess());
}
}Rules can be defined through the UI or programmatically:
{
"name": "DiscountRule",
"conditions": [
{
"field": "amount",
"operator": "greaterThan",
"value": 100
}
],
"actions": [
{
"type": "apply_discount",
"value": 0.1
}
]
}# Build all modules
mvn clean install
# Build specific module
mvn clean install -pl rule-engine-core
mvn clean install -pl rule-engine-starter# Clone the repository
git clone https://github.com/HeyAlaia/RuleEngine.git
cd RuleEngine
# Install dependencies
mvn install
npm install
# Run tests
mvn test
# Start development server
npm run devpublic interface RuleEngine {
RuleResult execute(String ruleName, Map<String, Object> context);
void loadRule(String ruleName, Rule rule);
void deleteRule(String ruleName);
Rule getRule(String ruleName);
}Run the test suite:
mvn testConfigure RuleEngine via application.properties or application.yml:
ruleengine.cache.enabled=true
ruleengine.cache.max-size=1000
ruleengine.execution.timeout=5000We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- HeyAlaia - GitHub Profile
- π Documentation
- π Issue Tracker
- π‘ Discussions
- Advanced rule composition
- Machine learning-based rule optimization
- Rule analytics and monitoring dashboard
- GraphQL API support
- Kubernetes deployment templates
- Java: 47.2% - Core engine and backend logic
- TypeScript: 40.3% - UI application and type safety
- Vue: 11.7% - Component framework and rendering
- Other: 0.8% - Configuration and miscellaneous files
Made with β€οΈ by the RuleEngine team