Rewrite the project using rails