refactor using Plugins and add local TingoDb entity engine