add DB module and change app stucture