refactored denora code into repositories, frontend and api both use the repositories now