An open API service indexing awesome lists of open source software.

https://github.com/vineet1025/rule-engine-with-ast

Rule Engine with Abstract Syntax Tree (AST)
https://github.com/vineet1025/rule-engine-with-ast

hibernate java springboot sql thymeleaf

Last synced: about 2 months ago
JSON representation

Rule Engine with Abstract Syntax Tree (AST)

Awesome Lists containing this project

README

          


Rule Engine with Abstract Syntax Tree (AST)



:zap: Live Project


# :notebook_with_decorative_cover: Table of Contents

- [About the Project](#star2-about-the-project)
* [Screenshots](#camera-screenshots)
* [Technologies Used](#space_invader-technologies-used)
* [Features](#dart-features)
* [Environment Variables](#key-environment-variables)
- [Getting Started](#toolbox-getting-started)
* [Prerequisites](#bangbang-prerequisites)
* [Installation](#gear-installation)
- [Deployment](#deployment)
- [Usage](#eyes-usage)
- [Contributing](#wave-contributing)
- [License](#warning-license)
- [Contact](#handshake-contact)
- [Acknowledgements](#gem-acknowledgements)

## :star2: About the Project
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.

### :camera: Screenshots




screenshot



### :space_invader: Technologies Used

Backend

Frontend

Database

Deployment

### :dart: Features

- **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.

### :key: Environment Variables

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`

## :toolbox: Getting Started

### :bangbang: Prerequisites

- Java 17
- Spring Boot 3.2.5
- MySQL
- Maven

### :gear: Installation

1. **Clone the repository**:

```bash
git clone https://github.com/Vineet1025/Rule-Engine-with-AST.git
cd Rule-Engine-with-AST
```
2. **Configure your application.properties for database connection**:

```bash
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
```

3. **Run the application**:

```bash
mvn spring-boot:run
```

4. **Access the application in your browser at** http://localhost:8080/api/rule/index

### :triangular_flag_on_post: Deployment

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

## :eyes: Usage
1. **Create Rules**: Users can navigate to the "Create Rule" section to define new rules based on user attributes.

2. **Combine Rules**: Select multiple existing rules from checkboxes to combine them, enhancing the logic of evaluations.

3. **Evaluate Rules**: Test the defined rules against user data to check for eligibility or compliance.

## :wave: Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

## :warning: License

This project is licensed under the MIT License - see the [LICENSE](https://github.com/Vineet1025/Rule-Engine-with-AST/blob/master/LICENSE.md) file for details.

## :handshake: Contact

Vineet Jain - [LinkedIn](https://www.linkedin.com/in/vineet-jain1025/) - jvineet1025@gmail.com

Project Link: [https://github.com/Vineet1025/Weather-App](https://github.com/Vineet1025/Weather-App)

## :gem: Acknowledgements

- Spring Boot for providing an efficient backend framework.
- MySQL for data management.