tRPC

Instead of manually integrating tRPC yourself, you can use vike-* packages and Bati. Bati helps you scaffold Vike projects. Bati and vike-* packages are going to get out of beta soon.

Example of using tRPC: