I see your point. So the goal it to have a single source of truth for the API endpoints. One solution could be having a central route/URL dictionary which is referenced in every component. It should be shared between the server and client side as well.