create a modulebase class for all modules and refactor backend and frontend modules