added backend and routes for document