The Rule Engine with Abstract Syntax Tree (AST) is a dynamic application designed to create, evaluate, and combine business rules based on user-defined criteria. This engine uses an AST to represent the logical structure of rules and allows for complex rule evaluation efficiently. The project is built using Spring Boot, Hibernate, and Thymeleaf for an intuitive user interface and seamless backend operations.
Backend
Frontend
Database
Deployment
-
Dynamic Rule Evaluation: Evaluate user eligibility based on dynamically defined rules.
-
Rule Combination: Combine existing rules into a single AST with OR/AND operations.
-
Error Handling: Inform users if a rule is already combined with another.
-
User-Friendly Interface: Easy navigation and interaction for rule management.
To run this project, you will need to add the following environment variables to your .env file or application.properties:
db_url
db_username
db_password
- Java 17
- Spring Boot 3.2.5
- MySQL
- Maven
-
Clone the repository:
git clone https://github.com/Vineet1025/Rule-Engine-with-AST.git cd Rule-Engine-with-AST
-
Configure your application.properties for database connection:
spring.datasource.url=${db_url} //Enter your database URL (jdbc:mysql://localhost:3306/rule_engine_db) spring.datasource.username=${db_username} //Enter your database username spring.datasource.password=${db_password} //Enter your database password
-
Run the application:
mvn spring-boot:run
-
Access the application in your browser at http://localhost:8080/api/rule/index
The application has been deployed on AWS EC2, allowing for easy access and management of rule evaluation.
Accessing the Deployed Application
- You can access the live application at: http://13.201.204.129:9000/api/rule/index
-
Create Rules: Users can navigate to the "Create Rule" section to define new rules based on user attributes.
-
Combine Rules: Select multiple existing rules from checkboxes to combine them, enhancing the logic of evaluations.
-
Evaluate Rules: Test the defined rules against user data to check for eligibility or compliance.
Contributions are welcome! Please feel free to submit issues or pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
Vineet Jain - LinkedIn - [email protected]
Project Link: https://github.com/Vineet1025/Weather-App
- Spring Boot for providing an efficient backend framework.
- MySQL for data management.