I was working on a React Native project that required my app to give the user a convenient way to filter payloads based on certain criteria of each field. I started building a data structure, and then the methods to consume the data structures. Before I knew it, I had taken on a side quest inside my app. Then I thought, I am building a rules engine inside my app. Why not extract it out to something a bit more abstract and potentially re-usable for others in the community? This is when I decided to build rules-engine-ts.
So to build an open-source rules engine that others would want to use, there were a few criteria in my mind that had to be met. Roughly speaking these were it:
Overall the package took me just over 1 week to code. I was able to import it into my original React Native project and use it to build the rules engine. It was also imported into a backend Lambda to read the rules from a database and evaluate it.
The top takeaways from this experience are:
As of today, after being released for 5 days, there have been 536 downloads. Let's hope it can gain some traction over the next few weeks! 👊
The project is Open Source and can be viewed on GitHub & NPM.