CodeNight-Ethiopia / codenight-frontend

Website for the Codenight Developer Community
https://codenight.et
MIT License
46 stars 27 forks source link

Let's use TRPC #50

Open b1n1yam opened 7 months ago

b1n1yam commented 7 months ago

Proposal for using TRPC

By using TRPC for the API we can define our API endpoints as TypeScript functions, eliminating the need for separate API documentation and ensuring type-safety across the entire stack.

Adopting tRPC would bring the following benefits:

Type-Safety: tRPC leverages TypeScript's type system to ensure that the data structures used in the front end and backend match, reducing the risk of runtime errors caused by type mismatches. Efficient Communication: tRPC uses RPC (Remote Procedure Call) pattern, which allows for more efficient communication between the frontend and backend, reducing over-fetching and improving performance.

Better DX: tRPC provides a better developer experience with features like automatic code generation, TypeScript intellisense, and better tooling support.

yaba101 commented 2 months ago

Good point But Here is my hot take: