[REFACTOR] ORM: make promises part of app lib
[REFACTOR] ORM: add beforeAnyAction method to controller