There have been lots of attempts to blur client and server. The latest Next is one, Meteor is several years old now and does something similar iirc, and a few other less popular ones. I don't think a drop in lib is possible by its nature tho, client and server have to cooperate.
I've found random endpoints works reasonably well tho. You can change the server response and it only affects one client page. Easy to maintain.
If you want more structure, you can also try GraphQL.
I've found random endpoints works reasonably well tho. You can change the server response and it only affects one client page. Easy to maintain.
If you want more structure, you can also try GraphQL.