[task] Refactor the dir struct to make it deploy easily