Adding a prototype of rule engine (on a mongodb database)