REFACTOR to make the project split into backend and front