RPC like endpoints

Anyone had used NextJs server routes as a RPC like endpoints? I would like just to use NextJs backend as a proxy to my 3rd party API (which is the source of truth backend) but without any additional middle man setup. So just having Fetch client to talk to the API and call it directly from my client but with the ability to hide internals from the client (any secrets/auth etc). I found this one https://telefunc.com/ which seems like a good fit but seems barely used. Also from my understanding about new React Server Components I should be able to call my FetchClientAPI directly from RSC and pass data to the client component but still it leaves the mutations part to be covered. Maybe https://trpc.io/ would be better here? (yet still there is a bit of boilerplate just to be able to call the API). Are there any more alternatives that I can look into? P.S. - NextJs 13 app folder - Application is only used as an admin panel for serving the data of the API.
Telefunc
Remote Functions. Instead of API.
tRPC - Move Fast and Break Nothing. End-to-end typesafe APIs made e...
End-to-end typesafe APIs made easy. Automatic typesafety & autocompletion inferred from your API-paths, their input data, & outputs 🧙‍♂️
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server